Computer Science, asked by krishnagupta242, 1 year ago

What are the rules to multiple two binary numbers

Answers

Answered by kashishjoshipura
1

To divide two numbers, which result is an exact division, we basically need to follow four steps: division, multiplication, subtraction, and next digit. Let's say that we want to divide 18 by 3, which in binary will be 10010 divided by 00011 (or 11, it's the same).

Answered by mrunal6117
1

× 1 0

1 1 0

0 0 0

As in decimal system, the multiplication of binary numbers is carried out by multiplying the multiplicand by one bit of the multiplier at a time and the result of the partial product for each bit is placed in such a manner that the LSB is under the corresponding multiplier bit.

Finally the partial products are added to get the complete product. The placement of the binary point in the product of two binary numbers having fractional representation is determined in the same way as in the product of decimal numbers with fractional representation. The total number of places after the binary point in the multiplicand and the multiplier is counted.

The binary point in the product is then placed before this total number of places counted from right. It should be noted that a multiplication by zero makes all the bits of the partial product zero and may thus be ignored in intermediate steps.

Also, a multiplication by 1 leaves the bits of multiplicand unchanged but shifts it towards the left by one bit position. The multiplication of binary numbers becomes more convenient by carrying out intermediate sums of partial products.

In the case of binary multiplication there are certain advantages. The multiplication is actually the addition of multiplicand with itself after some suitable shift depending upon the multiplier. Thus multiplication is actually a process of shifting and adding. This process is to be continued until the shifting due to MSB of the multiplier is done and final addition is made.

A few examples will make the process of

binary multiplication clear:

Multiply:

(i) 10111 by 1101

Solution:

1 0 1 1 1

1 1 0 1

1 0 1 1 1 ← First partial product

1 0 1 1 1

1 1 1 0 0 1 1 ← First intermediate sum

1 0 1 1 1

1 0 0 1 0 1 0 1 1 ← Final sum.

Hence the required product is 100101011.

(ii) 11011.101 by 101.111

1 1 0 1 1 . 1 0 1

1 0 1 . 1 1 1

1 1 0 1 1 . 1 0 1

1 1 0 1 1 1 . 0 1

← First partial product

1 0 1 0 0 1 0 1 1 1

← First intermediate sum

1 1 0 1 1 1 0 1

1 1 0 0 0 0 0 1 0 1 1 ← Second intermediate sum

1 1 0 1 1 1 0 1

1 1 0 0 1 1 1 1 0 0 1 1 ← Third intermediate sum

1 1 0 1 1 1 0 1

1 0 1 0 0 0 1 0 0 1 0 0 1 1

Hence the required result is 10100010.010011.

Similar questions