Transcript for:
Understanding 2-Bit Multiplier Circuits

In this lecture I will obtain 2 bit multiplier circuit and also explain how it works. We call it 2 bit multiplier because it is used to multiply 2 bit numbers. Let's say A is the first number and it is having 2 bits A1, A0. A1 is the MSB, A0 is the LSB. The second 2 bit number is B with B1 and B0 as the 2 bits.

This box here represents the 2-bit multiplier circuit. A and B are the two inputs. Both A and B are represented by this thick arrow because they are multi-bit numbers.

A is a 2-bit number and B is also a 2-bit number. The output of this circuit is P where P stands for the product that we obtain after multiplying A and B. The output P is a 4-bit number because when you multiply two 2-bit numbers the maximum possible output is a 4-bit number. Let's say P3, P2, P1 and P0 are the 4 bits of the product that we are getting from this 2-bit multiplier.

Now I will explain how to obtain values of P3, P2, P1 and P0. A and B are the two numbers that we have to multiply. This means we are multiplying A1A0 by B1B0.

The process of multiplication will remain similar as decimal numbers. We are dealing with base two numbers. They are the binary numbers.

But the process that we will follow to multiply A and B will remain same as the decimal numbers. First I will multiply A0 with B0 and A1 with B0. When you multiply A0 and B0, you have A0, B0. And when you multiply A1 with B0, you have A1, B0.

Weight of this position is 2 raised to power 0 and weight of this position is 2 raised to power 1. In the next step, I will multiply B1 with A0 and B1 with A1. When you multiply B1 and A0, let's see what we have. A0 multiplied by 2 raised to power 0. Weight of this position is 2 raised to power 0 multiplied by B1 and weight is 2 raised to power 1. weight of this position is 2 raised to power 1. So finally we have a0 b1 multiplied by 2 raised to power 1. So this result result of multiplication will go to this column a0 b1 because weight of this column is 2 raised to power 1. So I will put a cross mark because no result will fall in this column when you multiply a1 and a0 by b1. In the same way when you multiply a1 and b1, when you multiply a1 and b1 you have a1, b1 and the weight is 2 raised to power 2. So the result will go to the next column a1, b1, weight of this column is 2 raised to power 2. And to obtain the final result, to obtain the final result we need to perform the addition separately for all the columns.

Column 1 is for weight 2 raised to power 0. column 2 is for weight 2 raised to power 1, column 3 is for weight 2 raised to power 2 and the fourth column is for weight 2 raised to power 3 and we will perform the addition for all the four columns individually from the first column we only have A0 B0 so here we have A0 B0 from the second column we have A1 B0 plus A0 B1 with carry equal to C1 this carry will go to the third column. So here we have a1 b1 plus c1 with carry c2. This carry will go to the fourth column and finally we have c2. So this is what we have after multiplying a and b, the two bit numbers.

And now we will find out values of p3, p2, p1 and p0. P0 is simply equal to a0 b0. This is P0 and P1 is equal to A1B0 plus A0B1 from here you can see this is the value of P1. P2 is equal to A1B1 plus C1 where C1 is the carry generated in this step. P3 the last bit the MSB of the product term is equal to C2 where C2 is the carry generated in this column.

Now you can easily implement the 2 bit multiplier circuit. If you remember the half adder presentation I I explained you when you add two numbers x, y, the sum is equal to x, xor, y. This is the sum and the carry is equal to x and y. In this case also, we have to use half adder because for P1, the result is equal to a1b0 plus a0b1.

So we need one half adder in this case. And for P2 also we need one half adder. So let's try to implement the circuit of 2 bit multiplier.

I will first I will first draw four end gates. This is the second end gate. This is the third end gate and I will draw the last end gate here.

The input to the first end gate is A0 B0 A0 B0 and output is simply A0 and B0 and this output is equal to this output is equal to P0 from here you can see P0 is equal to A0 and B0. To implement P1 I will use second and third AND gates. The input to the second AND gate is A1 B0.

We have implemented this part and the input to this AND gate is A0 B1. So the outputs are a1 and b0, a0 and b1. Then we have to add them by using the half adder. For sum, we have x, xor, y. So we have a1, b0, xor, a0, b1, because this is equal to x and this is equal to y.

And we can easily implement it by using XOR gate. This is the XOR gate and the output is equal to P1 the second bit of the product term. We also need to implement the carry.

Carry is equal to X and Y. So I will take this input from here and this input from here and feed it to the another AND gate and this output is equal to C1 because C1 is the carry generated in this case. C1 is the carry generated, I will quickly complete this circuit.

This is what you have as the circuit of two bit multiplier. And you can easily cross check whether this circuit is working fine or not. Let's take one example.

And in this example, let's say A is equal to one one, and B is equal to one zero, we have to multiply them zero multiplied by one is zero, zero multiplied by one is zero. 1 multiplied by 1 is 1 and 1 multiplied by 1 is 1. So finally we have 1 1 0. 1 1 is 3, 1 0 is 2. When you multiply 3 and 2, you will get 6. That's what we are getting. I will try to obtain the same result by using this circuit.

a0 is equal to 1 and b0 is equal to 0. From here you can see this is a0 and this is b0. a0 and b0, this means 1 and 0 is equal to 0. So P0 is equal to 0 and here you can see P0 is equal to 0. A1 is 1, B0 is 0. So A1 and B0 is again equal to 0. A0 is 1, B1 is 1. So A0 and B1 is equal to 1. Here we have 0, XOR1, 0XOR1 is equal to 1. So P1 is equal to 1. That's what we are getting. We see 1. The carry is 0 and 1 and this is equal to 0. For this AND gate we have 1, 1 as the two inputs.

So output is simply equal to 1. For this XOR gate first input is 0 and second input is 1. So P2 is equal to 0, XOR 1 which is equal to 1. So P2 is equal to 1 and C2, C2 which is also P3 is equal to 0 because the two inputs are 0 and 1. So P3 is equal to 0. So this is what we have from the circuit 0110. 0110 is 6. So the 2 bit multiplier circuit is working fine. You can easily obtain this circuit if you know how to multiply two binary numbers. You can also obtain 4 bit multiplier by using the same technique. I will end this lecture here. See you in the next one.