I am trying to understand the following:
For example the number $-2.5 = -1*1.25*2^1$ is strored as:
$S = 1$, Exponent $= 1+127 = 128$, Mantissa = $0.25 $
This got me. How do you connect all these numbers to yield $-2.5$ ?
I am trying to understand the following:
For example the number $-2.5 = -1*1.25*2^1$ is strored as:
$S = 1$, Exponent $= 1+127 = 128$, Mantissa = $0.25 $
This got me. How do you connect all these numbers to yield $-2.5$ ?
If you are given a sign bit $S$, 127-offset exponent $e$, and mantissa $m$, you calculate the value as
$$(-1)^S2^{e - 127}(1 + m)$$
So for your values $S=1$, $e=128$, and $m=0.25$,
$$(-1)^1 2^{128-127}(1 + 0.25) = -2.5$$