Binary Multiplication
Binary Multiplication
Now that you understand two's complement numbers, consider the process of multiplying two
two's complement values. As with “long hand” decimal multiplication, we can perform binary
multiplication one “place” at a time, and sum the results together at the end to obtain the total
product.
Note:
This is not the method the C28x uses in multiplying numbers — it is merely a way of observing
how binary numbers work in arithmetic processes.
The C28x uses 16-bit operands and a 32-bit accumulator. For the sake of clarity, consider the
example below where we shall investigate the use of 4-bit values and an 8-bit accumulation:
Four
Four
-
-
Bit Integer Multiplication
Bit Integer 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
Accumulator
Accumulator
Data Memory
Data Memory
11110100
11110100
11110100
4
x -3
4
4
x
x
-
-
3
3
-12
-
-
12
12
?
?
Is there a better numbering system?
Is there a better numbering system?
In this example, consider the following:
•
What are the two input values, and the expected result?
•
Why are the “partial products” shifted left as the calculation continues?
•
Why is the final partial product “different” than the others?
•
What is the result obtained when adding the partial products?
•
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?
8 - 6
C28x - Numerical Concepts & IQmath
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 ...