Turning the World Into Switches
How a photo, a song, and your words all become patterns of on and off that a machine can hold.
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. In the last two pieces, we saw that a computer is a machine built from tiny switches, and that a group of switches can hold a pattern of on and off. That pattern can stand for a number. But a computer does not just hold numbers. It holds your photos, your music, your typed messages. How does a picture of a sunset or a favourite song become nothing but switches?
The answer is simple. Anything we want a computer to handle, we first turn into a pattern of on and off. We agree on a recipe for the translation, and later we use the same recipe to turn it back so a person can see it or hear it.
A secret code between friends
Imagine you and a friend want to send messages without speaking. You decide on a secret code. When you want to send the word “hello,” you whistle a little tune. Your friend hears the tune and knows it means “hello” because you both agreed on it beforehand. The tune is not the word itself. It is a pattern that stands for the word.
If you wanted to send a whole sentence, you would need a longer pattern, maybe a sequence of different whistles. That is exactly what a computer does. It turns every picture, every sound, every word into a long pattern of on and off switches, using a recipe everyone agrees on. Nothing magic happens. It is just a translation, like your whistle code.
Turning a picture into switches
Think of a picture made of tiny colored tiles, like a mosaic on a wall. If you stand far back, you see the whole image. Up close, you see a grid of little squares, each a single color. A computer stores a photo in a similar way. It breaks the image into a huge grid of tiny dots. The grid is so fine that you cannot see the individual dots unless you zoom way in.
For each dot, the computer needs to record the color. To describe a color, the computer uses a small set of numbers. One number says how much red is in the color, another says how much green, and another says how much blue. Mixing these three is how a screen makes any color you can imagine. So for every single dot, the computer stores those numbers as patterns of on and off. The whole photo becomes a long, long list of switch patterns. When you open the photo later, the computer reads those patterns, rebuilds the grid of colored dots, and paints them on your screen.
Turning sound into switches
Sound is a wave that travels through the air. Picture the ocean. A wave rises and falls smoothly. If you wanted to describe that wave to someone far away, you could take a series of quick snapshots. At each moment, you measure how high the water is. You write down that height. If you take snapshots often enough, the list of heights can be used to redraw the wave.
A computer does this with sound. It listens to the sound wave and takes measurements over and over, at a furious pace. Each measurement is a number that says how strong the wave is at that instant. That number gets stored as a pattern of switches. The computer collects a long list of these measurements. When you play the sound back, the computer reads the numbers, rebuilds the wave, and sends it to a speaker. Your ear hears the smooth wave again, as if the original sound were right there.
Turning words into switches
Words are made of letters. Just like your secret whistle code, the computer has an agreed recipe for letters. Every letter, every punctuation mark, and even a blank space gets its own pattern of switches. When you type a message, each character is turned into its pattern, one after another. The computer stores that long sequence of switches. Later, it can turn them back into letters on the screen. A sentence you type becomes a string of on and off patterns, no different in principle from the patterns that hold a photo or a song.
The recipe matters
The translation only works if both sides agree on the recipe. If your friend thinks your whistle tune means “goodbye” but you meant “hello,” you have a problem. The computer world has many agreed recipes so that different machines can share pictures, sounds, and text without confusion. When you save a photo, the computer uses a recipe that says: “store the red number first, then green, then blue.” When a program opens that photo, it expects the same order. If it expected blue first, the colors would come out all wrong. These shared recipes are what let you send a picture from your phone to a friend’s phone and have it look the same.
What we call this
When we take something from the real world and turn it into a pattern of switches that a computer can hold, we call that representing it. The stored pattern is called data. So a photo file is data. A song file is data. Your typed words are data. When you hear people in AI talk about “the data,” they mean these stored patterns that stand for things in the world. The data is not the real sunset or the real song. It is the computer’s picture of it, made of switches.
Where this is heading
Now the computer can hold a picture of the world. It can store a photo, a piece of music, a written message. But holding something is not the same as doing anything with it. A photo sitting in memory is just a silent pattern. Next, we will look at how a computer is told what to actually do, step by step, so it can change a photo, play a song, or help you write a letter.