How do 24 significant bits give from 6 to 9 significant decimal digits?

was reading IEEE 754 single-precision binary floating-point format: binary32 when I ran into

The IEEE 754 standard specifies a binary32 as having:

• Sign bit: 1 bit
• Exponent width: 8 bits
• Significand precision: 24 bits (23 explicitly stored)

This gives from 6 to 9 significant decimal digits precision

I'm not really sure how this was calculated. could you please explain?

• You could start with $2^{23}=8388608 \lt 10^{7}$ – Henry Aug 22 '15 at 7:43
• @Henry could you please elaborate more? I understand that the maximum decimal value that can be represented with 23 bits is <= 7 digits long. but still can't connect the dots. – Kareem Aug 22 '15 at 8:17
• @Kareem: How many different values can you represent with 23 bits? – celtschk Aug 22 '15 at 8:38
• @celtschk 8388608. – Kareem Aug 22 '15 at 8:39

Firstly, $\log_2(10) \approx 3.32$, so you need about that many bits per digit. So, you'd expect about $24/\log_2(10) \approx 7.2$ digits of precision, but that misses the trickiness here. For instance, consider the IEEE number $2^0 \times 1.000 000 000 000 000 000 000 00$ where we interpret the representation as being in binary. We would typically render this as $1.0$, but how many $0$s can we actually guarantee?
Well, that number could represent anything in the interval $[1 - 2^{-24}, 1+ 2^{-24}= 1.0000000596)$ so, we're okay to $7$ significant figures here.