1. Mantissa, exponent and bit allocation
A binary floating-point real number is stored as a mantissa and an exponent, both in two's complement form. The mantissa is a binary fraction with the binary point just after its sign bit. The exponent says how many places the binary point moves.
With a fixed total number of bits, the split matters. More bits for the mantissa gives more precision. More bits for the exponent gives a larger range of numbers. Gaining one costs the other.
The largest positive mantissa is `0` followed by all `1`s. The largest positive exponent is also `0` followed by all `1`s.
value = mantissa × 2^(exponent)
Worked example 12 marks
Describe the effect of changing the allocation of bits used for the mantissa and for the exponent in a floating-point number with a fixed total number of bits.
- 1
When the number of bits in the mantissa is raised, the precision / accuracy of the number increases (lowered: it reduces) [1]
- 2
When the number of bits in the exponent is increased, the range of numbers that can be represented increases (reduced: the range is reduced) [1]