GATE / CS ARCHIVE

GATE CSE 2021 SET 1 / QUESTION 24

GATE CSE 2021 Set 1 Q24

Computer Organization & Architecture · Data Representation & Arithmetic · Full GATE CSE 2021 Set 1 paper

GATE 2021 Set 1, Q24 1 mark · NAT
Report issue

Data Representation & Arithmetic

Question 24, GATE 2021: In IEEE 754 single precision (bias 127), S=1, E=10000001, F=11110000000000000000000. Find the represented decimal value, rounded to two decimal places.
Tap to enlarge
Answer & solution

Official answer: -7.75 to -7.75

Our answer: -7.75

Step through it (5 steps)

The sign is negative. The exponent field 10000001₂=129 gives exponent 2 after subtracting bias 127. The significand is 1.1111₂=31/16. Hence value=−(31/16)·2²=−31/4=−7.75.

For a normalized single-precision number the formula is (−1)S(1.F)_2×2E−127. The stored fraction is .1111₂=1/2+1/4+1/8+1/16=15/16; the hidden leading 1 gives 31/16. E=129 is neither zero nor all ones, so neither subnormal nor infinity/NaN rules apply. Multiplication by 4 yields 7.75, and the sign bit makes it negative.

Original paper, page 22 · Answer key