How computers count with just 0 and 1, and how you can count to 31 on one hand
“There are 10 kinds of people in the world: those who understand binary, and those who don't.”
Did you get the joke? If not, don't worry. By the end of this page, you will. 😄
You count using ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. That's called base 10, probably because people have 10 fingers.
What happens after 9? You run out of digits! So you put a 0 in the ones place and carry a 1 over to a new spot, the tens place. That's how you get 10.
Every spot in a number has a job. In the number 347:
300 + 40 + 7 = 347. Each spot is worth 10 times the spot to its right: 1, 10, 100, 1000...
Now imagine you only had two digits: 0 and 1. That's binary, or base 2. Think of each digit as a light switch: 0 means off and 1 means on.
The spots work the same way as before, but each spot is worth 2 times the spot to its right instead of 10 times:
Start at 1 and keep doubling as you go left: 1, 2, 4, 8, 16. To read a binary number, add up the spots that have a 1 in them. Here's 10110:
16 + 4 + 2 = 22. So 10110 in binary is 22 in regular numbers.
In binary, 10 means one 2 and zero 1s. That's two! So “10 kinds of people” really means “2 kinds of people.” People who know binary read it as two. People who don't read it as ten and get confused.
Counting in binary works just like regular counting. You add 1 to the rightmost spot. But there's no digit “2,” so when a spot is already 1 and you add 1, it flips back to 0 and carries a 1 to the left. It's like 9 + 1 = 10, but it happens way sooner!
Spot the pattern: the rightmost digit flips every time. The next one flips every 2 counts. The next one every 4, then every 8, then every 16. Each spot flips half as often as the one to its right.
The normal way, one hand can count to 5. Each finger is worth 1, and you just count how many are up. Boring!
Here's the trick: give each finger a different binary spot. A finger that's up is a 1 and a finger that's down is a 0. Hold up your right hand with your palm facing you:
Click the fingers to raise and lower them, or press the buttons to count up one at a time.
Try it slowly on your real hand from 0 to 31. It feels weird at first, then it gets fast. (Bending your ring finger by itself is the hardest part. Everyone's ring finger is lazy.)
With every finger up you get 16 + 8 + 4 + 2 + 1 = 31. Each finger has 2 choices, up or down, so 5 fingers give you 2 × 2 × 2 × 2 × 2 = 32 different hands. One of them is all fingers down (zero), so you can show every number from 0 to 31. That's six times more than counting the normal way!
Click the fingers to make the number below. Tip: start with the biggest finger that fits, then fill in the rest.
Your other hand keeps doubling: 32, 64, 128, 256, 512. With 10 fingers you can count all the way to 1,023!
20 fingers and toes can count to 1,048,575. Good luck bending your toes one at a time, though.
A computer chip has billions of tiny switches that are either on (1) or off (0). Each one is called a bit. 8 bits make a byte, which can count to 255.
Every picture, video game, and song on a computer is stored as a giant list of 0s and 1s. Now you know how to read them. Welcome to the 10 kinds of people who understand binary. 😎