🖼️ Pictures made of numbers
Why: Turn numbers into images, one pixel row at a time.
Unlocks: Logic — how the machine makes decisions.
Lean very close to your screen (or zoom into any photo) and the illusion breaks: every picture is a grid of tiny colored squares. Each square is called a pixel.
And a pixel is exactly what you'd guess by now — a number. Store one number per square, and a whole picture becomes a list of numbers. Watch it happen:
This is just 8 numbers. Press “draw a row” and watch the computer turn each number into a row of squares: 1 = lit square, 0 = dark square.
Where does color come from?
Our little screen was just on/off. Real pixels store three numbers: how much red, how much green, how much blue — each from 0 to 255 (one byte each — recognize that ceiling?). Mix them like stage lights: 255, 0, 0 is pure red; 255, 255, 0 makes yellow; 0, 0, 0 is black.
A phone photo is about 12 million pixels × 3 numbers each — roughly 36 million numbers for one snapshot of your lunch. And the machine reads them all in the blink of an eye. Remember lesson one: not smart, just fast.
What is a photo, to a computer?