Tuesday, 28 September 2021

10 bit x 6 bit multiply

So, we need to multiply a 6-bit number (d) by a 10-bit number (b). Like this:

Writing the thing out as a grade-school (i.e. long) multiplication shows what seems like a reasonable approach. Each bit of the ten bit number (multiplicand) is multiplied by the first (right-most) bit of the six bit number (multiplier); this forms the first row - partial product PP0. Next, each bit of the multiplicand is multiplied by the second bit of the multiplier; this forms the second row. This row is shifted one place to the left. This row is partial product PP1. And so on.

We then add together the six partial products, the sum being the product of the two original numbers.

The numbers in red are hexadecimal, those in blue decimal: 1023× 63 = 64449. Hex is easier to read (at least for me!) than binary; I can use 1970s era TIL311 LED hexadecimal displays from Texas Instruments in actual circuitry. At least for intermediate results: the final digits of π will, of course, be decimal 😃.

Multiplication by a single bit is easy enough - an AND gate. To get all six partial products needs sixty gates (that's fifteen 7408 chips). The partial products then get added together with 74283 chips (4-bit binary full adders). We add together PP0 + PP1 to get R, then similarly S and T then need to add R + S = U and finally U + T, to give the product. That's seventeen 7283 chips in total; the 4-bit adders need cascading in groups of 3 or 4 so as to add together numbers with more than four bits, for example adding together PP0 (10 bits) and PP1 (11 bits) needs 3× 4-bit chips, to give the (potentially) 12-bit result (101111111101, as for the example above).


No comments:

Post a Comment