You have used computers your whole life — phones, tablets, laptops, game consoles. But have you ever stopped to think about what a computer actually is?
Here is the honest answer: a computer is a very fast machine that follows instructions. That is it. It is not magic. It is not alive. It does not think for itself. It does exactly what it is told — incredibly, blindingly fast.
Every computer — from your phone to a NASA supercomputer — is made of the same basic team of parts. Each part has one specific job, and they all work together. Before we learn to program one, let's meet the team.
Before we understand any computer part, we need one big idea: everything inside a computer is built on a tiny switch called a transistor. A transistor can only do one thing — be ON or OFF. That is it. No in-between.
A modern chip has over 100 billion of these switches, all flipping on and off billions of times per second. ON means 1. OFF means 0. That is called binary — and it is the language every computer speaks. Everything your computer does — every image, song, word, and game — is ultimately just billions of 1s and 0s.
Each switch is one transistor. ON = 1, OFF = 0. A group of 8 switches is called a byte — it can store one letter. The letter A is stored as 01000001. Click the switches to match that pattern!
Hint: switches 2 and 8 need to be ON (1). All others OFF (0).
This is why computers are so powerful — 100 billion switches flipping billions of times per second can represent anything. Numbers, colors, sounds, videos — all just patterns of 1s and 0s deep down.
If your computer were a restaurant kitchen, the CPU would be the chef. Every order that comes in — from every app, every click, every keypress — goes to the chef. The chef reads it, figures out exactly what to do, and does it. One instruction at a time. Impossibly fast.
The CPU (Central Processing Unit) is a small chip — about the size of a postage stamp — that sits on the motherboard. Inside that tiny chip are billions of transistors arranged into circuits that can do math, compare numbers, move data around, and make decisions.
Everything your computer does is the CPU executing a list of instructions. It never stops. It never rests. From the moment you turn on your computer to the moment you turn it off, the CPU is running its instruction loop — billions of times every single second.
Three billion is a number so large our brains just say "that's a lot" and give up. Let's fix that. We are going to use your own body to make it real — and then we will look at what all those cycles are actually doing.
Click each comparison to reveal it — guess first, then see the answer:
Press the button, then blink once normally, then press it again. We will calculate exactly how many CPU cycles happened during your blink.
Billions of cycles per second — but what does that look like in the real world? What instructions is the CPU running right now just to show you this page?
The CPU is juggling many programs at once, switching between them so fast it feels simultaneous. Pick a scenario below and explore what is really happening inside:
For each action below, pick how many CPU cycles you think it takes. Make your best guess before clicking!
You just learned what the CPU does. Now be the CPU. Tasks fall from the top — click them before they crash the chip. Miss too many and the CPU overheats.
Now that you know what the CPU does and how fast it does it, let's look at how it actually works. Every single instruction ever run by every CPU ever built goes through the same three steps. No exceptions. No shortcuts.
This is called the Fetch-Decode-Execute cycle. Once you understand this, you understand the heartbeat of every computer ever made.
The CPU has been given the instruction: ADD 5 + 3. Click through each step and watch what happens inside the chip. This entire sequence takes about 0.0000000003 seconds in a real CPU.
The CPU is fast. Incredibly, blindingly fast. But it is also tiny — it can only hold a handful of numbers inside itself at any moment. So where does everything else live? The CPU works with a whole team, and each member has a specific job.
You are about to meet all of them. But as you do, remember: the CPU is the one giving orders. Every other part is responding to what the CPU asks for.
For each team member below — try to guess their role BEFORE clicking to reveal it:
Click a part on the left, then click its matching job on the right. Can you connect them all?
Seven questions covering everything you just learned — transistors, speed, FDE, the team, and why it all matters. Get one wrong and you'll see exactly why before trying again. Perfect score earns +50 XP.
RAM (Random Access Memory) is where your computer keeps everything it's currently working on. When you open a game, it gets copied from storage into RAM. When you have 10 browser tabs open, they're all sitting in RAM right now. The CPU reads from and writes to RAM constantly — it's the CPU's workspace.
RAM is incredibly fast but temporary. The moment you turn your computer off, every single thing in RAM is gone. That's why you save your work before closing!
Your RAM has 4 slots. Apps need to be in RAM to run. When RAM is full and a new app opens, the oldest one gets swapped out. Click apps to open them and see how RAM fills up!
This is exactly why the CPU and RAM are best friends — the CPU is always asking RAM "give me the next instruction" and "store this result." They pass data back and forth billions of times per second.
Storage (a hard drive or SSD) is where everything lives permanently. Your games, photos, music, apps, and the operating system itself — all on storage. Unlike RAM, storage keeps your data even when the power is completely off.
There are two types: HDD — uses a spinning magnetic disk, like a high-tech record player. Slower but cheap. SSD — stores data in chips with no moving parts, like a giant USB drive. Much faster and more reliable.
Click to load a game on each type of drive. Watch how their speeds compare — notice how the CPU has to WAIT for storage. This is the bottleneck!
The full picture so far: your game lives on storage, gets loaded into RAM when you open it, then the CPU reads from RAM to run it. Three parts, working together, every time you play.
The motherboard is the large flat board that every other part plugs into. It provides the roads and highways that let the CPU, RAM, storage, and all other parts talk to each other.
The CPU needs to save a file. Data has to travel CPU → RAM → Storage. Click each part in the right order to route the signal through the motherboard!
The motherboard also has slots and ports — places to add more parts. Plug in more RAM, add a GPU, add Wi-Fi. The motherboard makes upgrades possible.
The GPU is a special processor built specifically for drawing images. Every pixel on your screen — millions of them — needs to be calculated and redrawn up to 60 or 120 times per second.
While the CPU is great at complex tasks one at a time, the GPU has thousands of smaller cores that work in parallel — all painting different parts of the image at the same time. That is the only way to handle millions of pixels fast enough.
A screen is just a grid of colored dots called pixels. Try CPU Mode first — one pixel at a time. Then try GPU Mode. Feel the difference!
Input devices send information INTO the computer — keyboard, mouse, touchscreen, microphone, camera. Output devices send information OUT — monitor, speakers, printer.
Without inputs, you cannot tell the computer what to do. Without outputs, it cannot show you the result. They are how you have a conversation with the machine.
Type something below. Watch it travel through the whole computer — from your fingers, through the CPU, out to the screen. This happens every time you press a key.
The PSU converts electricity from your wall outlet into the specific types of power each component needs. Your wall gives AC power at 120 volts — but computer parts need DC power at much lower voltages.
Different parts need different amounts of power. The CPU and GPU are the most power-hungry. RAM and storage need less. The PSU delivers exactly the right amount to each one.
Click a component, then click its correct voltage. Wrong voltage = the part won't work!
This is the single most important thing to understand about programming: computers have zero common sense. They do exactly what you tell them. Not what you meant. Not what you were thinking. Exactly what you typed.
This sounds simple, but it changes everything. Let's play a game to see what that really means.
The robot wants to pick up a ball. What should it do FIRST?
When your code has a bug, it is almost never the computer's fault. The computer did exactly what you said. You just said the wrong thing! Finding and fixing bugs is one of the most important skills a programmer has.
An algorithm is a step-by-step set of instructions for solving a problem. You already use algorithms every day — you just do not call them that. Getting ready for school? Algorithm. Making cereal? Algorithm. Tying your shoes? Algorithm.
Click the steps IN ORDER (1 → 5) to build the correct sandwich algorithm:
Algorithms are everywhere in CS. Google search results, Spotify recommendations, game enemy AI — all algorithms. As a programmer, most of your time is spent designing algorithms before writing a single line of code.
Imagine writing a program that needs to remember someone's name. You could type it over and over everywhere — but what if it changes? Variables solve this. A variable is like a labeled box — put information inside, give it a name, use that name anywhere.
In the code lab, create a variable using store() and print it using say():
Variables are used in every single program ever written — scores in games, usernames on websites, temperatures in weather apps. Everything a program needs to remember goes in a variable.
You made it to the final project. This is where everything clicks together — computers, exact instructions, algorithms, variables, and say().
Your mission: program a robot. Give it a name, color, power, and catchphrase using variables. Then write a sequence of say() instructions — an algorithm — that brings it to life.
You just finished your first Computer Science lesson and built your own robot. Most people never even try. You did it.
Today you learned things that professional developers use every single day.
Next up: HTML — Building Your First Web Page.