IAE Academy

GATE 2022 CS Q.41: solution and answer

GATE 2022 · CSQ.41 · 2 marks · MCQ

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

= 0xC1400000, = 0x42100000, = 0x41400000

Which one of the following is FALSE?

  1. (A)

  2. (B)

  3. (C)

  4. (D)

See the question in the paper

Answer and solution

ANSWER

Option (B) is the false statement: , not .

Official answer: BSource: Official answer key, GATE 2022 CS (IIT Kharagpur)

  1. IEEE-754 single precision value: , with 1 sign bit, 8 exponent bits and 23 fraction bits.

  2. = 0xC1400000 = 1100 0001 0100 0000 ...: sign , exponent 10000010 , so ; fraction 100...0 gives . Hence .

  3. = 0x41400000 = 0100 0001 0100 0000 ...: sign , exponent 10000010 (power ), fraction 100...0 gives . Hence .

  4. = 0x42100000 = 0100 0010 0001 0000 ...: sign , exponent 10000100 (power ), fraction 0010 0...0 gives . Hence .

  5. Check (A): , true.

  6. Check (B): , so is false.

  7. Check (C): , true. Check (D): , true.

  8. Only (B) is false.

KEY IDEA

Split each hexadecimal word into sign, 8-bit exponent (subtract the bias 127) and fraction, rebuild , then test each option with the decoded values , , .

WATCH OUT FOR

Misreading the exponent field or the fraction bits. For the hex digits 2 1 0 give exponent 10000100 and fraction 0010..., not 0100.... Taking the exponent as 131 or the fraction as gives the wrong value of . Also forgetting the sign bit of (first hex digit C = 1100).

From the GATE 2022 CS paper. Every question of this paper · Download the full paper · All 18 Number systems questions, with notes

More Number systems questions