Computer Science, asked by adityakumarmaurya64, 10 months ago

Hi frnds, please ans it in points......

write the rules to multiply two
binary numbers in points.
please write the rules in points.​​

Answers

Answered by NIZZY123
1

Answer:

THESE ARE THE STEPS.....PLS MARK ME BRAINIEST

Explanation:

1. On paper, multiplying two binary numbers is similar to long multiplication except your times tables are:

2. 0*0 = 0, 0*1 = 0, 1*0 = 0, 1*1 = 1 { It shouldn't take too long to learn them. }

3. Remember, multiplying two 16 bit numbers will give a 32 bit result (or double the length of the operands).

4. You can start with the LSB or MSB, as you prefer.

5. Multiplying A * B, assume we're working with the bits in A and generating multiples of B.

6. If we shift each bit of B left one position, it multiplies B by two.

7. MSB of a 16 bit number is bit 15, LSB is bit 0. Working from MSB…

8. Find the bit position of the most significant '1' in A, I'll assume bit 15 is a 1…

9. Fill the least significant 15 bits of the 32 bit result column with zeroes, then write in the values in B, hence B has been shifted left 15 places and hence multiplied by 2^15.

10. Repeat this for bits 14 … 0 of A, if the bit is '0', if the bit is '1', write in the relevant number of zeroes and copy B to their left. Finally, if bit '0' is a '1', copy B into the lower 16 bits with no zeroes following.

11. Once the list has a row for every '1' bit in A, add all the numbers in the list, with appropriate carrys. (Due to the binary nature of the numbers, it is easiest to add the rows one at a time into an accumulator, then the maximum result for each bit position is: Carry in(n-1) = 1, A(n) = 1, B(n) = 1 giving Result(n) = 1, Carry out(n) = 1.

12. Starting from LSB simply reverses the order of the rows.

13. When a computer is performing this, it is sensible to work from the LSB, then B is added, if A(0) = 1.

14. Then B is shifted left and A is shifted right. Again A(0) is tested and if A(0) = '1' the shifted value of B is added.

This is repeated for each bit of A, the result ending up in the accumulator.

Similar questions