A binary Multiplication is an electronic circuit used in digital electronics, such as a computer, to multiply two binary numbers. It is built using binary adders. A variety of computer arithmetic techniques can be used to implement a digital multiplier. Most techniques involve computing a set of partial products, and then summing the partial products together. This process is similar to the method taught to primary school children for conducting long multiplication on base-10 integers but has been modified here for an application to a base-2 (binary) numeral system.
Most techniques for binary multiplication involve computing a set of partial products and then summing the partial products together. This process is similar to the method taught to primary school children for conducting long multiplication on base ten integers but has been modified here for an application to binary. The method typically taught in school for multiplying decimal numbers is based on calculating partial products, shifting them to the left, and then adding them together.
Binary division and multiplication are both pretty easy operations. Instead of dealing with a lot of numbers, you just need to make sure to set the 1 or 0 in the right place. For this reason, you need to make sure you are also familiar with binary addition and subtraction. To perform a binary multiplication problem, we need to understand how addition works with binary numbers and follow the same process of multiplication and addition we would use with decimal numbers.
Multiplication in binary is exactly as it is in decimal, i.e. multiply numbers right to left and multiply each digit of one number to every digit of the other number, them sum them up. The 3 basic binary multiplication rules are also similar to decimal.
- 1 * 1 = 1
- 1 * 0 = 0 * 1 = 0
- 0 * 0 = 0
Also, remember that for every left shift of digit of the multiplier, an extra zero needs to be appended to the product. This is similar to the decimal system as well.
- 1011 * 1 (multiplier 1’s col) = 1011
- 1011 * 0 (multiplier 2’s col) = 00000 (one zero appended at the end)
- 1011 * 1 (multiplier 4’s col) = 101100 (two zero’s appended at the end)
- 1011 * 1 (multiplier 8’s col) = 1011000 (three zero’s appended at the end)
- Sum up. 1011 + 00000 + 101100 + 1011000 = ((1011 + 00000) + 101100) + 1011000 = (01011 + 101100) + 1011000 = 110111 + 1011000 = 10001111
So the product is 10001111 which is = 1 * 2^7 + 1 * 2^3 + 1 * 2^2 + 1 * 2^1 + 1 * 2^0 = 128 + 8 + 4 + 2 + 1 = 143 = 11 * 13.
Binary Multiplication Algorithm
Booth’s algorithm examines adjacent pairs of bits of the ‘N’-bit multiplier Y in signed two’s complement representation, including an implicit bit below the least significant bit, y−1 = 0. For each bit yi, for i running from 0 to N − 1, the bits yi and yi−1 are considered. Where these two bits are equal, the product accumulator P is left unchanged. Where yi = 0 and yi−1 = 1, the multiplicand times 2i is added to P; and where yi = 1 and yi−1 = 0, the multiplicand times 2i is subtracted from P. The final value of P is the signed product.
The representations of the multiplicand and product are not specified; typically, these are both also in two’s complement representation, like the multiplier, but any number system that supports addition and subtraction will work as well. As stated here, the order of the steps is not determined. Typically, it proceeds from LSB to MSB, starting at i = 0; the multiplication by 2i is then typically replaced by incremental shifting of the P accumulator to the right between steps; low bits can be shifted out, and subsequent additions and subtractions can then be done just on the highest N bits of P. There are many variations and optimizations on these details.
The algorithm is often described as converting strings of 1s in the multiplier to a high-order +1 and a low-order −1 at the ends of the string. When a string runs through the MSB, there is no high-order +1, and the net effect is interpreted as a negative of the appropriate value.
Binary Multiplication Examples
Find 3 × (−4), with m = 3 and r = −4, and x = 4 and y = 4:
m = 0011, -m = 1101, r = 1100
A = 0011 0000 0
S = 1101 0000 0
P = 0000 1100 0
Perform the loop four times:
P = 0000 1100 0. The last two bits are 00.
P = 0000 0110 0. Arithmetic right shift.
P = 0000 0110 0. The last two bits are 00.
P = 0000 0011 0. Arithmetic right shift.
P = 0000 0011 0. The last two bits are 10.
P = 1101 0011 0. P = P + S.
P = 1110 1001 1. Arithmetic right shift.
P = 1110 1001 1. The last two bits are 11.
P = 1111 0100 1. Arithmetic right shift.
The product is 1111 0100, which is −12.
The above-mentioned technique is inadequate when the multiplicand is the most negative number that can be represented (e.g. if the multiplicand has 4 bits then this value is −8). One possible correction to this problem is to add one more bit to the left of A, S, and P. This then follows the implementation described above, with modifications in determining the bits of A and S; e.g., the value of m, originally assigned to the first x bits of A, will be assigned to the first x+1 bits of A. Below, the improved technique is demonstrated by multiplying −8 by 2 using 4 bits for the multiplicand and the multiplier:
A = 1 1000 0000 0
S = 0 1000 0000 0
P = 0 0000 0010 0
Perform the loop four times:
P = 0 0000 0010 0. The last two bits are 00.
P = 0 0000 0001 0. Right shift.
P = 0 0000 0001 0. The last two bits are 10.
P = 0 1000 0001 0. P = P + S.
P = 0 0100 0000 1. Right shift.
P = 0 0100 0000 1. The last two bits are 01.
P = 1 1100 0000 1. P = P + A.
P = 1 1110 0000 0. Right shift.
P = 1 1110 0000 0. The last two bits are 00.
P = 1 1111 0000 0. Right shift.
The product is 11110000 (after discarding the first and the last bit) which is −16.
What Are The Four Rules Of Binary Addition?
It Is A Key For Binary Subtraction, Multiplication, Division. There Are Four Rules Of Binary Addition. In Fourth Case, A Binary Addition Is Creating A Sum Of (1 + 1 = 10) I.E. 0 Is Written In The Given Column And A Carry Of 1 Over To The Next Column.
What Is Binary Division?
Binary Division (Rules And Examples) A Are Considered And Depending Upon The Value The Divisor Is Multiplied With 1 And The Result Which Is The Result Of Multiplication Of 101 And 1 Are Written.
What Is The Rule Of Binary Subtraction?
Binary Subtraction. Binary Subtraction Is Also Similar To That Of Decimal Subtraction With The Difference That When 1 Is Subtracted From 0, It Is Necessary To Borrow 1 From The Next Higher-Order Bit And That Bit Is Reduced By 1 (Or 1 Is Added To The Next Bit Of Subtrahend) And The Remainder Is 1.
What Is Binary Addition?
Binary Addition. Binary Addition Is Much Like Your Normal Everyday Addition (Decimal Addition), Except That It Carries On A Value Of 2 Instead Of A Value Of 10. For Example: In Decimal Addition, If You Add 8 + 2 You Get Ten, Which You Write As 10; In The Sum, This Gives A Digit 0 And A Carry Of 1.
What Does 101 Mean In Binary?
When You Say A Binary Number, Pronounce Each Digit (Example, The Binary Number “101” Is Spoken As “One Zero One”, Or Sometimes “One-oh-one”). These Way People Don’t Get Confused With The Decimal Number. A Single Binary Digit (Like “0” Or “1”) Is Called A “Bit”. For Example, 11010 Is Five Bits Long.