Shop OBEX P1 Docs P2 Docs Learn Events
4bit * 4Bit gate multiplier — Parallax Forums

4bit * 4Bit gate multiplier

KaosKiddKaosKidd Posts: 296
edited 2011-03-31 15:59 in General Discussion
I was playing around the other day and tried to grasp just how much work goes into something like a hardware multiplier. Yeah. Right. Fun. Once I figured out how binary numbers are multiplied, the next step was a truth table, simplified that down to what I've got here:

4bitMultply.jpg


40 AND gates, 24 XOR gates, 12 OR gates, 164 interconnections.
In all, the project took over 3 hours, a solid chunk of which was figuring out how to build the circuit.
In the pic, the upper left 4 switches are B, the next 4 are A, the result is in the lower right corner.
I used a feature of the software to display the actual values in decimal for illustration only.

In reality, today's processors have 64 bit multipliers, each bit consuming 16 gates = 1024 gates. This doesn't include the enable or any register logic (in this example, simple switches preform these tasks).

Now that I've finished this little project from back in my early digital years, I have yet a bigger appreciation for what Beau Schwabe has done for the Propeller II now then before.

KK
1024 x 707 - 225K

Comments

  • localrogerlocalroger Posts: 3,451
    edited 2011-03-31 15:59
    Back in my day we had to do this with discrete transistors. And they had to multiply in the snow. Uphill. Both ways.
Sign In or Register to comment.