Computer Arithmetic
What is the largest finite value representable in FP16 (1 sign, 5 exponent bits with bias 15, 10 significand bits)?
- A32768
- B65536
- C65504
Show answer and explanation
Answer: C. 65504
An all-ones exponent (31) is reserved for infinity and NaN, so the maximum exponent field is 30, giving a true exponent of 30 − 15 = 15. With an all-ones significand, the value is (1 + 1 − 2⁻¹⁰) × 2¹⁵ = (2 − 2⁻¹⁰) × 32768 = 65536 − 32 = 65504. Anything larger becomes infinity, so overflow must also be watched when training in FP16. 32768 is 2¹⁵ with a zero significand, and 65536 is 2¹⁶; neither is the maximum.
- A. 32768 is 2¹⁵ with a zero significand.
- B. 65536 is 2¹⁶, which FP16 cannot represent.
- C. Correct. (2 − 2⁻¹⁰) × 2¹⁵ = 65504.