how floating point numbers work in C
- by hatorade
Let's say I have this:
float i = 1.5
in binary, this float is represented as:
0 01111111 10000000000000000000000
I broke up the binary to represent the 'signed', 'exponent' and 'fraction' chunks.
What I don't understand is how this represents 1.5.
The exponent is 0 once you subtract the bias (127 - 127), and the fraction part with the implicit leading one is 1.1.
How does 1.1 scaled by nothing = 1.5???