Data Representation & Arithmetic

Answer & solution
Official answer: 13
Step through it (18 steps)
In radix-2 Booth multiplication append q−1=0 to the multiplier and inspect (qi,qi−1) for i=0,…,15. A pair 01 causes addition of M, 10 causes subtraction of M, and 00 or 11 causes neither. Each iteration still performs its arithmetic right shift, but shifts are not included in the question's count. The count depends on the multiplier's bit transitions, not on the value of M.
Read Q from its least significant end. The positions producing subtraction (10) are i=1,3,5,7,10,13,15, seven positions. The positions producing addition (01) are i=2,4,6,8,11,14, six positions. The remaining positions i=0,9,12 have equal adjacent bits and require no arithmetic update.
Thus there are 7+6=13 additions/subtractions during the 16 iterations. Do not append an extra seventeenth correction for the leading one: the fixed-width signed Booth algorithm already handles that sign bit through its arithmetic shifts. Answer: 13.


