seegongsik
Saved words
Structure

Why does a computer use only 0s and 1s?

You watch videos, listen to music, do everything on your screen. Yet the computer behind it only knows two things. That whole secret fits inside a single light switch. Want to flip a few and figure it out together?

01

On, or off. Nothing in between

Picture a single switch. It's either on or off. There's no halfway, no kind-of-on. The parts inside a computer work the same way: current is either flowing or it isn't. Just two options.

So we decided to call "on" a 1, and "off" a 0. That's all 0s and 1s really are. Not some secret code, just names we gave to the two states of a switch. It's just like flipping a wall switch: up and the light comes on, down and it goes off. The same thing happens inside a computer, except the switches are too tiny to see, and there are billions of them.

0
Now: Off = 0

Go ahead, flip it on and off.

02

Wouldn't counting in tens be better?

We've got ten fingers, so counting 0 through 9 feels natural to us. Why not let the computer count in ten steps too? The catch is that telling ten different electrical levels apart, cleanly, is really hard.

Take a look below. The top row is a lamp dimmed across ten levels. They blur together, hard to tell apart, right? The bottom row is just on or off, and there's zero confusion. That's exactly why computers picked two. It's certain.

People tell 9 and 8 apart instantly, but to a machine "9 units of electricity" and "8 units" look almost the same, and they get confused easily. A tiny flicker in voltage and a 9 gets misread as an 8. On versus off, though, is such a big gap that it shrugs off most of that noise. For a computer that has to be fast and accurate, that certainty mattered more than anything.

Ten levels
Two levels

Ten steps get blurry. Two steps are crystal clear.

03

Line the switches up, and you get numbers

One switch only gives you two options, 0 or 1. But line several up and give each spot a value, and everything changes. From the right: 1, 2, 4, 8, each spot worth double the last.

1
×2
2
×2
4
×2
8
×2
16
×2
32
×2
64
×2
128

Each spot is worth double, starting from the right.

Now it's your turn. Flip the 8 switches below. Add up the values of the ones that are on, and that's the number the computer reads. Want to try making 13?

128
0
64
0
32
0
16
0
8
0
4
0
2
0
1
0
0 0 0 0 0 0 0 0
Add up the values that are on
 
0
Mission: make 13

Add up the switches that are on, and the number changes. 13 = 8 + 4 + 1.

04

Here's how it counts, one by one

Just like we roll over from 9 to 10 and start a new column, a computer carries over to the next spot when one fills up. The only difference: it rolls over right after 1. Hit play and watch the bits blink their way up.

0
0
0
0
0
0
0
0
0

The rightmost flips every step, the next every two.

Once the pattern clicks, it feels obvious that 0s and 1s can count anything in the world. Our own decimal system works on the very same idea. The only difference is whether each spot holds ten digits, 0 through 9, or just two, 0 and 1.

05

But what about letters and pictures?

Let's take one more step. A computer only handles numbers, so how does it show letters? Simple, it gave every letter a number. There's an agreed-upon table: A is 65, B is 66, and so on.

Pick a letter below. Its number turns straight into 0s and 1s, and the little dots switch on and off to spell out that number. Pictures work the same way. Write down the color of each dot as a number, and in the end it's all 0s and 1s.

This is exactly how the screen you look at every day is built. Countless dots each carry a color as a number, and that number is written out again in 0s and 1s. Letters, photos, video, look inside any of them and it's the same stream of 0s and 1s. They aren't different in kind, they're the same material shaped into different things.

A
Number 65 written as 0s and 1s
0 1 0 0 0 0 0 1

Pick a letter, and its number becomes 0s and 1s.

06

Every switch you add doubles it

Here's the coolest part. Every time you add one switch, the number of things you can represent doubles. One switch, 2 options. Two switches, 4. Sounds modest? Drag the slider all the way.

Loading 3D
2 options
1 bits · 2¹

Drag to spin it. Try adding more bits.

Just 8 switches already gives you 256. Sixteen gives you over sixty thousand. Doubling alone gets huge fast. That's the trick behind how computers hold such a big world inside such simple switches. Even the words we toss around, like gigabytes and terabytes, are really just ways of counting how many of these switches we've gathered.

In one lineA single photo, your favorite song, all of it comes down to these switches being on or off. Those 0s and 1s that looked so complicated were really just a way of counting switches.
Was this helpful? Support seegongsik
Structure