See how computers store decimal numbers in binary across different precision standards.
Floating point numbers are stored like scientific notation in binary: (-1)S × 1.M × 2(E - Bias)
Notice how BFloat16 has the same sized green bar (Exponent) as Float32, whereas Float16 has a much smaller green bar but a slightly larger blue bar (Mantissa) than BFloat16.
The IEEE 754 Conversion Formula
This single bit acts as a switch for positivity. 0 → (+), 1 → (-).
Determines the magnitude. The stored integer is unsigned, so we subtract a Bias.
The precision bits. For normalized numbers, there is an implicit 1 before the decimal point.
Designed with ❤️