Monday

Binary Adding On Your Fingers

This is a happy, silly view instead of the dark, depressing ones everyone has come to expect from me. I won't be telling you anything other than something sort of vaguely useful.

Did you know you can add two numbers on your hands? Yes, of course you did. Did you know they can be as big as 31? Well, fine then, for the people who didn't know that, let me explain.

You see, if you treat each of your fingers as a binary digit, each hand can represent 25 different numbers, in other words, 32. Now since 0 is the first number, that means you can represent any number from 0 to 31.

Okay, still lost a few of you, I imagine. Try this. Our most commonly-used system of numbering is decimal, because there are 10 possible numbers in each place. In other words, there can be anything from 0-9 in the ones' place, 0-9 in the tens', and so on. You probably learned that sometime early on in school.

Now instead, we can use binary, which means two possibilities in each place, or in other words, 0-1. Now since in decimal notation, each place is a power of ten, in binary, each place is a power of two. Yes, those of you who knew this already, I am starting really simply. Come back later and read another view about terrorists or something. So in other words, there can be 0-1 in the ones' place, 0-1 in the twos', 0-1 in the fours', and so on.

So for instance, decimal 31 in binary is 11111; that is, 1 in the ones', 1 in the twos', 1 in the fours', 1 in the eights', and 1 in the sixteens'. So 1+2+4+8+16 = 31.

Instead of ones and zeros, we can use fingers. If a finger is up, that's a 1, if it's down, that's a 0. So a fist with no fingers up at all is 0, while a hand with all five fingers (yes, for the purposes of this discussion, a thumb is a finger) up is 31. We'll call the thumb the ones' place and work toward the pinkie. Yes, this means that on the left hand the digits (and they really are digits, aren't they) move one way, and on the right they move the other. But that will come in handy later.

So for instance, 5 would be the thumb and second fingers raised. Be careful not to work much with fours, because that's something of a rude gesture in certain parts. So keep your hands under the table while you do this, and practice in private, both so you don't accidentally insult people and also because you're going to look very strange doing this.

First off, make sure you can make numbers on either hand, 0-31. Heck, if all you need to do is count, you can count a fairly high number by using both hands, 210 or 1024, coincidentally the actual number of bytes in a kilobyte or kilobytes in a megabyte or megabytes in a gigabyte(don't let anyone tell you differently) so if you should have to count bytes at some point, you can do it on your fingers if you really want to. That's a neat parlor trick, but sort of pointless.

But being able to make a number on both hands is essential to the actually interesting thing here, which is the ability to add two numbers larger than ten on your fingers. So now, make two numbers, say 5 and 5, on both hands. You should have your thumbs and middle fingers raised (I told you this was going to look odd to passers-by, but you didn't listen, did you). Bring your two hands together. Pick one hand to be the receiver. I'm right-handed, so I tend to go with my right, but it really doesn't matter much. In our example of adding fives, it doesn't matter at all, since both are the same. So we'll go right for me, but left power to all those lefties out there who now want to kill me.

Now, if there is a finger raised on the left hand (the passer, to coin a football term) and not on the right, all you have to do is pass that finger over, drop it on the left, and raise it on the right. But since that's not happening in our current example, we'll leave that. If both hands have a certain finger lowered, keep it there on both. If the passer has a lowered finger and the receiver has a raised one, leave things alone too. But if the passer and receiver both have raised fingers in a particular position, lower both of them and raise the one next in line on the passer. Work from thumb to pinkie.

So in our example, both my thumbs are up, so I lower both of them (I'm carrying the one, in case you wanted a more mathematical analogy) and raise my index finger on my left hand. Then I move to my index fingers, and only my left hand's is raised, so I pass it to my right hand. Then I move to middle fingers, and both are raised, so I carry and raise my left ring finger. Then I pass ring fingers from left to right. And I'm left with my index and ring fingers raised on my right hand. That's 0101 in binary, or 0+2+0+8, or 10, which is what we expect. I feel like I'm teaching kindergarten, or participating in Tom Lehrer's song about new math. But I'm not being childish.

Let's take another example, to illustrate the problem with my instructions thus far. Let's add 7 to 3. That's the first three fingers raised on the left, and the first two on the right. Now starting with the thumb, both are raised, so we lower both and raise the next finger on the left... which is already raised. Crap. Fortunately, we can amend our previous rule. If a rule tells you to raise a finger that is already raised, lower it and raise the next finger instead.

So first we look at the thumbs. Both raised. We lower them and raise the index finger on the left. But it's already raised too, so we lower it and raise the middle finger. Also already raised, so we lower it and raise the ring finger on the left. This one we can raise. Then we move past the index and middle fingers, because they're already lowered on the left, and when we get to the ring finger, we pass it from left to right. Again, 0101, or decimal ten.

So our rules would be:

  1. If the passer is lowered, do nothing and move on.
  2. If the passer is raised and the receiver is lowered, pass.
  3. If both are raised, lower both and raise the next finger on the passer.
  4. If a rule tells you to raise a finger that is already raised, lower that finger and raise the next one (this would be a recursive rule, for those of you who are counting, in that if it tells you to raise a finger, it applies to itself just as much as any other rule).

Congratulations, you are adding like a computer. You can now add numbers up to 15 on each hand without breaking a sweat. If you use fingers and toes, you can add much larger numbers, although it probably takes a bit more dexterity.

What happens when you add 16 and 16 together. That's both pinkies. You run out of space on your hands. Computers would call that "overflow," but I prefer to call it, "a perfect opportunity to use your tongue as the final bit." So if you get to your pinkies and a rule is still telling you to raise something, don't be lewd, but just stick out your tongue. You can tell people, "Sorry, I'm adding." This excuse is not guaranteed to work in any circumstance. Or you could just remember that you've tripped the overflow in your head, and when it comes time to do a final tally just add 32 to the result. So to add 31 to 31, that is, all five fingers up on each hand, I lower both thumbs, because they're both raised, then I proceed up the line, lowering all my fingers on the left and sticking out my tongue, which leaves me with all my fingers on my right hand raised except my thumb, and 32 more (in the person of my tongue as the final bit), which is 2+4+8+16+32, or 62, a larger number than you can add with all your fingers, toes, and tongue, in decimal, and you're only using one hand.

Okay, this was all a bit of fluff. However, I can tell you that being able to add large numbers by simple rules without having to write them down is like having an abacus, which is, in essence, what your fingers can be if you use them properly. Instead of rows of 10 beads, you only need rows of 1 bead, which can be easily approximated by fingers. And that's something. Something else is understanding little tidbits of computer knowledge without knowing you've got them. And of course, calling your tongue "the overflow bit" can't be bad.

No comments: