# 8 Bit Multiplier

• 2,922 views, 1 today
• 3
• 2
• 1
thesneezingpanda
Level 38 : Artisan Engineer
29
8 Bit Multiplier - Built by Peri_Rawesome

This is a massive 8 bit multiplier, it's a new circuit designed by Peri_Rawesome, will a little help from me laying blocks and setting up adders.

The whole design is huge, it's not very efficient as the signals have to travel so far, but it's a proof of concept, and it works. Looking back it would have been wiser to make the two 8bit input lines curl back around to reduce length, but oh well.

It multiplies two eight bit numbers, producing a 16bit output.

How it works

The whole device operates on the principle that a one bit multiplier is essentially an AND gate. If we construct the truth table for an AND gate:

0 0 | 0
0 1 | 0
1 0 | 0
1 1 | 1

You will notice that is is identical to your table of results from multiplying two one bit numbers, because to get an output you have to multiply by a number, so if either the multiplier or multiplicand are not 1, you can't get an output.

Using this relatively simple concept, the multiplier device progressively links each bit of one input to each bit of the other in an AND gate, essentially multiplying every single bit together. Of course, when this is done, you have more outputs than the 16 expected, that is because we are multiplying the multiplicand by every bit of the multiplier separately, so what once we have generated all our outputs we need to add them together.

Now, this is where it gets slightly confusing. If you take decimal multiplication:

22
37x
-------
154
66[] +
-------
814

You will notice that our first line of multiplying works as expected. You multiply the last number of the multiplier with the multiplicand. Simple. But when we get move onto our next number of the multiplier, we are no longer working with normal digits, we are working in tens, so we shift our answer one to the left, adding a zero to the end of it in essence. Binary multiplication works exactly the same, so in our Multiplier Device we need to shift the outputs of our AND gates by one binary place when we move onto the next bit of the multiplier. So, because of this, rather than the outputs of our AND gates going in this order:

1, 2, 4, 8, 16, 32, 64, 128, 1, 2, 4, 8, 16, 32, 64, 128, etc

With the shifting it looks like that as we go down the multiplying device:

1, 2, 4, 8, 16, 32, 64, 128, 2, 4, 8, 16, 32, 64, 128, 256, 4, 8, 16, 32, 64, 128, 256, 512, etc

Furthermore, this isn't going to add up nicely. The standard binary adder takes two inputs, and you can see we have more than two of each number, so we are going to have to use quite a few.

Now it's an 8bit adder, so we will have 8 collections of numbers that need to be added together. So what we do is add each adjacent pair together, group one with group two, group three with group four, etc. You will also notice that we actually use 9bit adders rather than 8 bit, because remember after our bit-shifting one group will have an extra bit we need to work with.

Now we repeat the process, we add the sum of groups one and two, to the sums of group three and four, etc. Then we add our last two amounts together finally in a 15bit adder, producing a 15 bit number, with carry bit, that makes 16 bits of multiplying madness!

If you don't get it, don't worry, take a good look around the multiplier itself and you'll pick it up, it's not a complex concept when you think about it.

This may not be the best or efficient way of multiplying numbers in Minecraft, but it's simple, effective, and takes multiplication right back to it's fundamentals!

Once again, credit to Peri_Rawesome for the brains behind it!
 Credit Peri_Rawesome Progress 100% complete Tags Redstone Device