Module 2 · On and Off

Why does every storage number come in bytes?

Lesson 2.3 · Eight Bits Make a Byte

Sarah · Jenny · Mark

Eight switches. The cardboard is getting long.

Four switches only get you to 15, and Sarah wants to know how anyone stores a number like her bank balance.

Jenny tapes four more switches onto the cardboard: 128, 64, 32, 16. Eight switches now. Mark asks how high that goes.

Jenny says to find out.

The short answer

Because a byte, eight switches, is the handy-sized chunk computers settled on: enough for a letter, a small number or one shade of a color. Everything bigger is just a lot of bytes in a row. Grandma Ruth’s 500 GB drive is about 500 billion of them.

Try it yourself

Now there are eight switches. Make each number.

Make 100

1 of 3

128
64
32
16
8
4
2
1

Adds up to 0

What you just did has a name

A byte

A byte is eight bits.

It can hold 256 different patterns, enough for a number from 0 to 255, one letter, or one shade of one color.

Bytes are the unit computers count storage in: a kilobyte is about a thousand of them, a megabyte about a million, a gigabyte about a billion, and a terabyte about a trillion.

A few more things

Why eight?

Early computers used groups of all sorts of sizes. Eight won out in the 1960s and 70s because it was big enough for every letter and symbol on a keyboard and a tidy power of two. It stuck.

Bigger numbers use more bytes

Your bank balance doesn’t fit in one byte, so computers string bytes together. Four bytes count past four billion. Eight bytes count past eighteen quintillion.

A GB is a lot of switches

Grandma Ruth’s 4 GB of RAM is about 4 billion bytes, which is about 32 billion switches, spread over the two little sticks Jenny found, each smaller than a stick of gum.

Go deeper

The longer version, if you want it.

Kilo means a thousand. Mostly.

Computers like powers of two, and 1,024 is a power of two close to 1,000. So for decades a “kilobyte” sometimes meant 1,024 bytes and sometimes 1,000, depending on who was talking. Drive makers use 1,000. Windows uses 1,024.

That gap is why a drive sold as 500 GB shows up as about 465 GB on the computer. The bytes are all there. They’re being counted in different-sized buckets.

Quick check

How many different patterns can one byte hold?

Let’s take it slower

Every switch you add doubles the number of patterns. One switch: 2. Two: 4. Three: 8. Keep doubling and by eight switches you’re at 256. That bundle of eight is a byte, and it’s the unit every storage number is built on, the way a dozen is the unit for eggs.

More examples

1

A text message

“See you at 6” is 12 characters, so about 12 bytes. A thousand texts like it would fit in about 12 KB.

2

One pixel

A color on screen is usually three bytes: one for red, one for green, one for blue. Module 13 lets you mix them yourself.

Back to the question

So why does storage come in bytes?

Show the answer

Because a byte, eight switches, is the handy-sized chunk computers settled on: enough for a letter, a small number or one shade of a color. Everything bigger is just a lot of bytes in a row. Grandma Ruth’s 500 GB drive is about 500 billion of them.

One last question

Sarah’s phone says a photo is 3 MB. About how many bytes is that?

Talk Card

Talk Card · 2.3

A byte is eight bits, enough for 256 patterns. Storage is counted in bytes: kilo, mega, giga and tera are about a thousand, million, billion and trillion.

How Computers Work · pettigrewlab.com/learn

Next lesson