cover

Secret Number Kingdom

How do computers store pictures, words, and music as numbers?
Open up any computer, peek behind the screen, and you'll find a surprising secret: ~~there are no pictures in there~~. N

Open up any computer, peek behind the screen, and you'll find a surprising secret: there are no pictures in there. No words. No music. Just numbers โ€” oceans of them, marching past so fast they pretend to be a cat video. So how does plain old counting turn into a song, a sentence, a sunset? Let's follow the numbers and find out.

~~First, a twist:~~ computers don't even count the way we do. We have ten digits, zero through nine. A computer has **ex

First, a twist: computers don't even count the way we do. We have ten digits, zero through nine. A computer has exactly two: 0 and 1. Think of a light switch โ€” off or on, dark or bright, nothing in between. Every number a computer knows is just a long row of these switches. That's it. That's the whole alphabet.

Now, two choices doesn't sound like much. But line up a few switches and the **combinations explode**. One switch gives

Now, two choices doesn't sound like much. But line up a few switches and the combinations explode. One switch gives you two patterns. Two switches give you four. Eight switches give you 256 โ€” enough little patterns to be useful. So computers think in clumps. Each clump of switches stands for one whole number, the way a row of bricks stands for a wall.

~~Here's the magic trick~~ that makes everything else work: **you get to decide what a number *means***. A number doesn'

Here's the magic trick that makes everything else work: you get to decide what a number *means. A number doesn't know if it's a price, a temperature, or a color. It's just a number, _waiting for a rulebook to tell it its job_. Pick a rulebook, and the very same numbers become words, or pictures, or sound. Change the rulebook, change the meaning*.

~~Let's start with words.~~ We simply agree on a list: _this number means A, that number means B, this one means a comma

Let's start with words. We simply agree on a list: this number means A, that number means B, this one means a comma, that one a smiley space. It's a secret code everyone's computer already knows. So when you type "hi," your keyboard isn't sending letters at all โ€” it's sending the numbers for h and i, and the screen looks them up and paints the shapes back.

Now pictures. **Zoom way, way into any photo** and it breaks into tiny squares called ++pixels++ โ€” *like a mosaic made o

Now pictures. Zoom way, way into any photo and it breaks into tiny squares called pixels โ€” like a mosaic made of colored tiles. Each tiny tile gets three numbers: how much red, how much green, how much blue it should glow. Mix those three and you can make any color at all. A whole photo is just millions of these little red-green-blue recipes lined up in a grid.

~~Music is the sneakiest one~~, because sound is **a wiggle in the air** โ€” how do you turn a *wiggle* into numbers? Easy

Music is the sneakiest one, because sound is a wiggle in the air โ€” how do you turn a wiggle into numbers? Easy: you measure it, over and over, incredibly fast. Picture taking a height-measurement of a wave thousands of times every second. Each measurement is one number. String them together and you've captured the whole wiggle, dot by dot, like flipbook drawings that blur into motion.

~~So the big secret is this:~~ a computer **never really "knows"** what anything is. It just holds numbers and follows a

So the big secret is this: a computer never really "knows" what anything is. It just holds numbers and follows a rulebook. The same switch-patterns can be a love letter, a photo of grandma, or your favorite song โ€” depending only on which rulebook you point at them. Numbers are the clay. The rulebook is the sculptor.

And that's why your computer can do *everything* with **the very same trick**. Underneath the games and the songs and th

And that's why your computer can do everything with the very same trick. Underneath the games and the songs and the silly videos, it's all just switches โ€” off, on, off, on โ€” counting faster than thought. So next time a cat video makes you laugh, remember: somewhere inside, a flood of plain little numbers is working very hard to pretend it's a cat.

How was this book?

A Wonderleaf Book

Secret Number Kingdom

โ€” How do computers store pictures, words, and music as numbers? โ€”

Wonderleaf Editions
โ€” ex libris โ€”
A Wonderleaf Book

Secret Number Kingdom

How do computers store pictures, words, and music as numbers?

Wonderleaf Editions ยท MMXXVI
Scene 1
Open up any computer, peek behind the screen, and you'll find a surprising secret: ~~there are no pictures in there~~. N
Secret Number Kingdom2
Scene 1

Open up any computer, peek behind the screen, and you'll find a surprising secret: there are no pictures in there. No words. No music. Just numbers โ€” oceans of them, marching past so fast they pretend to be a cat video. So how does plain old counting turn into a song, a sentence, a sunset? Let's follow the numbers and find out.

3Secret Number Kingdom
Scene 2
~~First, a twist:~~ computers don't even count the way we do. We have ten digits, zero through nine. A computer has **ex
Secret Number Kingdom4
Scene 2

First, a twist: computers don't even count the way we do. We have ten digits, zero through nine. A computer has exactly two: 0 and 1. Think of a light switch โ€” off or on, dark or bright, nothing in between. Every number a computer knows is just a long row of these switches. That's it. That's the whole alphabet.

5Secret Number Kingdom
Scene 3
Now, two choices doesn't sound like much. But line up a few switches and the **combinations explode**. One switch gives
Secret Number Kingdom6
Scene 3

Now, two choices doesn't sound like much. But line up a few switches and the combinations explode. One switch gives you two patterns. Two switches give you four. Eight switches give you 256 โ€” enough little patterns to be useful. So computers think in clumps. Each clump of switches stands for one whole number, the way a row of bricks stands for a wall.

7Secret Number Kingdom
Scene 4
~~Here's the magic trick~~ that makes everything else work: **you get to decide what a number *means***. A number doesn'
Secret Number Kingdom8
Scene 4

Here's the magic trick that makes everything else work: you get to decide what a number *means. A number doesn't know if it's a price, a temperature, or a color. It's just a number, _waiting for a rulebook to tell it its job_. Pick a rulebook, and the very same numbers become words, or pictures, or sound. Change the rulebook, change the meaning*.

9Secret Number Kingdom
Scene 5
~~Let's start with words.~~ We simply agree on a list: _this number means A, that number means B, this one means a comma
Secret Number Kingdom10
Scene 5

Let's start with words. We simply agree on a list: this number means A, that number means B, this one means a comma, that one a smiley space. It's a secret code everyone's computer already knows. So when you type "hi," your keyboard isn't sending letters at all โ€” it's sending the numbers for h and i, and the screen looks them up and paints the shapes back.

11Secret Number Kingdom
Scene 6
Now pictures. **Zoom way, way into any photo** and it breaks into tiny squares called ++pixels++ โ€” *like a mosaic made o
Secret Number Kingdom12
Scene 6

Now pictures. Zoom way, way into any photo and it breaks into tiny squares called pixels โ€” like a mosaic made of colored tiles. Each tiny tile gets three numbers: how much red, how much green, how much blue it should glow. Mix those three and you can make any color at all. A whole photo is just millions of these little red-green-blue recipes lined up in a grid.

13Secret Number Kingdom
Scene 7
~~Music is the sneakiest one~~, because sound is **a wiggle in the air** โ€” how do you turn a *wiggle* into numbers? Easy
Secret Number Kingdom14
Scene 7

Music is the sneakiest one, because sound is a wiggle in the air โ€” how do you turn a wiggle into numbers? Easy: you measure it, over and over, incredibly fast. Picture taking a height-measurement of a wave thousands of times every second. Each measurement is one number. String them together and you've captured the whole wiggle, dot by dot, like flipbook drawings that blur into motion.

15Secret Number Kingdom
Scene 8
~~So the big secret is this:~~ a computer **never really "knows"** what anything is. It just holds numbers and follows a
Secret Number Kingdom16
Scene 8

So the big secret is this: a computer never really "knows" what anything is. It just holds numbers and follows a rulebook. The same switch-patterns can be a love letter, a photo of grandma, or your favorite song โ€” depending only on which rulebook you point at them. Numbers are the clay. The rulebook is the sculptor.

17Secret Number Kingdom
Scene 9
And that's why your computer can do *everything* with **the very same trick**. Underneath the games and the songs and th
Secret Number Kingdom18
Scene 9

And that's why your computer can do everything with the very same trick. Underneath the games and the songs and the silly videos, it's all just switches โ€” off, on, off, on โ€” counting faster than thought. So next time a cat video makes you laugh, remember: somewhere inside, a flood of plain little numbers is working very hard to pretend it's a cat.

19Secret Number Kingdom

~ finis ~

Tiny picture books for big little questions.

โ€” a small constellation of questions โ€”
โœฆWonderleaf
Editions