>  So, is zero the only number with zero exponent?
>
>  Hans Aberg

No, in 2 senses. First, the representation has 8 or 11 bits for the
exponent depending on whether it's single or double.  When all 8 or 11 bits
are 0, then the number represented is  0 if all of the mantissa bits are 0
(the sign bit is also significant). If the mantissa bits are not zero then
the number represented is a denormalized number. Denormalized numbers are
the smallest representable numbers, and exist to handle "gradual underflow".

Numbers whose actual exponent is 0 are represented with exponent bits of
01111111 or 01111111111 respectively. For example, 3/2 = 1.5e0 (decimal)
= 1.1e0 (binary)  is represented 0 01111111 1000000000000000000000
That's 0 (sign bit)
01111111 (exponent 0, boosted by 127)
10000000000000000000000 (mantissa, with leading bit of 1 implicit)


--
Scott Turner
[EMAIL PROTECTED]     http://www.ma.ultranet.com/~pkturner/


Reply via email to