Skip to content
Official PYQ · 2025

GATE CS 2025 Set 2 Q39 — Number Representations (Fixed and Floating Point)

Explain with AI

Three floating point numbers X,YX, Y, and ZZ are stored in three registers RX,RY\mathrm{R}_{\mathrm{X}}, \mathrm{R}_{\mathrm{Y}}, and RZ\mathrm{R}_{\mathrm{Z}}, respectively in IEEEIEEE 754754 single precision format as given below in hexadecimal:

RX=0xC1100000,RY=0x40C00000, and RZ=0x41400000\mathrm{R}_{\mathrm{X}}=0 \mathrm{xC} 1100000, \mathrm{R}_{\mathrm{Y}}=0 \mathrm{x} 40 \mathrm{C} 00000, \text{ and } \mathrm{R}_{\mathrm{Z}}=0 \mathrm{x} 41400000

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

Select all correct options
View worked solution

Answer: A;B;C

In the IEEE 754 single-precision floating-point representation, a 32-bit number is structured as:

  • Sign bit (SS): 1 bit
  • Biased Exponent (EE): 8 bits (with bias = 127)
  • Fraction (FF): 23 bits

The value of the number is given by: (−1)S×(1.F)2×2E−127(-1)^S \times (1.F)_2 \times 2^{E - 127}.

Let us decode the three register values:

  1. RX=0xC1100000\mathrm{R}_\mathrm{X} = \text{0xC1100000}
    Binary: 1⏟S 1000 0010⏟E 0010 0000 0000 0000 0000 000⏟F\underbrace{1}_{S} \ \underbrace{1000\ 0010}_{E} \ \underbrace{0010\ 0000\ 0000\ 0000\ 0000\ 000}_{F}
    S=1S = 1 (negative)
    E=13010E = 130_{10}
    F=0.0012=0.12510F = 0.001_2 = 0.125_{10}
    X=−1×(1+0.125)×2130−127=−1.125×8=−9X = -1 \times (1 + 0.125) \times 2^{130 - 127} = -1.125 \times 8 = -9
  2. RY=0x40C00000\mathrm{R}_\mathrm{Y} = \text{0x40C00000}
    Binary: 0⏟S 1000 0001⏟E 1000 0000 0000 0000 0000 000⏟F\underbrace{0}_{S} \ \underbrace{1000\ 0001}_{E} \ \underbrace{1000\ 0000\ 0000\ 0000\ 0000\ 000}_{F}
    S=0S = 0 (positive)
    E=12910E = 129_{10}
    F=0.12=0.510F = 0.1_2 = 0.5_{10}
    Y=1×(1+0.5)×2129−127=1.5×4=6Y = 1 \times (1 + 0.5) \times 2^{129 - 127} = 1.5 \times 4 = 6
  3. RZ=0x41400000\mathrm{R}_\mathrm{Z} = \text{0x41400000}
    Binary: 0⏟S 1000 0010⏟E 1000 0000 0000 0000 0000 000⏟F\underbrace{0}_{S} \ \underbrace{1000\ 0010}_{E} \ \underbrace{1000\ 0000\ 0000\ 0000\ 0000\ 000}_{F}
    S=0S = 0 (positive)
    E=13010E = 130_{10}
    F=0.12=0.510F = 0.1_2 = 0.5_{10}
    Z=1×(1+0.5)×2130−127=1.5×8=12Z = 1 \times (1 + 0.5) \times 2^{130 - 127} = 1.5 \times 8 = 12

Now we evaluate the given options:

  • Option A: 4(X+Y)+Z=4(−9+6)+12=4(−3)+12=04(X+Y)+Z = 4(-9+6)+12 = 4(-3)+12 = 0 (Correct)
  • Option B: 2Y−Z=2(6)−12=02Y-Z = 2(6)-12 = 0 (Correct)
  • Option C: 4X+3Z=4(−9)+3(12)=−36+36=04X+3Z = 4(-9)+3(12) = -36+36 = 0 (Correct)
  • Option D: X+Y+Z=−9+6+12=9≠0X+Y+Z = -9+6+12 = 9 \neq 0 (Incorrect)

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Number Representations (Fixed and Floating Point) questions