Sunday, March 27, 2011

Quick Abacus Tutorial

Take a look at this picture of the Chinese abacus, also known as the suanpan. This picture is from Wikipedia’s article on the abacus, which also treats of many others. The picture shown depicts the number 6,302,715,408. Thus the right-most column is units and the left-most column is billions. If all the beads were away from the center bar, the number represented would be zero. The second column from the right, as you can see, is 0. Now for an explanation.

The topmost and the bottom-most beads are never used in decimal calculations. I’ll return to their uses in a moment. First, what do the other beads represent? The bottom bead on top represents 5, the bottom beads represent 1, but the last one isn’t used. The number 8 in the first column is shown by pulling down 5 and pushing up 3: 5 + 3 = 8. The maximum number we can render in each column, therefore is 9—remembering that the top and bottom bead are Off Limits, as it were.

Now suppose we wanted to reduce this number by 3. Simple. We just move the three bottom beads of the first column away from the center. That leaves the top bead still in place: 5. But let’s instead add 3 to the original number. Here we must proceed one number at a time. We move one bead up from the bottom, making 9. Two more beads to go. But we can’t move any more beads in the first column; they’re all used up. Therefore we move one bead up in the bottom part of the next column over—and zero out the first column. One more to go. We add this one to the first column again. And we can do so because it has been zeroed out in the last step; it can hold a unit once again. The result is that the 8 has now turned into 11: 6,302,715,408 + 3 = 6,302,715,411. A nice do-it-yourself demonstration is available here.

Division and multiplication become more complicated, but in essence one does it on the abacus just as one does it on paper, keeping the intermediate results on another part of the abacus. No paper needed. When these devices came into use, paper was not as common as it is today. Abaci are big because they need extra space to record division and multiplication steps. The last post shows a Chinese abacus.

There are many kinds of abaci. The Japanese soroban, for instance, omits the topmost and the bottom-most beads; it is optimized for decimal calculation. But then the question arises, what possible use is the full Chinese suanpan? Oddly enough, long, long before computers came into use and hexadecimal math became the bane or blessing of computer-types like me, the Chinese evidently used that numerical system—and the suanpan can let you do math in hex. It was introduced in the fourteenth century of our era.

The hexadecimal system is base-16 as the decimal is base-10. In decimal the highest number is 9, in hexadecimal 15. Now if you use both of the top beads and all of the bottom beads, you get 16 values in each column, from 0 to 15. Here is a bit of information you didn’t know you needed: in hex the numbers run like this: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. F therefore is fifteen, shown on the Chinese abacus by moving all of the beads towards the center. And, not surprisingly, the number Hex 10 actually stands for decimal 16.
--------------------
This is a repeat of a popular post first presented on September 24, 2009 on the earlier version of this blog.

No comments:

Post a Comment