|
|
|
|
|
by rimantas
3529 days ago
|
|
Long division was probably the first algorithm I've learned. If you don't think that learning how to manipulate abstractions by applying algorithms is a usefull thing… well why not just skip arithmetics too, calculators are good with this one. |
|
There's a carriage with two rows of numbers, a full keyboard (10 keys per column), a hand crank, and a second crank which moves the carriage sideways one notch. Moving the carriage is a shift by a power of 10.
To multiply, you clear everything, then punch one number into the keyboard. The buttons lock down and stay down. When you turn the crank one turn, the number in the keyboard is added to the upper row on the carriage, and the lower row has 1 added. So to multiply 25 x 25, you punch 25 into the keyboard. Turn the crank once, and you have 25 in the upper row and 1 in the lower row. Turn the crank five times, and you have 125 in the upper row and 5 in the lower row. Then shift the carriage one notch right. Turn the crank once, and you add 250 to the upper row, and 10 to the lower row. One more crank turn, and you have 25 x 25 = 650 in the upper row, and 25 in the lower row. This makes it very clear that multiplication is repeated addition with shifting.
Division is repeated subtraction. You clear everything and enter the dividend. Turn the crank once to add the dividend to the top row on the carriage. Then clear the keyboard, clear the lower row, and shift to division mode. In division mode, turning the crank subtracts from the top row while adding 1 to the bottom row. Now enter the divisor in the keyboard. Move the carriage so that the high digit of the divisor and the high digit of the dividend line up. Turn the crank. This subtracts the shifted divisor from the dividend and adds 1 to the quotient. If the dividend goes negative, a bell rings and 9999 appears at the left end of the top row, indicating you subtracted too much and went negative. That's OK; just turn the crank one turn backwards, the leading 999.. changes to 000 and the bell rings again. You now have one digit of quotient. Shift the carriage left one row and repeat. Each shift gives one more digit of quotient. When the carriage is back to the full left position, the lower row is the quotient and the upper row is the remainder. This makes it very clear that division is repeated subtraction with shifting.
This is clearer than manual long division, with all that trial divisor and guessing stuff. It reflects the basic fact that division really is just repeated subtraction with counting.