IEEE floating point encodings on the Intel architecture
In each floating point
format,
several classes of floating point "numbers"
are supported.
The [exponent] is used to to differentiate the different
"numbers".
Most "numbers" are normalised numbers.
Two values of the [exponent] are reserved to allow the representation
of special "numbers".
The reserved exponents have bits which are all '1's,
or all '0's.
The special "numbers" are:
A number with any exponent except the two reserved cases
(all '1's, and all '0's) represents a normalised number.
The exception is the extended precision numbers which must
also have a '1' in the most significant bit of the significand.
Single precision example (-0.1):
[sign] [exponent] [significand]
1 bit 8 bits 23 bits
1 01111011 10011001100110011001101
A zero has '0's in all bits of the exponent and all bits of the
significand.
The sign may be '0' (for +0.0) or '1' (for -0.0).
Single precision example (+0.0):
[sign] [exponent] [significand]
1 bit 8 bits 23 bits
0 00000000 00000000000000000000000
An infinity has '1's in all bits of the exponent and
'0's in all bits of the significand.
The sign bit may be '0' (for +infinity), or '1'
(for -infinity).
The exception is an extended precision infinity, which has
a '1' in the most significant bit of the significand.
Single precision example (+infinity):
[sign] [exponent] [significand]
1 bit 8 bits 23 bits
0 11111111 00000000000000000000000
A NaN (Not a Number) has '1's in all bits of the exponent
but is not an infinity.
(An extended precision NaN has a '1' in the most significant
bit of the significand).
Single precision example:
[sign] [exponent] [significand]
1 bit 8 bits 23 bits
0 11111111 10000000000000000000000
A denormal has '0's in all bits of the exponent
but is not a zero.
(In addition, an extended precision denormal has
a '0' in the most significant
bit of the significand).
Single precision example (+5.87747e-39):
[sign] [exponent] [significand]
1 bit 8 bits 23 bits
0 00000000 10000000000000000000000
Denormals
There is a lower limit and an upper limit to the values
which can be represented by a normalised encoding in a given format.
Denormals represent numbers smaller than the
value of the smallest normalised number
(the values represented by denormals in the extended precision format