On, Off, and Everything Between
Underneath everything, a computer holds just one tiny thing: a switch that is on or off. Meet the bit.
A quick note on how we teach here. You won't find equations or numbers in this series, and that is on purpose. The goal is understanding, not arithmetic, so every idea is explained in plain words and simple pictures. When you want the math later, the rest of Internals Decoded is ready for you.
Welcome back. Last time we saw that a computer is a helper that follows instructions. You give it a task, and it does the work, step by step. Today we are going to look at the simplest piece of what that helper holds inside. It is so small you cannot see it. But once you understand it, you will have the key to how every photo, every song, and every message gets stored.
That tiny piece is nothing more than a switch. A switch that is on or off.
A wall of light switches
Picture a long row of light switches on a wall. Each switch can be up or down. Up might mean the light is on. Down means the light is off. Right now, by itself, one switch does not tell you very much. It can only say on or off. If you look at that single switch, you have no idea what it stands for.
Now imagine you and a friend own that whole wall of switches. You decide ahead of time on a secret code. You agree that a particular pattern of ups and downs means hello. When you flip the switches to that exact arrangement, the wall no longer looks random. It carries a message. Your friend walks in, sees the pattern, and knows you just said hello.
The meaning does not live in any single switch. It lives in the pattern across the whole wall.
Inside a computer, the memory is like that wall. It holds a huge number of tiny switches, far more than you could ever count. They are not physical switches you flip with your finger. They are electronic and far too small to see. Countless of them fit on a chip the size of your fingernail. But the idea is exactly the same. Each one can be on or off. Nothing else. That is the only alphabet a computer has. Not letters, not colors, not even numbers the way you write them. Everything, numbers included, has to be spelled out in on and off, spread across a great many switches like a wall of light.
Agreeing on the pattern
So how does a computer ever show you the letter A? It never sees the shape of A. It stores a pattern of ons and offs that everyone agreed will stand for A. A long time ago, people who build computers made a shared list. They said, "When you see this exact pattern of ons and offs, treat it as A." That list became a common language that computers and software share. Today's version of that list is called Unicode. It covers the letters of nearly every language, and even emoji.
When you type the letter A on your keyboard, the computer does not tuck the shape away in its pocket. It flips a handful of its tiny switches into the agreed pattern. Later, when it shows you the letter on the screen, it looks at that same pattern again and lights up the right dots so you see an A.
Sounds and colors work the same way. Turning the World Into Switches, the piece after this one, shows exactly how.
What matters is the agreement. As long as everyone understands the same pattern, the message carries. The computer itself never needs to know what a sound feels like or what the color blue looks like. It just faithfully remembers the patterns.
Building up from tiny pieces
A single switch can only say on or off. That seems like far too little to do anything useful. But when you link many switches together, the number of possible patterns becomes enormous. Think of the wall of light switches again. With just a handful of switches lined up, you can make a surprising variety of different up and down arrangements. Extend that wall to a whole room, and the possible patterns grow beyond anything you could name.
Why do the patterns grow so fast? Every switch you add doubles the number of patterns the row can make. Picture it: whatever patterns the row could make before, it can now make each of them twice, once with the new switch up and once with it down. Put those patterns in an agreed order and the row can count, like a car's mileage counter rolling over, except each little wheel can only show on or off. Counting with only on and off is called binary, and it is how a row of switches holds a number.
This is the secret. The building blocks are incredibly simple. But because you can combine so many of them, you can represent anything. A word is just a sequence of letters, and each letter is a pattern of switches. String those together and you get a sentence, then a paragraph, then a whole book. Every message you send, every image you take, and every video you watch is, at the bottom, a vast arrangement of ons and offs.
People who work with computers have a friendly name for one of these tiny on or off switches. They call it a bit. That is all a bit is: a single switch holding an on or off state. A bit has no in between. Everything between, from a single letter to a whole film, is built by combining bits. A small, fixed group of bits is called a byte. When your phone says a photo takes up so many megabytes, it is measuring the photo in big bundles of bytes. That means a great many of these little switches, each one sitting quietly in an on or off position.
The computer does not see the big picture. It only sees an army of bits, one after another, all in patterns you helped invent.
Where this is heading
We have now met the bit. It is the smallest piece of everything a computer holds. A single on or off seems almost invisible, but enormous collections of them, arranged in patterns we all agree on, can stand for any number, any letter, any color, any sound.
That leads to a natural question. How does something from the real world, like your voice or a photograph of a sunset, ever get turned into a pile of bits in the first place? The journey from what you see and hear to the switch patterns inside the machine is a much gentler ride than you might expect.
Test yourself
You and a friend use a row of switches to send secret messages, but you run out of patterns for all the words you want to say. You add another switch to the end of the row. What happens to the number of patterns the row can make, and why?
Answer: It doubles. Every pattern the row could make before can now be made twice: once with the new switch up and once with it down. That is why adding switches is so powerful. Each extra switch doubles the patterns again, so a long row can make an enormous number of them, enough for every word you could want. It is also how a row of switches can count. Put the patterns in an agreed order, like a mileage counter whose wheels only show on or off, and each pattern stands for the next number along. Counting this way is called binary.
Next: Turning the World Into Switches. It shows how a photo, a song and your words each become patterns of on and off, using codes everyone agrees on.