Computer Arithmetic
How are the bits of an IEEE 754 single-precision (32-bit) number allocated among sign, exponent and significand?
- A1, 11, 20
- B1, 8, 23
- C1, 5, 26
Show answer and explanation
Answer: B. 1, 8, 23
Single precision (FP32) uses 1 sign bit, 8 exponent bits and 23 significand bits, 32 in total. For normalized numbers the leading 1 of the significand is implied, so precision is 24 bits, about seven decimal digits. Double precision (FP64) uses 1, 11 and 52 bits, with a wider exponent and higher precision. 1, 11, 20 confuses it with double precision's exponent width, and 1, 5, 26 with half precision's.
- A. An 11-bit exponent is the double-precision width.
- B. Correct. 1 sign, 8 exponent and 23 significand bits.
- C. A 5-bit exponent is the half-precision (FP16) width.