Computer Arithmetic
In IEEE 754 single precision, if the stored exponent field is 130, what is the actual exponent (power of two)?
- A3
- B130
- C2
Show answer and explanation
Answer: A. 3
To allow negative exponents, the exponent field stores the true exponent plus a bias. The single-precision bias is 127, so the actual exponent is 130 − 127 = 3, multiplying the significand by 2³ = 8. A stored 127 means 2⁰ = 1, and 1 means 2⁻¹²⁶. Stored values 0 and all ones (255) are reserved for subnormals and for infinity and NaN. Taking 130 as the exponent forgets the bias.
- A. Correct. 130 − 127 = 3.
- B. 130 is the stored value before removing the bias.
- C. 2 results from taking the bias as 128.