[Cst-1b] numerical analysis 98/3/10

M.Y.W.Y.B. mywyb2@hermes.cam.ac.uk
Tue, 30 May 2000 11:08:50 +0100


--On Dienstag, 30. Mai 2000, 10:37 +0100 "Phebe Mann"
<pm258@hermes.cam.ac.uk> wrote: 

> 
> 98/3/10
> 
> What are the bit patterns for :-
> 
> 1) 1.125 x 2^-31 (significand) and how to get it ?

1.125 = 1 + 1/8 = 1 + 1/2^3
ie in binary 1.001
so the bit pattern is 00100000
The bit pattern of the exponent is -31 + 127 = 96 = 1100000 binary
So the entire bit pattern is 
0|00100000|00...1100000

> 2) small representable number greater than 2^16 (exponent &
> significand) and how to get it ?

The exponent of 2^16 has the pattern 16 + 127 = 15 + 128 = 10001111 binary
The significand of 2^16 has pattern 00...00

So the smallest number > 2^16 has significand 00..01 and the same exponent.

The decimal value is (1+2^-8) x 2^16 = 2^16 + 2^8 < 2^17