Content deleted Content added
Line 2:
==Procedure==
If ''x'' is the number of bits of the multiplicand, and ''y'' is the number of bits of the multiplier :
** A = (the multiplicand).▼
* Draw a grid with three rows and x + y + 1 columns. Label them respectively A (add), S (subtract), and P (product).
* In [[two's complement notation]], fill the first ''x'' bits of each line with :
**
** P: zeroes.
*
** A: zeroes.
** S: zeroes.
** P: the multiplier.
* Fill the final bit of each line with zeroes.
* Count how many bits are in the multiplier. That many times, do these two steps :
*# If the two rightmost bits in the product are...
*#* 00 or 11: do nothing.
*#* 01:
*#* 10:
*# Perform a right [[arithmetic shift]] on the product.
*
==Example==
|