[Cst-1b] numerical analysis 98/3/10
M.Y.W.Y.B.
mywyb2@hermes.cam.ac.uk
Tue, 30 May 2000 11:25:57 +0100
--On Dienstag, 30. Mai 2000, 11:27 +0100 spj23@cam.ac.uk wrote:
> hi
>
> i was just wondering about the answer to the first one - this is how i
> thought you did it...
>
> it's a normalised number as it's 1.x so we don't worry about
> the 1 as it's taken care of in the hidden bit.
>
> 0.125 is an eighth, ie 2^-3, so in total we get 2^(-3-31) = 2^(-34)
> we store exponents as e + eMAX, so store the exponent as -34+127 = 93
> so _I_ THINK the answer is
> 0 for the sign bit
> 93 in binary for the exponent
> 0 for the significand
>
> ??? thanks
You can't just ignore the hidden bit and calculate without it:
you get 2^(-34) which is clearly strictly less than the required
1.125 x 2^-31
= (1 + 2^-3) x 2^-31
= 2^(-34) + 2^(-31)
Mo