previous | start | next

The exponent bias

For 32 bit IEEE floating point numbers:

s:     sign field = 1 bit
e: exponent field = 8 bits
f: fraction field = 23 bits

The exponent field, e, is treated as an unsigned integer.

The actual exponent, E, is given by

      E = e - bias (normalized)
    
      E = 1 - bias (denormalized)

where bias = 28 - 1 - 1 = 127

Note that this means to get the exponent field e for normalized value:

      e = E + bias

and for denormalized e is always 0.

In binary bias is:    0111 1111       (or in hex: 0x7f)

(Positive) denormalized values are < 2-126 ~ .0000.....1754 (with 37 0's)

0 is denormalized

But 100.5 is definitely normalized, not denormalized.



previous | start | next