GATE 2025 CS (CS2) – Question 49
Three floating point numbers $X, Y$, and $Z$ are stored in three registers $R_X$, $R_Y$, and $R_Z$, respectively in IEEE 754 single precision format as given below in hexadecimal:
$R_X$ = 0xC1100000, $R_Y$ = 0x40C00000, and $R_Z$ = 0x41400000
Which of the following option(s) is/are CORRECT?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (A) $4(X + Y) + Z = 0$; (B) $2Y - Z = 0$; (C) $4X + 3Z = 0$
Explanation
Decode IEEE-754 single precision (1 sign, 8 exponent with bias 127, 23 fraction).
- $R_X=\texttt{0xC1100000}=1\,10000010\,0010\ldots$: sign $-$, exponent $130-127=3$, mantissa $1.001_2=1.125$. $X=-1.125\times8=-9$.
- $R_Y=\texttt{0x40C00000}=0\,10000001\,100\ldots$: exponent $129-127=2$, mantissa $1.1_2=1.5$. $Y=1.5\times4=6$.
- $R_Z=\texttt{0x41400000}=0\,10000010\,100\ldots$: exponent 3, mantissa 1.5. $Z=1.5\times8=12$.
Check the options:
- (A) $4(X+Y)+Z=4(-3)+12=0$. True.
- (B) $2Y-Z=12-12=0$. True.
- (C) $4X+3Z=-36+36=0$. True.
- (D) $X+Y+Z=9\ne0$. False.
Answer: A, B, C.
More Number Representation and Floating Point Arithmetic questions
- GATE 2024 CS (CS1) Q13
- GATE 2024 CS (CS2) Q14
- GATE 2023 CS Q45
- GATE 2022 CS Q41
- GATE 2020 CS Q39
- GATE 2018 CS Q43
All Number Representation and Floating Point Arithmetic questions →