GATE / CS ARCHIVE

GATE CSE 2017 SET 2 / QUESTION 12

GATE CSE 2017 Set 2 Q12

Computer Organization & Architecture · Data Representation & Arithmetic · Full GATE CSE 2017 Set 2 paper

GATE 2017 Set 2, Q12 1 mark · MCQ
Report issue

Data Representation & Arithmetic

Question 12, GATE 2017: A 32-bit IEEE-754 single-precision number has bits 00111110011011010000000000000000 (sign/exponent/fraction: 0 | 01111100 | 11011010000000000000000). Which listed decimal value is closest? A:1.45×10¹. B:1.45×10^-1. C:2.27×10^-1. D:2.27×10¹.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Step through it (6 steps)

1. For a normal single-precision number, value=(-1)^sign × (1.fraction)₂ × 2stored exponent-127. Here sign=0, exponent 01111100₂=124, and the exponent is therefore -3.

2. The significand is 1+2-1+2-2+2-4+2-5+2-7=1.8515625. Multiplication by 2-3 gives 0.2314453125.

3. Compare the offered approximations rather than requiring an exact match. Its distance from 0.227 is 0.0044453125, much less than its distance from 0.145; 14.5 and 22.7 are far away. Hence C. The hidden leading 1 and exponent bias are both essential.

Original paper, page 5 · Answer key