Three floating point numbers \(X, Y\), and \(Z\) are stored in three registers RX, RY, and RZ, respectively in IEEE 754 single precision format as given below in hexadecimal:
RX = 0xC1100000, RY = 0x40C00000, and RZ = 0x41400000
Which of the following option(s) is/are CORRECT?
Answer
(A), (B), (C)
Explanation
Read each word as sign (1 bit), biased exponent (8 bits) and fraction (23 bits); the value is \((-1)^{s} \times 1.f \times 2^{e - 127}\).
- 0xC1100000: sign 1, exponent 10000010 = 130, fraction 001000…, so \(X = -1.125 \times 2^{3} = -9\).
- 0x40C00000: sign 0, exponent 10000001 = 129, fraction 100000…, so \(Y = 1.5 \times 2^{2} = 6\).
- 0x41400000: sign 0, exponent 10000010 = 130, fraction 100000…, so \(Z = 1.5 \times 2^{3} = 12\).
Now check each option: (A) \(4(-9 + 6) + 12 = 0\); (B) \(12 - 12 = 0\); (C) \(-36 + 36 = 0\). (D) fails because \(-9 + 6 + 12 = 9\).
Answer: A, B, C