Hack #40. Count to a Million on Your Fingers

You can use binary arithmetic to count to more than a million on your fingers.

You probably already know that you can use Chisenbop [Hack #39] to count to 100 or more and do simple arithmetic on your fingers. If you switch from the decimal numeral system to binary, however, you can use your fingers to count to about 220, which is 1,048,576—more than a million!1

The Binary Numeral System

First, let's review the binary numeral system. (If you don't need a review, you can skip to the next section.)

The number system we use normally is called the decimal numeral system because it is based on powers of 10. For instance:

4309 = (4 x 1000) + (3 x 100) + (0 x 10) + (9 x 1)

Note that in the decimal system there are 10 digits: 0 to 9. Each position in a decimal number corresponds to a power of 10; for instance, 3 is in the hundreds position in the decimal number 4,309.

The binary numeral system is based on powers of 2, so there are only two digits, 0 and 1. These are referred to as bits, which is short for binary digit. Thus, in binary:

               10011 = (1 x 16) + (0 x 8) + (0 x 4) + (1 x 2) + (1 x 1) = 19

Tip

In this hack, I'll highlight binary numbers in bold, so you can tell them apart from ordinary decimal numbers. Without some convention, it would be impossible to tell whether a number like 10011, with only 1s and 0s, is binary or decimal.

Notice that because only 1 and 0 are used, there's no real multiplication here: we just add up the positions with 1s in them. In the case of 10011, that's 16 + 2 + 1 = 19.

In Action

Now we can explain how to count on your fingers in binary. The basic idea is to have a finger designate each position. Let's start with one hand. For example, suppose that on the right hand, the thumb is the 1 position, the index finger is the 2 position, the middle finger 4, the ring finger 8, and the pinky 16. Each finger can be down (representing 0) or up (representing 1).

Start with all fingers in the down position. Thus, each position has a 0, and this represents the number zero (00000 = 0). You can represent any 5-bit number with one hand. For instance, to represent 10011 (which is 19 in decimal) using the system outlined in the previous section, place your fingers as in Table 4-4 and Figure 4-2.

Table 4-4. Fingers in the (decimal 19) position

FingerValueGestureBit
Pinky16Up1
Ring8Down0
Middle4Down0
Index2Up1
Thumb1Up1
Fingers in the 10011 (decimal 19) position

Figure 4-2. Fingers in the 10011 (decimal 19) position

The rule for adding 1 is simple: each time you increment the number, look for the smallest-position finger that is down. Raise it, and lower all fingers in even smaller positions.

For example, starting with 19 as in the previous example, we would raise the middle finger (the 4 position) and lower the index finger and thumb (the 2 and 1 positions, which are those smaller than the 4 position). Keep the pinky and ring fingers in the same position, as shown in Table 4-5 and Figure 4-3. This represents the number 10100 (16 + 4 = 20).

Table 4-5. Fingers in the (decimal 20) position

FingerValueGestureBit
Pinky16Up1
Ring8Down0
Middle4Up1
Index2Down0
Thumb1Down0
Fingers in the 10100 (decimal 20) position

Figure 4-3. Fingers in the 10100 (decimal 20) position

Incrementing again, we would just raise the thumb (since it's the smallest-position finger that's down). Since there are no smaller positions than the thumb, no fingers are lowered. The number represented is 10101 (16 + 4 + 1 = 21).

With only one hand, we can represent numbers up to 11111 (31). To get up to 1,000, we proceed to the other hand: the thumb on the left hand represents the 32 position, the index finger represents 64, the middle finger 128, the ring finger 256, and the pinky 512. With this, we can represent numbers up to 1111111111 (1,023). For instance, 1,000 is represented as 1111101000 because 512 + 256 + 128 + 64 + 32 + 8 = 1,000. (See Table 4-6 and Figure 4-4.)

Table 4-6. Fingers in the 11111010000 (decimal 1,000) position

Left hand   Right hand   
FingerValueGestureBitFingerValueGestureBit
Pinky512Up1 Pinky16Down0
Ring256Up1 Ring8Up1
Middle128Up1 Middle4Down0
Index64Up1 Index2Down0
Thumb32Up1 Thumb1Down0
Fingers in the 1111101000 (decimal 1,000) position

Figure 4-4. Fingers in the 1111101000 (decimal 1,000) position

Tip

An alternate way of figuring this out is to compute the left hand separately, multiply it by 32, and add the right hand. For example, on your left hand: 11111 = 31; 31 × 32 = 992. Then, compute on your right hand: 01000 = 8. Finally, 992 + 8 = 1,000.

That gets us past 1,000, but we're out of fingers. So why did we say you can count to a million this way? The same fingers can simultaneously represent a new, independent set of bits, which will have values 1,024, 2,048, and so on, up to 524,288. For these higher-valued bits, a finger held straight is off (0), and a curled finger is on (1).

Now that you've added curled fingers to your binary repertoire, the rule for incrementing must be extended. The previous rule of raising the smallest-position lowered finger and lowering all the fingers in smaller positions still applies. Now, however, if and only if all of your fingers are raised (whether curled or straight), and you want to add 1, lower all your fingers, curl the smallest-position straight finger, and straighten any lower-position curled fingers.

Let's see how we'd represent 1,000,000 with this scheme. 1,000,000 = 11110100001001000000, because 1,000,000 = 219 + 218 + 217 + 216 + 214 + 29 + 26 = 524,288 + 262,144 + 131,072 + 65,536 + 16,384 + 512 + 64.

Splitting this into groups of five (for the five fingers), we must position our fingers as shown in Table 4-7.

Table 4-7. Fingers in the 11110100001001000000 (decimal 1,000,000) position, by hand

BitGesture
11110Left hand curled/straight
10000Right hand curled/straight
10010Left hand up/down
00000Right hand up/down

Finger by finger, 1,000,000 (11110100001001000000) looks like Tables 4-8 and 4-9 and Figure 4-5.

Table 4-8. Lefthand fingers in the 11110100001001000000 (decimal 1,000,000) position, finger by finger

FingerValueGestureBitValueGestureBit
Pinky524,288Curled1512Up1
Ring262,144Curled1256Down0
Middle131,072Curled1128Down0
Index65,536Curled164Up1
Thumb32,768Straight032Down0

Table 4-9. Righthand fingers in the 11110100001001000000 (decimal 1,000,000) position, finger by finger

FingerValueGestureBitValueGestureBit
Pinky16,384Curled116Down0
Ring8,192Straight08Down0
Middle4,096Straight04Down0
Index2,048Straight02Down0
Thumb1,024Straight01Down0
Fingers in the 11110100001001000000 (decimal 1,000,000) position

Figure 4-5. Fingers in the 11110100001001000000 (decimal 1,000,000) position

In Real Life

Instead of holding one number on both hands, you can store one number on each hand. This might be useful in keeping score in a two-player game, for instance.

Additional bits are available elsewhere on your body: for instance, your wrists.

Once you get familiar with binary numbers, you can experiment more with addition and even try subtraction (these might make being able to represent numbers up through 1,000,000 more useful).

How It Works

Incrementing is just adding 1, and binary arithmetic works the same as decimal arithmetic (except it's easier because there are only two bits). For instance, the computation we did as the first example (19 + 1 = 20, in decimal) works like this:

                 11
               10011
               +   1
               _____
               10100
            

Since the lowest position is 1, adding 1 gives 2, which is 10 in binary. So, we put down 0 and carry the 1. (This corresponds to lowering the thumb.) Adding the carry to the 1 in the 2 position again gives 10, so we again have 0 with a carried 1. (This corresponds to lowering the index finger.) In the 4 position, we have a 0, and 0 + 1 = 1. (This corresponds to raising the middle finger.) The other digits remain the same, just as the corresponding fingers do.

The next increment (20 + 1 = 21) is simple, because there are no carries:

 
               10100
              +    1
              ______
               10101
            

This matches what we did with the fingers: we just raised the thumb.

The rule for fingers (find the smallest-position finger that's down, raise it, and lower all smaller-position fingers) corresponds to finding the rightmost 0, changing it to a 1, and replacing any 1s to the right with 0s. That's exactly what the carries do, as you can see in the first addition.

End Notes

  1. Mentat Wiki. "Physio Arithmetics." http://www.ludism.org/mentat/PhysioArithmetics.

Mark Purtill

Get Mind Performance Hacks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.