GATE / CS ARCHIVE

SIMILAR QUESTIONS / COMPUTER ORGANIZATION & ARCHITECTURE

Test equations after decoding IEEE registers

2 questions solved the same way, newest first. Back to Computer Organization & Architecture

How these are solved

Decode each of three binary32 hexadecimal registers to an exact signed value, then evaluate the supplied equations/inequality. 2022 selects the false claim;

2 marks · MSQ
Report issue

Data Representation & Arithmetic

Question 49, GATE 2025: IEEE 754 binary32 registers hold RX=0xC1100000, RY=0x40C00000, RZ=0x41400000, representing numbers X,Y,Z. Select true equations.
A. 4(X+Y)+Z=0. B. 2Y−Z=0. C. 4X+3Z=0. D. X+Y+Z=0.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: A, B, C

Step through it (9 steps)

For a normal binary32 number, value=(−1)s·(1+f/223)·2e−127, where s is the sign bit, e the 8-bit biased exponent, and f the 23-bit fraction integer.

RX has s=1, e=130, and f=0x100000=220. Its fractional contribution is 220/223=1/8, so X=−(1+1/8)·23=−9. RY has s=0,e=129,f=0x400000=222, giving Y=(1+1/2)·22=6. RZ has s=0,e=130 and the same fraction, giving Z=(1+1/2)·23=12.

Now evaluate the choices directly: A gives 4(−9+6)+12=−12+12=0; B gives 2·6−12=0; C gives 4·(−9)+3·12=−36+36=0. D gives −9+6+12=9, not zero. These small integer values and intermediate results are exactly representable, so floating-point rounding does not change the conclusions. Select A,B,C.

Original paper, page 38 · Answer key

2 marks · MCQ
Report issue

Data Representation & Arithmetic

Question 41, GATE 2022: IEEE-754 binary32 register patterns for A,B,C are C1400000,42100000,41400000 (hex). Which is false? A A+C=0; B C=A+B; C B=3C; D B−C>0.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Step through it (9 steps)

Decode the binary32 values: 0xC1400000 has sign 1, exponent 130 and significand 1.5, giving −12. 0x42100000 has exponent 132 and significand 1.125, giving 36. 0x41400000 gives 12. Therefore C=A+B is false, since 12≠−12+36=24. The other offered relations hold, so B.

For normalized binary32, value=(−1)^sign ×(1+fraction/223)×2exponent−127. A has unbiased exponent 3 and fraction 0.5: −1.5×8=−12. B has exponent 5 and fraction 0.125: 1.125×32=36. C is +12. Thus A+C=0, B=3C, and B−C=24>0.

Original paper, page 27 · Answer key