The chip in a phone holds about 15 billion tiny switches called transistors. Each one can only be ON or OFF. So how can on-and-off play music, run games and do math? The answer comes in three layers: binary, logic gates and the CPU.
Your mission: start as a Switch Flipper. Count from 0 to 255 with eight light bulbs, wire logic gates into an adder that can do 1 + 1, then run a tiny CPU one step at a time and watch it fetch, decode and execute. Top rank: CPU Architect.
Tap a bulb to turn it ON (1) or OFF (0). Each bulb has a place value: 1, 2, 4, 8… from the right, doubling each time. Add up the lit values and you have the number.
All eight on: 128+64+32+16+8+4+2+1 = 255. Counting 0, that’s 256 patterns (2⁸). One more needs a 9th bulb — just like 999 + 1 needs a 4th digit in decimal.
1 bit = one 0 or 1. 8 bits = 1 byte — enough for one English letter. 1 KB ≈ a thousand bytes (a short page of text), 1 MB ≈ a million (a phone photo is about 3 MB), 1 GB ≈ a billion (about an SD movie).
Yes! An English letter fits in 1 byte (A = 65). There are tens of thousands of Chinese characters, so Unicode numbers them all: 中 is number 20013, stored as 3 bytes in UTF-8.
Hex uses 0–9 and A–F for 0 to 15, so one hex digit = exactly 4 bits. 11111111 becomes just FF. Web colours like #FF8800 are written this way.
Logic gates are tiny circuits made of transistors: AND, OR and NOT. Click a dashed box to choose a gate; click switches A and B to try it out. The circuit must be right for all 4 switch combinations. Pass on the first test for 3 stars.
Yellow wire = 1 (on), grey wire = 0 (off).
A CPU (central processing unit) repeats three jobs forever: fetch the next instruction from memory, decode what it means, execute it. Press Step to watch each phase; click any part to learn what it does. You can edit the data cells in memory and run again.
ENIAC (1945) weighed 30 tons. A phone chip today is smaller than a fingernail and millions of times faster. The secret: transistors keep shrinking, so more fit on each chip. Drag the slider to read each chip’s transistor count.
About 17,468 vacuum tubes filling a big room; about 5,000 additions a second.
Used integrated circuits to help fly astronauts to the Moon; only 2,048 words (about 4 KB) of erasable memory.
A Chinese supercomputer built with Chinese-designed Sunway processors; No. 1 on the world TOP500 list 2016–2018.
One fingernail-sized chip running billions of instructions every second.
Each grid line is 10× more! The count doubled about every two years — “Moore’s law” (an observed trend, not a law of nature).
Data: transistor counts published by the chip makers (approximate, compiled by the author).
Pick the best answer and read the explanation.
Drag each item (or tap it, then tap a box) into the right group.
US standards: CSTA K-12 CS Standards (2017) 2-CS-02 (design projects that combine hardware and software), 2-DA-07 (represent data using multiple encoding schemes: binary, hex, ASCII/Unicode); also touches 2-AP-10 (algorithms as step lists — the CPU programs). Georgia K-12 Computer Science Standards (grades 6–8): CSS.DC.6-8.8.2 (key components: I/O devices, processor, memory, storage), 8.3 (RAM, ROM, GHz, MB, GB), 8.6 (how computers process commands: binary, hex, sequences, conditionals, loops); CSS.CT.6-8.33.3 (input–process–output–storage model), 35.1 (binary numbers and logic), 38.2 (high-level language → translation → instruction set → logic circuits); CSS.KC.6-8.20.3 (how computers represent data). Codes as listed in GaDOE’s 6–8 CS framework (via CodeHS); check wording against the GaDOE document.
China’s curriculum: Compulsory Education Information Technology Curriculum Standard (2022), core strands “data” (数据) and “information processing” (信息处理). Stage 2 (grades 3–4) module “Data and encoding” (数据与编码: representing information with binary codes); Stage 3 (grades 5–6) “Process and control” (过程与控制: input–compute–output, switches and logic); Stage 4 (grades 7–9) builds on how computer systems are made and work. Textbook editions and lesson numbers vary.
Notes: the tiny CPU is a simplified teaching model (like the Little Man Computer, with decimal codes; real CPUs use binary, pipelines and several cores). Figures for ENIAC, the Apollo Guidance Computer and Sunway TaihuLight, and the chart’s transistor counts, are approximate values written from the author’s knowledge of published sources — teachers may wish to check them.
Suggested use: have students count in binary on their fingers first (one hand reaches 31). After the half adder, ask “are 8 half adders enough for 8-bit addition?” (no — full adders handle the carry coming in). In the CPU, change the countdown’s step from 1 to 2 and ask students to predict and explain the endless loop.