Representing Numbers in the Floating-Point Format
Let's convert the numbers (1) $5$ (2) $-18$ (3) $0.5$ (4) $-0.25$ (5) $0.375$ to our floating-point number representation:
- Analysis for $5$: (1) it is positive, so the sign bit will be $0$. (2) We know that $5_{10} = 101_2$, but since the significand represents a fraction form (i.e., $0.1xxxx\dots$,) we need to shift the digits of $101_2$ several times to the right while increasing the exponent by $1$ each time we shift: $101 \times 2^0 = 10.1 \times 2^1 = 1.01 \times 2^2 = 0.101 \times 2^3$. As such, the significand will be $10100$. (3) Finally, for the exponent, we stopped at $2^3$, whose exponent is $3$. When we add the bias of $15$, we get $3 + 15 = 18$, which makes our exponent equal to $10010$. The number $5$, therefore, in its floating-point form is:
+---+ +---+---+---+---+---+ +---+---+---+---+---+
| 0 | | 1 | 0 | 0 | 1 | 0 | | 1 | 0 | 1 | 0 | 0 | = 5_{10}
+---+ +---+---+---+---+---+ +---+---+---+---+---+
Question: Is the floating-point representation for $5$ above normalized or not? Explain why.