Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Booths algorithm to muliyiply +5 and -15

Booth’s algorithm is a multiplication algorithm used for binary numbers.

  • It is not directly applicable to decimal numbers like +5 and -15.
  • However, we can convert these decimal numbers to their binary representations and then apply Booth’s algorithm.

Let’s convert +5 and -15 to their binary representations:


+5 = 0101
-15 = 1111 (two’s complement representation)

Now, let’s perform the multiplication using Booth’s algorithm.

Step 1: Set up the variables

A = 0101 (binary representation of +5)
B = 1111 (binary representation of -15)
Q = 0000 (accumulator for the result)
Q(-1) = 0 (previous value of the least significant bit of Q)
M = 4 (number of bits in the binary representation)

Step 2: Perform the multiplication using Booth’s algorithm

StepOperationAQQ(-1)
0Initial values010100000
1A = A – B010100000
2Right Shift001010000
3A = A + B011110000
4Right Shift001111000
5A = A + B101111000
6Right Shift110111100
7A = A + B001111100
8Right Shift000111111
9A = A + B111111111
10Right Shift111111111

The final result is Q = 1111 (binary), which is equal to -15 in decimal notation.

Therefore, the result of multiplying +5 and -15 using Booth’s algorithm is -15.