Digital Signal Processing Reference
In-Depth Information
EXAMPLE 9.5
Convert the Q-15 signed number 0.100011110110010 to the decimal number.
Solution:
The decimal number is
2 1 þ 2 5 þ 2 6 þ 2 7 þ 2 8 þ 2 10 þ 2 11 þ 2 14 ¼ 0:560120
As we know, the truncation error in Example 9.2 is less than 2 15 ¼ 0:000030517. We verify that the truncation
error is bounded by
j0:560120 0:560123j ¼ 0:000003 < 0:000030517
Note that the larger the number of bits used, the smaller the truncation error that may accompany it.
Examples 9.6 and 9.7 are devoted to illustrating data manipulations in the Q-15 format.
EXAMPLE 9.6
Add the two numbers in Examples 9.4 and 9.5 in Q-15 format.
Solution:
Binary addition is carried out as follows:
1: 110101110000010
þ 0: 100011110110010
10: 011001100110100
Then the result is
0: 011001100110100
This number in decimal form is
2 2 þ 2 3 þ 2 6 þ 2 7 þ 2 10 þ 2 11 þ 2 13 ¼ 0:400024
EXAMPLE 9.7
This is a simple illustration of fixed-point multiplication.
Determine the fixed-point multiplication of 0.25 and 0.5 in Q-3 fixed-point 2's complement format.
Solution:
Since 0.25 ¼ 0.010 and 0.5 ¼ 0.100, we carry out binary multiplication as follows:
0 : 010
0 : 100
0000
0000
0010
þ 0000
0:001000
Search WWH ::




Custom Search