Machine-translated by Google. Questions are authored in English.
Top

Discussion

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.

RA= 0xC1400000RB = 0x42100000RC = 0x41400000

Which one of the following is FALSE?

  • A.\(A + C = 0\)
  • B.\(C = A + B\)
  • C.\(B = 3C\)
  • D.\((B - C) \gt 0\)

Answer: B

The false statement is \(C = A + B\).

Decode each register as sign, 8-bit exponent with bias 127, and 23-bit fraction with a hidden leading 1.

  • 0xC1400000 = 1 10000010 1000...: sign negative, exponent \(130 - 127 = 3\), significand 1.1 in binary = 1.5, so \(A = -1.5 \times 8 = -12\).
  • 0x42100000 = 0 10000100 0010...: exponent \(132 - 127 = 5\), significand 1.001 in binary = 1.125, so \(B = 1.125 \times 32 = 36\).
  • 0x41400000 = 0 10000010 1000...: exponent 3, significand 1.5, so \(C = 12\).

Then \(A + C = -12 + 12 = 0\), \(B = 36 = 3C\) and \(B - C = 24 \gt 0\) are all true, while \(A + B = -12 + 36 = 24\), which is not 12. So \(C = A + B\) is the false statement.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.