question 5 (15 points)\n7 minutes perform 2s complement binary multiplication using booths algorithm on a 4…

question 5 (15 points)\n7 minutes perform 2s complement binary multiplication using booths algorithm on a 4 - bit multiplicand of -5 (base - 10) and 7 - bit multiplier of -34 (base - 10). what would be the appropriate 2s complement binary representations for the multiplicand?\na what would be the appropriate 2s complement binary representations for the multiplier?\na perform booths multiplication algorithm and enter the 11 bit answer.

question 5 (15 points)\n7 minutes perform 2s complement binary multiplication using booths algorithm on a 4 - bit multiplicand of -5 (base - 10) and 7 - bit multiplier of -34 (base - 10). what would be the appropriate 2s complement binary representations for the multiplicand?\na what would be the appropriate 2s complement binary representations for the multiplier?\na perform booths multiplication algorithm and enter the 11 bit answer.

Answer

Explanation:

Step1: Find 2's complement of multiplicand

The decimal number - 5 needs to be represented in 4 - bit 2's complement. First, find the binary of 5 which is 0101. Then, take 1's complement (1010) and add 1 to get 1011.

Step2: Find 2's complement of multiplier

The decimal number - 34 needs to be represented in 7 - bit 2's complement. First, find the binary of 34 which is 0100010. Then, take 1's complement (1011101) and add 1 to get 1011110.

Step3: Perform Booth's algorithm

  1. Initialize:
    • Let the multiplicand (M = 1011) (4 - bit) and multiplier (Q = 1011110) (7 - bit). Add an extra 0 bit at the end of (Q) for the algorithm, so (Q = 10111100). Also, initialize an accumulator (A=00000000) (8 - bit to match the eventual product size considering 4 - bit multiplicand and 7 - bit multiplier).
  2. Iterative steps:
    • Look at the last two bits of (Q) (initially (Q_0 = 0) and (Q_{- 1}=0)). Since (Q_0 - Q_{-1}=0), shift (A) and (Q) right (arithmetic shift for (A) and logical shift for (Q)). (A = 00000000), (Q = 01011110).
    • Next iteration, (Q_0 = 0) and (Q_{-1}=0), so shift again. (A = 00000000), (Q = 00101111).
    • Next, (Q_0 = 1) and (Q_{-1}=0), so (A=A - M). (A = 00000000-1011=11110101) (using 2's complement subtraction). Then shift (A) and (Q) right. (A = 11111010), (Q = 00010111).
    • Next, (Q_0 = 1) and (Q_{-1}=1), so shift. (A = 11111101), (Q = 00001011).
    • Next, (Q_0 = 1) and (Q_{-1}=1), so shift. (A = 11111110), (Q = 00000101).
    • Next, (Q_0 = 0) and (Q_{-1}=1), so (A = A+M). (A=11111110 + 1011=00001001) (using 2's complement addition). Then shift (A) and (Q) right. (A = 00000100), (Q = 00000010).
    • Next, (Q_0 = 0) and (Q_{-1}=0), so shift. (A = 00000010), (Q = 00000001).
    • Next, (Q_0 = 1) and (Q_{-1}=0), so (A = A - M). (A=00000010-1011 = 11111011). Then shift (A) and (Q) right. (A = 11111101), (Q = 00000000).
  3. The final product in (A) and (Q) (combined) is (11110100010) (11 - bit).

Answer:

  • For the multiplicand: 1011
  • For the multiplier: 1011110
  • For the 11 - bit answer: 11110100010