Why an offset is calculated as $(2^{n-1} - 1)$ instead of $\,2^{n-1}\, $ for floating point?

134 Views Asked by At

This question is not about two's complement, it's about offset binary.

I'm trying to understand why offset K in binary offset notation is calculated as $2^{n-1}-1$ instead of $2^{n-1}$ in the IEEE-754 floating point exponent represenation. Here is my reasoning for $2^{n-1}$.

Four bits can represent values in the range $[-8;7]$, so $0000$ represents $-8$. An offset from zero here is $8$ and can be calculated as $2^{n-1}$. Using this offset we can define representation of any number, for example, the number $3$.

What number do we need to add to $-8$ to get $3$? It's $11$, so $3$ in offset binary is represented as $1011$. And the formula seems to be number to represent + offset.

However, the formula in a floating point calculation is number to represent + offset - $1$, and so the correct representation is $1010$. Can someone please explain why we also subtract additional one?