Learn Binary
Binary numbers can seem complex and weird, but they’re actually not that hard to understand. You can learn how to read binary numbers and count in binary in just a couple of minutes, which is a pretty cool skill to have.
Boxes and acorns
Imagine that you have eight small boxes. They look like this:
Each box can either be empty or it can hold a single acorn. Try clicking a box above to drop an acorn into it. You can also click an acorn to remove it from the box. Fun!
The boxes count
Our eight boxes may look identical, but each one represents a unique value—they count for something. We’ll label the value of each box above it.
128
64
32
16
8
4
2
1
Notice the pattern here? Try looking from the right to the left. The box on the far right counts for…
Learn Binary
Binary numbers can seem complex and weird, but they’re actually not that hard to understand. You can learn how to read binary numbers and count in binary in just a couple of minutes, which is a pretty cool skill to have.
Boxes and acorns
Imagine that you have eight small boxes. They look like this:
Each box can either be empty or it can hold a single acorn. Try clicking a box above to drop an acorn into it. You can also click an acorn to remove it from the box. Fun!
The boxes count
Our eight boxes may look identical, but each one represents a unique value—they count for something. We’ll label the value of each box above it.
128
64
32
16
8
4
2
1
Notice the pattern here? Try looking from the right to the left. The box on the far right counts for 1, and then each box to the left counts for twice as much as the one before it.
When we put an acorn in a box, we’re actually activating that box’s value. As soon as the acorn is dropped in there, the value counts! No acorn, no value. Try putting some acorns in the boxes above and see how the values light up for each.
Add it up
So, we’ve got boxes, acorns, and values. And now, all that’s left to do is to add our values together. The boxes below have some acorns in them already so you can see how this works (but you can go ahead and change them if you’d like). Note the addition equation below the boxes, and how it changes as you move acorns in and out of boxes.
128
64
32
16
8
4
2
1
What about the 1s and 0s?
But this is supposed to be binary, right? Where are all of the 1s and 0s? They’ve actually been here all along, represented by an acorn (which is a 1) or an empty box (which, as you can probably guess, is a 0).
128
64
32
16
8
4
2
1
The 1s and 0s are called bits in binary. And our boxes are called cells. A whole collection of cells is called a register. But those terms don’t matter as much as the fact that you can now read binary and even count in it, too!
Why does this even matter
At their most fundamental mode of operation, computers are just throwing electricity around. The simplest representation of data, at the physical circuit board level, is whether or not current is flowing—a 1 or a 0. Machines need a way to quickly convert that raw state of on/off into usable information, and binary is a wonderfully efficient way to do that (for a computer, anyway). With just eight on/off sequences, a machine can count from 0 to 255.
Binary is the building block of all computation, and it’s a really cool thing.