Question

Three floating point numbers X,Y,X, Y, and ZZ are stored in three registers RX,RY,R_X, R_Y, and RZR_Z, respectively in IEEE 754 single precision format as given below in hexadecimal:

RX=0xC1100000R_X = \texttt{0xC1100000}, RY=0x40C00000R_Y = \texttt{0x40C00000}, and RZ=0x41400000R_Z = \texttt{0x41400000}

Which of the following option(s) is/are CORRECT?

Choose every correct option
Official answer and solution
Official answer
A, B and C
From
Official GATE 2025 answer key

Solution

Decode each 32-bit IEEE 754 single-precision hexadecimal value using (−1)S×(1.M)2×2E−127(-1)^S \times (1.M)_2 \times 2^{E - 127}.

Decoding each 32-bit IEEE 754 single-precision value (1 sign bit SS, 8 exponent bits EE, 23 fraction bits MM):

  1. RX=0xC1100000=1 10000010 0010000...2R_X = \texttt{0xC1100000} = \texttt{1 10000010 0010000...}_2:
    • S=1S = 1, E=130  ⟹  E−127=3E = 130 \implies E - 127 = 3, (1.M)2=1.0012=1.125(1.M)_2 = 1.001_2 = 1.125.
    • X=−1.125×23=−9X = -1.125 \times 2^3 = -9.
  2. RY=0x40C00000=0 10000001 1000000...2R_Y = \texttt{0x40C00000} = \texttt{0 10000001 1000000...}_2:
    • S=0S = 0, E=129  ⟹  E−127=2E = 129 \implies E - 127 = 2, (1.M)2=1.12=1.5(1.M)_2 = 1.1_2 = 1.5.
    • Y=+1.5×22=6Y = +1.5 \times 2^2 = 6.
  3. RZ=0x41400000=0 10000010 1000000...2R_Z = \texttt{0x41400000} = \texttt{0 10000010 1000000...}_2:
    • S=0S = 0, E=130  ⟹  E−127=3E = 130 \implies E - 127 = 3, (1.M)2=1.12=1.5(1.M)_2 = 1.1_2 = 1.5.
    • Z=+1.5×23=12Z = +1.5 \times 2^3 = 12.

Checking each equation for (X,Y,Z)=(−9,6,12)(X, Y, Z) = (-9, 6, 12):

  • (A): 4(X+Y)+Z=4(−9+6)+12=−12+12=04(X + Y) + Z = 4(-9 + 6) + 12 = -12 + 12 = 0 (TRUE).
  • (B): 2Y−Z=2(6)−12=02Y - Z = 2(6) - 12 = 0 (TRUE).
  • (C): 4X+3Z=4(−9)+3(12)=−36+36=04X + 3Z = 4(-9) + 3(12) = -36 + 36 = 0 (TRUE).
  • (D): X+Y+Z=−9+6+12=9≠0X + Y + Z = -9 + 6 + 12 = 9 \neq 0 (FALSE).
Final answer

Options (A), (B), (C)

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2025 Computer Science and Information Technology - Session 2 (CS2)
Question
49 of 65
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.