GATE 2020 CS – Question 39
Consider three registers R1, R2, and R3 that store numbers in IEEE-754 single precision floating point format. Assume that R1 and R2 contain the values (in hexadecimal notation) 0x42200000 and 0xC1200000, respectively.
If $R3=\frac{R1}{R2}$, what is the value stored in R3?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (B) 0xC0800000
Explanation
In single precision, the value is $(-1)^s(1.f)2^{E-127}$ for these normalized operands.
For `0x42200000`, the sign is 0, the exponent is 132, and the fraction gives $1.f=1.25$. Its value is $1.25(2^5)=40$.
For `0xC1200000`, the sign is 1, the exponent is 130, and $1.f=1.25$. Its value is $-1.25(2^3)=-10$.
The quotient is $-4=-1.0(2^2)$. Encoding sign 1, exponent $129$ and fraction zero gives **0xC0800000**.
More Number Representation and Floating Point Arithmetic questions
- GATE 2018 CS Q43
- GATE 2014 CS (CS2) Q55
- GATE 2026 CS (CS1) Q22
- GATE 2026 CS (CS1) Q36
- GATE 2026 CS (CS2) Q28
- GATE 2026 CS (CS2) Q34
All Number Representation and Floating Point Arithmetic questions →