Binary Unsigned Integer Multiplication

written by Teresa Carrigan

Run model in your browser



This model demonstrates binary unsigned integer multiplication.



First the model generates two random unsigned binary numbers. The multiplier will have two to four bits, and the multiplicand will have two to eight bits.

The multiplicand is padded with leading zeroes (one zero for each bit of the multiplier), and a partial product register is initialized to all zeroes (the same size as the padded multiplicand).

Each digit of the multiplier is processed, starting with the right-most bit. If the digit is 0, then the multiplicand is shifted one place to the left, dropping a leading zero and padding with a trailing zero. If the digit of the multiplier is 1, then the multiplicand is added to the partial product register before being shifted to the left. When all the bits in the multiplier are processed, the partial product register will contain the answer to the initial multiplication problem.


Applets on this website were written by Teresa Carrigan in 2004, for use in computer science courses at Blackburn College, with the exception of the Fireworks applet. The applets made with NetLogo require Java 1.4.1 or higher to run. The applets made with NetBeans require Java 1.4.2 or higher to run. Applets might not run on Windows 95 or Mac OS 8 or 9. You may obtain the latest Java plugin from Sun's Java site.