Multiplication

Steps

  1. Write Down Initialize line (First Number in M, Second Number in Q)
  2. Check if the right most bit of Q is a 1 or a zero
  3. If 0, Add Zero To A (5th bit (0) goes into C)
  4. If 1, Add M To A (5th bit goes into C)
  5. Shift C_A_Q right 1 bit (right most bit of Q is dropped)
  6. Repeat Steps 2 through 5 until length you have shifted the same amount of times as there are bits of (M or Q, whichever has more bits).
  7. Your Answer will be AQ (Combined)
  8. Your can check your answer by converting your two starting numbers to decimal and multiplying them.

Example 1:

Solve 1101 * 1011

Step C A Q M Details
0 0 0000 1011 1101 Initialize
1 0 1101 1011 1101 Add M to A (0000 + 1101=01101)
1.5 0 0110 1101 1101 Shift
2 1 0011 1101 1101 Add M to A (0110 + 1101=10011)
2.5 0 1001 1110 1101 Shift
3 0 1001 1110 1101 Add Zero to A (0000 + 1001=01001)
3.5 0 0100 1111 1101 Shift
4 1 0001 1111 1101 Add M to A (1101 + 0100 = 10001)
4.5 0 1000 1111 1101 Shift

Your Answer is A_Q which is 10001111b or 143.

Answer Check: 1101b=13, 1011b=11, 13*11=143