1And in Conclusion¶
The IEEE 754 standard defines a binary representation for floating point values using three fields.
The sign determines the sign of the number ( for positive, for negative).
The exponent is in biased notation. For instance, the bias is , which comes from for single-precision floating point numbers. For double-precision floating point numbers, the bias is . An exponent of
00000000represents a denormalized number and an exponent of11111111represents either NaN, if there is a non-zero mantissa, or infinity, if there is a zero mantissa.The significand is used to store a fraction instead of an integer and refers to the bits to the right of the leading “
1” when normalized. For example, if a mantissa is1.010011, its significand is010011.
Figure 3 shows the bit breakdown for the single-precision (32-bit) representation. The leftmost bit is the MSB, and the rightmost bit is the LSB.
For normalized floats:
For denormalized floats, including zero:
Table 1 shows that the IEEE 754 exponent field has values from 0 to 255. When translating between binary and decimal floating point values, we must remember that there is a bias for the exponent.
2Textbook Readings¶
P&H 3.5, 3.9