Skip to content
the grown-up commonsPlay togetherBack to room

← What a Byte Holds

What a Byte Holds

Three short lessons on the counting inside every computer: binary on one hand, why a kilobyte was 1,024, and what twelve megapixels means.

Spark & Whetstone · sparkwhetstone.org/learn/what-a-byte-holds · CC BY-NC-SA 4.0. Answers are at the end, so you can try each question first.

Lesson 1. Binary on one hand

In binary each place is worth double the one before: 1, 2, 4, 8, 16. With five switches (or five fingers, up or down) you can show every number from 0 to 31.

A byte is eight such places, worth 1 up to 128, so one byte holds any number from 0 to 255: two hundred and fifty-six different values.

Question. Which places are switched on to make 21 in binary?

  1. 8, 4, 2 and 1
  2. 16, 2 and 1
  3. 16, 4 and 1

Say it back. In your own words: why can five switches count up to 31?

Lesson 2. Why 1,024

Memory is built in powers of two, and 2¹⁰ = 1,024 is the power of two closest to a thousand. For years a "kilobyte" meant 1,024 bytes.

Today there are two sets of names: a kilobyte (kB) is 1,000 bytes and a kibibyte (KiB) is 1,024. That is why a new drive often shows a little less space than the box says.

Question. Twenty yes-or-no questions can tell apart how many different things?

  1. About a million
  2. 20
  3. About 400, which is twenty times twenty

Say it back. In your own words: why do computers count in powers of two?

Lesson 3. What twelve megapixels means

A digital photo is a grid of dots called pixels. A photo 4,000 pixels wide and 3,000 high has 4,000 × 3,000 = 12,000,000 pixels: twelve megapixels.

Doubling the megapixels does not double the sharpness. Area grows as width times height, so twice the pixels makes each side only about 1.41 times as long.

Question. A screen is 1,920 pixels wide and 1,080 high. About how many pixels is that?

  1. About 3,000
  2. About 20 million
  3. About 2 million

Say it back. In your own words: why does doubling the megapixels not double the sharpness?

At the table: Twenty questions to a million

Players: Two or more, ages 8 and up. You'll need: Paper and a pencil.

  1. One person thinks of a whole number from 1 to a million and writes it down, hidden.
  2. The others ask only yes-or-no questions, such as "Is it more than 500,000?"
  3. Count the questions. Halving the range each time finds it in 20 or fewer.
  4. Try a bad strategy ("Is it 7?") and compare how many questions that takes.

Answers

  1. 16, 4 and 1 — 21 = 16 + 5 = 16 + 4 + 1, so the 16, 4 and 1 places are on: 10101 in binary.
  2. About a million — 2²⁰ = 1,048,576, about a million: 1,024 × 1,024. That is why twenty questions is such a good game.
  3. About 2 million — 1,920 × 1,080 = 2,073,600, about 2 megapixels — the "full HD" screen.