Question 95

Computer Awareness Boolean algebra Easy

Consider the values:
\( A = 2.0 \times 10^{30} \)
\( B = -2.0 \times 10^{30} \)
\( C = 1.0 \)
Assume that floating-point numbers are represented with 32 bits. What are the values of \( X \) and \( Y \) after executing the following sequence of operations on a computer?
1. \( X = A + B \)
2. \( Y = A + C \)
3. \( X = X + C \)
4. \( Y = Y + B \)

(A) X = 1.0, Y = 1.0
(B) X = 1.0, Y = 0.0
(C) X = 0.0, Y = 1.0
(D) X = 0.0, Y = 0.0
✓ Correct Answer: Option B Verified Solution

📘 Step-by-Step Solution & Detailed Explanation:

- \( A = 2.0 \times 10^{30} \)
- \( B = -2.0 \times 10^{30} \)
- \( C = 1.0 \)
- 32-bit floating-point representation Step-by-step Calculation:
1. Compute \( X \) \[ X = A + B = (2.0 \times 10^{30}) + (-2.0 \times 10^{30}) = 0.0 \] (Exact cancellation due to floating-point precision) 2. Compute \( Y \) \[ Y = A + C = (2.0 \times 10^{30}) + 1.0 \approx 2.0 \times 10^{30} \] (Since \( C \) is much smaller, it is ignored due to floating-point precision) 3. Compute \( X = X + C \) \[ X = 0.0 + 1.0 = 1.0 \] 4. Compute \( Y = Y + B \) \[ Y = (2.0 \times 10^{30}) + (-2.0 \times 10^{30}) = 0.0 \] (Exact cancellation) Final Values:
- \( X = 1.0 \), \( Y = 0.0 \)
- Correct Answer: B (X = 1.0, Y = 0.0)

Practice Similar Boolean algebra Questions

Reinforce your conceptual grasp with related questions from NIMCET 2014:

Q96 The Boolean expression X (X +  Y) is same as
Solve →
Q97 How many bytes are there in a nibble?
Solve →
Q91 The decimal equivalent of the hexadecimal operation A10 + B21 is
Solve →
Q92 What is the 2's complement of 0011 0101 1001 1100?
Solve →
Q93 Multiplication of 1112 by 1012 is
Solve →
Full-Length Test Series

Prepare for NIMCET Under Real Exam Conditions

Take timed full-length mock tests with authentic question distributions, negative marking (+12/-3 in Math), and instant All India Rank calculation.

Start Free Mock Test Series →