約 1 分鐘閱讀
IEEE 754

f32 = sign(−1 or 1)×2^(exponent−127) ×1.mantissa(fraction)
| 1 bit | 8 bit | 23 bit |
| sign | exponent | fraction |
to represent a floating number 8.5 first, we need to do a normalization
8.5 -> 8 + 0.5 -> 2^3 + (1/2)^1 -> 1000.1 (in two digit) -> +1 * 2^3 * 1.0001
+ is positive so the sign is 0
2^3 -> 3 + 127 -> 1000 0010 (exponent part)
1.0001 -> 0001 is corresponding to the fraction part. -> 0001 0000 0000 0000 0000 000