GATE / CS ARCHIVE

GATE CSE 2024 SET 2 / QUESTION 14

Recognize the reserved IEEE exponent pattern

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

GATE 2024 Set 2, Q14 1 mark · MCQ
Report issue

Data Representation & Arithmetic

Question 14, GATE 2024: Choose the largest numeric IEEE 754 binary32 value among these sign/exponent/fraction fields. All signs are 0. A exponent 01111111, 23 fraction bits all 1; B exponent 11111110, fraction all 1; C exponent 11111111, fraction all 1; D exponent 01111111, fraction all 0.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Step through it (6 steps)

Approach: Classify special encodings before comparing the ordinary positive values.

1. Derivation. For a normal binary32 value the magnitude is(1+fraction)×2E−127. B has the largest finite exponent 254 and an all-one fraction, giving(2−2⁻²³)×2¹²⁷, the largest finite positive binary32 value. A is just below 2; D is 1. C has exponent 255 and a nonzero fraction, so it is NaN, not a larger number. Answer B.

2. Explanation and checks. An all-ones exponent is reserved: a zero fraction would encode positive infinity, but the nonzero fraction in C encodes NaN. NaN is unordered and is not a numeric maximum. For B the biased exponent 254 becomes 127, and the fraction sum is 1−2−23, giving significand 2−2−23. A instead has actual exponent zero, and D has both exponent zero and fraction zero, so both are much smaller.

Original paper, page 11 · Answer key