GATE / CS ARCHIVE

SIMILAR QUESTIONS / COMPUTER ORGANIZATION & ARCHITECTURE

Decode normalized IEEE binary32 values

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

How these are solved

Separate sign, biased exponent and fraction, restore the implicit leading one for normal values, and evaluate the signed power-of-two value. The 2012 variant recognizes fields for a given simple value and uses unbiased exponent wording; the others decode a supplied bit pattern.

1 mark · NAT
Report issue

Decoding an IEEE-754 bit pattern

Data Representation & Arithmetic

Question 34, GATE 2026: Decode hexadecimal 0xC2710000 as IEEE-754 binary32 and give its decimal value to two decimal places.
Tap to enlarge
Answer & solution

Official answer: -60.25 to -60.25

Our answer: -60.25

Step through it (6 steps)

Givens and goal

Decode hexadecimal 0xC2710000 as IEEE-754 binary32 and give its decimal value to two decimal places.

Approach

Extract sign, biased exponent, and fraction separately.

Step-by-step solution

1. The 32 bits are 11000010011100010000000000000000. Their binary32 split is sign 1 | exponent 10000100 | fraction 11100010000000000000000.
2. The sign contributes −1. The exponent field is 132, so the unbiased exponent is e=132−127=5. Since the exponent is neither all zero nor all one, use the normalized significand 1.f.
3. The fraction bits contribute 1/2+1/4+1/8+1/128=113/128. Thus the significand is 1+113/128=241/128.
4. The value is −(241/128)×2⁵=−241/4=−60.25. This value is exact, so rounding to two decimal places leaves −60.25. Do not interpret the entire 32-bit word as a two’s-complement integer; IEEE-754 uses separate fields.

Original paper, page 23 · Answer key

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

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

1 mark · MCQ
Report issue

IEEE single-precision representation of one half

Data Representation & Arithmetic

Question 7, GATE 2012: The decimal value 0.5 in IEEE single precision floating point representation has
        (A) fraction bits of 000…000 and exponent value of 0
        (B) fraction bits of 000…000 and exponent value of −1
        (C) fraction bits of 100…000 and exponent value of 0
        (D) no exact representation
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Step through it (6 steps)

Normalize 0.5 as 1.0₂×2−1. The fractional field after the implicit leading 1 is all zeros; the actual unbiased exponent is −1. Thus B uses the mathematical exponent convention. For clarity, the stored biased exponent is −1+127=126, binary 01111110, and the full 32-bit encoding is 0x3F000000. The exponent field itself is not a signed −1.

Check: The single-precision format has one sign bit, eight exponent bits, and 23 stored fraction bits. Here the sign is 0, the exponent field is 01111110, and every fraction bit is 0; binary fractions with denominator a power of two can be exact.

Original paper, page 3 · Answer key