Binary Fractions
Multiplying Binary Fractions
When the C28x performs multiplication, the process is identical for all operands, integers or
fractions. Therefore, the user must determine how to interpret the results. As before, consider the
4-bit multiply example:
Four
Four
-
-
Bit Multiplication
Bit Multiplication
0100
0100
x 1101
x 1101
0000
0000
0100
0100
000
000
0000
0000
00
00
0100
0100
1
1
1100
1100
1
1
1110100
1110100
11110100
11110100
11110100
1/2
1/2
x
x
-
-
3/8
3/8
-
-
3/16
3/16
Accumulator
Accumulator
.
.
.
.
Data Memory
Data Memory
-
-
1/4
1/4
1110
1110
.
.
As before, consider the following:
•
What are the two input values and the expected result?
•
As before, “partial products” are shifted left and the final is negative.
•
How is the result (obtained when adding the partial products) read?
•
How shall this result be loaded into the accumulator?
•
How shall we fill the remaining bit? Is this value still the expected one?
•
How can the result be stored back to memory? What problems arise?
To “read” the result of the fractional multiply, it is necessary to locate the binary point (the base 2
equivalent of the base 10 decimal point). Start by identifying the location of the binary point in
the input values. The MSB is an integer and the next bit is 1/2, therefore, the binary point would
be located between them. In our example, therefore, we would have three bits to the right of the
binary point in each input value. For ease of description, we can refer to these as “Q3” numbers,
where Q refers to the number of places to the right of the point.
When multiplying numbers, the Q values
add
. Thus, we would (mentally) place a binary point
above the sixth LSB. We can now calculate the “Q6” result more readily.
C28x - Numerical Concepts & IQmath
8 - 9
Summary of Contents for C28 Series
Page 64: ...Summary 3 16 C28x Peripheral Registers Header Files ...
Page 78: ...Interrupt Sources 4 14 C28x Reset and Interrupts ...
Page 218: ...Lab 9 DSP BIOS 9 22 C28x Using DSP BIOS ...
Page 244: ...Lab 10 Programming the Flash 10 26 C28x System Design ...
Page 273: ...Appendix A eZdsp F2812 C28x Appendix A eZdsp F2812 A 1 ...
Page 276: ...Appendix P2 Expansion Interface A 4 C28x Appendix A eZdsp F2812 ...
Page 277: ...Appendix P4 P8 P7 I O Interface C28x Appendix A eZdsp F2812 A 5 ...
Page 278: ...Appendix A 6 C28x Appendix A eZdsp F2812 ...
Page 279: ...Appendix P5 P9 Analog Interface C28x Appendix A eZdsp F2812 A 7 ...
Page 282: ...Appendix A 10 C28x Appendix A eZdsp F2812 TP1 TP2 Test Points ...