Scientific notation with 5 significant figures:
4.2643 × 10⁷
Scientific notation in base 2 with 17 significant binary figures: 1.0100010101010111₂ × 2²⁵
Let's pack this in a fixed-length datatype. Note that 011001₂ is the binary encoding of 25. 1 0100010101010111 011001
1 mantissa exp.
This doesn't suffice becausea. We're wasting a bit on the leading 1.
b. We want to support negative values.
c. We want to support negative exponents.
d. It would be nice if values of the same sign sorted by their representation.
The leading 1 can be dropped and replaced with a sign bit (0 for "+", 1 for "-"). The exponent can have 100000₂ subtracted from it, so 011001₂ represents 25-32, or -7, and 111001₂ represents 25. Sorting can be handled by putting the exponent before the mantissa.
Thus we get to a traditional floating point representation.
0 111001 0100010101010111
± exp. mantissa
Real floating point has a little more on top (infinities, standardised field sizes, etc.) but is fundamentally the same.