source code Archives - Page 10 of 10 - Coddicted

Russian Peasant Multiplication 2

Russian Peasant Multiplication
Description: Russian Peasant Multiplication. This program allows one to do multiplication by just doing muliplication or division by 2 (and addition). This is interesting since computers generally use base 2 arithmetic.The algorithm is as follows. Start two rows, one with the multiplicand (say, A) and the other the multiplier (say B). The goal is to ...