Digital Signal Processing Reference
In-Depth Information
Table 10.4: Converting from a decimal fraction to xed-point binary.
fractional
number
number2
whole part
0.1
0.2
0
0.2
0.4
0
0.4
0.8
0
0.8
1.6
1
0.6
1.2
1
0.2
0.4
0
converted to xed-point binary is:
0100110:00011:
What if we want to store this value as a oating-point number? The Institute
of Electrical and Electronics Engineers has a standard for oating-point storage in
32 or 64 bits, commonly called the IEEE 754 standard [38]. We break the binary
representation into three elds: the sign bit, the signicand, and the exponent.
(The signicand may also be called by the older name of mantissa.) In other words,
the number appears assignicand2
exponent . Of course, the size of the storage
word directly aects precision; in the IEEE 754 standard, we label the precision
the number of bits used to represent the signicand. As the example above shows,
the signicand that we store depends upon the precision. With 32 bits for the
entire oating-point representation (called single precision), we use 23 bits for the
signicand. When we have a 64-bit word (double precision), we use 52 bits for it.
One bit stores the sign, and the remaining bits store the exponent. Therefore, the
exponent will consist of 8 or 11 bits, according to the precision.
You may also see the precision given as 24 bits and 53 bits, respectively. The
one bit dierence comes from the \hidden" bit, which is not explicitly stored [38].
Remember that the signicand consists only of 0s and 1s, and the magnitude of each
bit depends on the exponent. For example, 0:12 0 has the same value as 1:02
1 .
We can always make the rst bit a 1 by altering the exponent, so why not require
it? This way, we do not need to store that bit. The IEEE 754 standard uses this
strategy.
One nal note about the IEEE 754 standard is that the exponent ranges from
126 to +127 (for an 8-bit exponent), or1022 to +1023 (for 11-bit exponents).
Search WWH ::




Custom Search