GATE CS 2025 Set 2 | Question 49

MSQ · 2 marks

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?

  1. Option A: \(4(X + Y) + Z = 0\) (correct)
  2. Option B: \(2Y - Z = 0\) (correct)
  3. Option C: \(4X + 3Z = 0\) (correct)
  4. Option D: \(X + Y + Z = 0\)

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