EIT Computer Science and Numerical Methods 1 — Questions and Answers
Question 1: What is the result of binary addition 1011 + 0101?
- 1111
- 10000 (Correct answer)
- 1110
- 10001
Correct answer: 10000
1011 (11) + 0101 (5) = 16 = 10000 in binary.
Question 2: The Newton-Raphson method is primarily used for:
- Numerical integration
- Solving systems of differential equations
- Finding roots of nonlinear equations (Correct answer)
- Matrix inversion
Correct answer: Finding roots of nonlinear equations
Newton-Raphson iteratively refines root estimates using xₙ₊₁ = xₙ − f(xₙ)/f′(xₙ).
Question 3: What is the time complexity of the binary search algorithm?
- O(n)
- O(n²)
- O(log n) (Correct answer)
- O(n log n)
Correct answer: O(log n)
Binary search halves the search space each iteration, yielding O(log n) time complexity.
Question 4: In numerical methods, the trapezoidal rule is used to approximate:
- Derivatives of functions
- Definite integrals (Correct answer)
- Eigenvalues of matrices
- Roots of polynomials
Correct answer: Definite integrals
The trapezoidal rule estimates a definite integral by summing trapezoidal areas under the curve.
Question 5: Which data structure operates on a Last-In-First-Out (LIFO) principle?
- Queue
- Linked list
- Stack (Correct answer)
- Binary tree
Correct answer: Stack
A stack follows LIFO order—the most recently inserted element is the first to be removed.
Question 6: Round-off error in numerical computation refers to:
- Integer overflow
- Truncation of an infinite series
- Loss of precision when representing decimals in finite binary storage (Correct answer)
- Division by zero
Correct answer: Loss of precision when representing decimals in finite binary storage
Round-off error occurs because finite binary representation cannot exactly store all decimal values.
What is the result of binary addition 1011 + 0101?