Digital Signal Processing Reference
In-Depth Information
M Z <
is an addition, we have 1
4, which means that we may need to right-shift
once to obtain the normalized mantissa, M Z , and at the same time increase E Z by one
to obtain E Z . If the effective operation is a subtraction, the result is 0
M Z | <
2.
For this case we might have to right-shift to obtain the normalized number, M Z ,and
correspondingly decrease the exponent to obtain E Z .
It should be noted that adding or subtracting sign-magnitude numbers is more
complex compared to adding or subtracting two's complement numbers as one
will have to make decisions based on the sign and the magnitude of the operators
to determine which the effective operation to be performed is. Also, in the case
of subtraction one needs to either determine which the largest magnitude is and
subtract the smaller from the larger or negate the result in the case it is negative.
≤|
5.4
Multiplication
The multiplication of two floating-point numbers (assumed to be in IEEE 754
binary32 format) is computed as
s Z M Z 2 E Z 127
s X M X 2 E X 127
s Y
M Y 2 E Y 127
Z
=(
1
)
=
XY
=(
1
)
(
1
)
(47)
where we see that
s Z =
s X
s Y
(48)
M Z =
M X M Y
(49)
E Z =
E X +
E Y
127
.
(50)
M Z <
As we have 1
4. Hence, it
may be required to shift M Z one position to the right to obtain the normalized value
M Z , which can be seen by comparing with ( 41 ) . If this happens one will also need
toadd1to E Z to obtain E Z .
This gives that the multiplication of two floating-point numbers corresponds to
one fixed-point multiplication, one fixed-point addition, and a simple normalizing
step after the operations.
For multiply-accumulate it is possible to use a fused architecture with the benefit
that the alignment of the operand to be added can be done concurrently with the
multiplication. In this way it is possible to reduce the delay for the total MAC
operation compared to using separate multiplication and addition. Furthermore,
rounding is only performed for the final output.
M X ,
M Y <
2 for normalized numbers, we get 1
Search WWH ::




Custom Search