Consider three floating point numbers A, B and C stored in registers RA, RB…

2022

Consider three floating point numbers A, B and C stored in registers RA, RB and RC, respectively as per IEEE-754 single precision floating point format. The 32-bit content stored in these registers (in hexadecimal form) are as follows.

image.png

Which one of the following is FALSE?

  1. A.

    A + C = 0

  2. B.

    C = A + B

  3. C.

    B = 3C

  4. D.

    (B – C) > 0

Attempted by 123 students.

Show answer & explanation

Correct answer: B

Interpretation and decoding:

  • Assumption: the prompt repeats the RA line; interpret the values as A = 0xC1400000, B = 0xC1400000, and C = 0x41400000.

  • Decode A = 0xC1400000: sign = 1 (negative), exponent field = 130 (e−127 = 3), mantissa = 1.5 ⇒ value = −1.5 × 2^3 = −12.

  • Decode B = 0xC1400000: same bits as A ⇒ B = −12.

  • Decode C = 0x41400000: sign = 0, exponent field = 130 (e−127 = 3), mantissa = 1.5 ⇒ value = +1.5 × 2^3 = +12.

Evaluate each statement using A = −12, B = −12, C = +12:

  • A + C = −12 + 12 = 0 ⇒ true.

  • C = A + B ⇒ 12 = (−12) + (−12) = −24 ⇒ false.

  • B = 3C ⇒ −12 = 3 × 12 = 36 ⇒ false.

  • (B − C) > 0 ⇒ −12 − 12 = −24, which is not > 0 ⇒ false.

Conclusion:

  • The statement "C = A + B" is false, as shown above. However, two other arithmetic statements are also false given the decoded values. Therefore the question is ambiguous if it expects exactly one false statement; the numeric decoding shows multiple false statements under the reasonable interpretation of the given hex values.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir