Data Types
UNROUNDED VALUE:
X X X X X X X X
ADD 1 AND CARRY:
.
.
.
.
.
.
.
A0 BIT 16 = 1:
X X X X X X X X
ROUNDED VALUE:
X X X X X X X X
A0.X
Figure 2-8. Avoiding Net Bias in Unbiased Multiplier Rounding
Biased Rounding
The round-to-nearest method also returns the number closest to the origi-
nal. However, by convention, an original number lying exactly halfway
between two numbers always rounds up to the larger of the two. For
example, when rounding the 3-bit, two's-complement fraction 0.25
(binary 0.01) to the nearest 2-bit, two's-complement fraction, this method
returns 0.5 (binary 0.1). The original fraction lies exactly midway between
0.5 and 0.0 (binary 0.0), so this method rounds up. Because it always
rounds up, this method is called biased rounding.
2-22
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
X X X X X X X X 0 1 1 0 0 1 1 0
.
.
.
.
.
.
.
.
.
.
X X X X X X X X 0 1 1 0 0 1 1 1
X X X X X X X X 0 1 1 0 0 1 1 0
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
.
.
.
.
.
.
.
1
.
.
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
A0.W
.
.
.
.
.
.
.
.
.
.
.
.
.