Longer Description

The Russian Peasant Multiplication algorithm is an algorithm that takes two number inputs and multiplies them together by the use of addition. It does this by creating three columns: the first two columns start as the two inputed values and the third is a blank summation/carry column. It then multiples the first column by two and divides the second column by two (rounding down). Its take the value of the first column and places it in the summation/carry column only if the value in the second column is odd. It repeats this process until the second column's value is a 1. It then takes the sum of all the values in the column three and prints out the final sum, which is the product of input one and two.

To find the numbers in the A column, multiply the number in the row before it by 2. To find the B column number, divide the number in the row above it by 2 if it is even. If it is odd, subtract 1, then divide it by 2. To calculate the carry column numbers, look at the B value in the same row. If B is even, input a 0. If B is odd, write the A number in the same row in the Carry column.

To run this algorithm, input two numbers that you want to multiply together. Click calculate to start the calculation.

Input a:

Input b: