Continuing with the abacus theme yesterday, we move on to subtraction and multiplication today.
Subtraction
Subtraction on the abacus is the mechanical reversal of addition, as can be seen through the subtraction rhymes:
one down one
one up four off five
one borrow one leave nine
two down two
two up three off five
two borrow one leave eight
three down three
three up two off five
three borrow one leave seven
four down four
four up one off five
four borrow one leave six
five off five
five borrow one leave five
six off six
six borrow one leave four
six borrow one down five off one
seven off seven
seven borrow one leave three
seven borrow one down five off two
eight off eight
eight borrow one leave two
eight borrow one down five off three
nine off nine
nine borrow one leave one
nine borrow one down five off four
Addition and subtraction on the abacus are fix point operations. You usually put the first operand on the right most positions of the abacus and the second operand on the left most positions. And you carry out the operation on the right hand side of the abacus. Most people perform the addition or subtraction one digit at the time starting from the most significant digit. You can start from the least significant digit like you are forced to do if you perform the operations in pencil and paper, but that feels unnatural. Here's what it looks like if you do 12345+67890=80235 on the abacus:
When the combined number of digits of the operands is greater than 13, you are forced to keep one of the operands in your mind. One particularly fun exercise is 123456789+876543211=1000000000. Before the last 1 is added, the abacus would show the intermediate result of 999999999. Adding the final one will cause the "one off nine carry one" line to be invoked nine times.
Multiplication
Multiplication on the abacus is more like multiplication on pencil and paper. The multiplication rhymes is just the familiar multiplication table:
one times one is one
etc.
Multiplication and division use floating points. The unit digit will shift positions after the calculation. For multiplication, the unit position shifts to the right by the number of digits of the second operand. One usually put the second operand flush left on the abacus, and the first operand in the middle of the abacus leaving exactly the same number of empty spaces to the right of it as there are digits in the second operand. By the end of the calculation, the result would appear flush right.
You start your multiplication with the least significant digit of the first operand, which is the first digit to the left of the empty spaces on the right side of the abacus. You multiply this digit into the second operand, which is on the left side of the abacus, least significant digit first, and put the result into the empty spaces. When this is done, the digit is erased (there may be an overflow of the result into the space formerly occupied by the digit, but that is OK.) Then you use the second least significant digit of the first operand to do the multiplication, the result is superimposed onto the existing result. Here's an illustration of 123*456=56088:
Fun exercises include 123456789 * n, where n = 1, 2, 3, 4, 5, 6, 7, 8, 9. This sequence exercises all the entries in the multiplication table. And the results exhibit interesting patterns. This sequence is called the Small Nine of Nines, referring to the multiplication table as nine of nines (nine rows of nine columns.)
A more ambitious sequence is the Big Nine of Nines:
This set of exercises have the property that the result looks very clean. And you can discover any mistakes half way through the calculation—if the result fails to carry to the left. (BTW, this is also the origin of the $10.24, $20.48, ... stock prices that I like to use in my unit tests and functional tests.)
The multiplications 55555 * 975 = 54166125 and 55555 * 957 = 53166135 are called the candle holder exercises because the results look like candle holders on the abacus.
The beauty of abacus arithmetic is the fact that the intrinsic organization of the abacus works as a framework for solving complicated arithmetic problems. At any moment, it farms out a smaller calculation—one that can be solved by invoking one line in the abacus rhymes—to the brain. It also serves as an accumulator of the intermediate results.