EIT Computer Science and Numerical Methods 2 — Questions and Answers
Question 1: In hexadecimal, what is the decimal value of FF?
- 200
- 240
- 255 (Correct answer)
- 256
Correct answer: 255
FF in hex equals 15×16 + 15×1 = 240 + 15 = 255 in decimal.
Question 2: The central difference approximation for the first derivative f'(x) is:
- [f(x+h) - f(x)] / h
- [f(x) - f(x-h)] / h
- [f(x+h) - f(x-h)] / (2h) (Correct answer)
- [f(x+h) + f(x-h)] / (2h²)
Correct answer: [f(x+h) - f(x-h)] / (2h)
The central difference formula uses points on both sides of x and divides by 2h, providing second-order accuracy.
Question 3: The 4th-order Runge-Kutta method is primarily used to numerically solve:
- Systems of linear algebraic equations
- Eigenvalue problems for matrices
- Partial differential equations with boundary conditions
- Ordinary differential equations with initial conditions (Correct answer)
Correct answer: Ordinary differential equations with initial conditions
RK4 is a step-by-step integration scheme that advances the solution of ODEs from initial conditions using weighted slope estimates.
Question 4: When the Newton-Raphson method converges near a simple root, its rate of convergence is:
- Linear
- Quadratic (Correct answer)
- Cubic
- Sub-linear
Correct answer: Quadratic
Near a simple root, the error at each Newton-Raphson iteration is proportional to the square of the previous error — quadratic convergence.
Question 5: What is the result of the bitwise AND of binary 1100 and 1010?
- 1110
- 0110
- 1000 (Correct answer)
- 1111
Correct answer: 1000
AND returns 1 only when both bits are 1: 1100 AND 1010 gives 1000 (only the leftmost bit is 1 in both).
Question 6: In floating-point arithmetic, round-off error arises from:
- Approximating an infinite series with a finite number of terms
- Using incorrect boundary conditions in a simulation
- The limited precision of floating-point number representation (Correct answer)
- Choosing a step size that is too large in numerical integration
Correct answer: The limited precision of floating-point number representation
Round-off error occurs because computers store real numbers with finite precision, causing irrational and many rational numbers to be approximated.
Question 7: A queue data structure follows which access principle?
- LIFO — Last In, First Out
- FILO — First In, Last Out
- FIFO — First In, First Out (Correct answer)
- Random access by index
Correct answer: FIFO — First In, First Out
A queue removes elements in the same order they were added — the first element enqueued is the first one dequeued (FIFO).
In hexadecimal, what is the decimal value of FF?