This project takes in two 4-bit inputs and multiplies them together into an 8-bit output. It uses an array of 12 full adders and 16 AND gates to do so (Figure 1). The operands are represented by the input pins with [0:3] representing operand 1 and [7:4] representing operand 2. The product is represented by the 8-bit output pin.
Input two 4-bit numbers via ui_in. The 4 most significant bits are taken to be the first term, the 4 least significant bits are taken to be the second term. The 8 uo_out bits are the output, in binary. For example, an input of 10011101 would be (1001) * (1101), or 9 * 13. The product would be (01110101), or 117.
# | Input | Output | Bidirectional |
---|---|---|---|
0 | m0 | p0 | |
1 | m1 | p1 | |
2 | m2 | p2 | |
3 | m3 | p3 | |
4 | q0 | p4 | |
5 | q1 | p5 | |
6 | q2 | p6 | |
7 | q3 | p7 |