Question
The following two signed 2's complement numbers (multiplicand M and multiplier Q) are being multiplied using Booth's algorithm:
M: 1100 1101 1110 1101 and Q: 1010 0100 1010 1010
The total number of addition and subtraction operations to be performed is ___________. (Answer in integer)
Official answer and solution
- Official answer
- 13
- From
- Official GATE 2025 answer key
Solution
Append to the right of multiplier and count the number of and bit transitions across adjacent bit pairs .
In Booth's multiplication algorithm, an addition or subtraction is performed exclusively depending on the bit transitions in the multiplier (with an initial bit appended to the right of the LSB):
Writing out all 16 adjacent pairs from MSB to LSB:
10(subtraction)01(addition)10(subtraction)00(no operation)01(addition)10(subtraction)00(no operation)01(addition)10(subtraction)01(addition)10(subtraction)01(addition)10(subtraction)01(addition)10(subtraction)00(no operation)
Out of 16 steps, pairs are 00 (no operation) and the remaining pairs are 01 or 10. Thus, a total of addition and subtraction operations are performed.
13
Examining M instead of Q, or forgetting to append at the right end of Q.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2025 Computer Science and Information Technology - Session 2 (CS2)
- Question
- 32 of 65
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.