Digital Signal Processing Reference
In-Depth Information
Table 3.4 Value calculated by parsing and then computing the value of each field to get the final value,
þ 14.5 10 (see text)
Sign bit
Exponent
Mantissa
0
10000010
11010000_00000000_0000000
( 1) 0
2 (130 127)
(1 . 1 1 0 1) 2
2 (3)
1
(1 þ 0.5 þ .25 þ 0 þ 0.0625) 10
2 (3)
( þ 1)
(1.8125) 10
A floating-point number can also overflow if its exponent is greater or smaller than the maximum
or minimum value the e-field can represent. For IEEE single-precision floating point format, the
minimum to maximum exponent ranges from 2 126 to 2 127 . On the same account, allocating 11 bits
in the e-field as opposed to 8 bits for single-precision numbers, minimum and maximum values of
a double-precision floating-point number ranges from 2 1022 to 2 1023 .
Although the fields in the format can represent almost all numbers, there are still some special
numbers that require unique handling. These are:
value
1
8
23
s
e
m
+ ¥
− ¥
0_11111111_00000000000000000000000
1_11111111_00000000000000000000000
1_11111111_10000000000000000000000
NAN
A 1 may be produced if any floating-point number is divided by zero, so 1.0/0.0 ¼þ1 .
Similarly,
1.0/0.0
¼1
. Not A Number (NAN) is produced for an invalid operations like 0/0 or
11 .
3.4.1 Normalized and Denormalized Values
The floating-point representation covers a wide dynamic range of numbers. There is an extent where
the number of bits in the mantissa is enough to represent the exact value of the floating-point number
and zero placed in the exponent. This range of values is termed denormalized. Beyond this range, the
representation keeps normalizing the number by assigning an appropriate value in the exponent
field. A stage will be reached where the number of bits in the exponent is not enough to represent the
normalized number and results in þ1 or 1 . In instances where awrong calculation is conducted,
the number is represented as NAN. This dynamic range of floating-point representation is shown in
Figure 3.3.
In the IEEE format of floating-point representation, with an implied 1 in the mantissa and a
nonzero value in the exponent, where all bits are neither 0 nor 1, are called normalized values.
Denormalized values are values where all exponent bits are zeros and the mantissa is non-zero.
-
-0
+0
+
- Normalized
- Denormalized
+ Denormalized
+ Normalized
Figure 3.3 Dynamic range of a floating-point number
Search WWH ::




Custom Search