The algorithm for 2’s complement multiplication is as follows :
Step 1 : Load multiplicand in B, multiplier in Q. For negative numbers, 2’s complement format to be used.
Step 2 : Initialize the down counter CR by the number of bits involved.
Step 3 : Clean locations A (n-bits) and Qn + 1 (1-bit).
Step 4 : Check LS bit of Qn and Qn + 1 jointly. If the pattern is 00 or 11 then go to Step 5. If 10, then A = A – B. If 01, then A = A + B.
Step 5 : Perform arithmetic right-shift with A, Qn and Qn + 1. LS of A goes to MS of Qn and LS of Q goes to Qn + 1. Old content of Qn +1 is discarded.
Step 6 : Decrement CR by one. If CR is not zero then go to Step 4.
Step 7 : Final result (or the product) is available in A (higher part) and Qn(lower part).

Example : Both negative (– 5 × – 4)

Discussion
Ask a question, share your thoughts or report an error.
Sign in to participate in the discussion.
Join the discussion