Start
0 XP
Module 1 · Lesson 1
🖥️
Intro to Computer Science

What is a Computer?

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.

💡 Think about this
Your brain can do amazing things computers cannot — feel emotions, understand jokes, recognize a friend's face in a crowd. But a computer can run through billions of steps per second without ever getting tired or distracted. Different tools for different jobs!

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.

How Computers Think · 1 of 8
The foundation of everything

Transistors — Tiny Switches

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.

🎮 Flip the switches — spell the letter A!

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).

Your pattern: 0 0 0 0 0 0 0 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.

How Computers Think · 2 of 8
🧠
The Central Processing Unit

CPU — The Processor

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.

🤔 Wait — billions? Every second?
That number probably sounds made up. It is not. A typical laptop CPU runs at about 3 GHz — which means 3 billion cycles per second. The next screen is going to make that number feel real, because once you truly understand it, you will understand why computers feel like magic.
CPU · How Computers Think · 2 of 8
Making a billion feel real

How fast is 3 billion per 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.

✦ CPU Cycles Since You Arrived on This Page
0
(Displayed at 1/100,000th of actual speed — real CPUs are 100,000× faster than this counter)

Click each comparison to reveal it — guess first, then see the answer:

🎮 The Blink Challenge — measure YOUR blink in CPU cycles

Press the button, then blink once normally, then press it again. We will calculate exactly how many CPU cycles happened during your blink.

CPU · How Computers Think · 2 of 8
🎮
Billions of operations — but doing WHAT?

What is the CPU actually doing?

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:

🎮 Guess the Cycles — how much does each action cost?

For each action below, pick how many CPU cycles you think it takes. Make your best guess before clicking!

💡 The real answer to "how is this possible?"
The CPU is not doing everything at once. It switches between tasks so fast — thousands of times per second — that everything feels simultaneous. A chef so fast they can stir a pot, flip a pancake, and check the oven all in the same second. To the customers, it looks like magic. To the chef, it is just very fast focus-switching.
CPU Dispatcher
Score
0
Combo
x1
Level
1
CPU TEMP 0%
Cleared
0
Missed
0
CPU
3.0 GHz
idle
🧠
CPU DISPATCHER

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.

3 Levels · Increasing Chaos
Beat all 3 levels to unlock the next lesson
Combos multiply your score
Best score saved to leaderboard
CPU · How Computers Think · 2 of 8
🔄
The instruction cycle

The CPU's Three-Step Loop

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.

📥
FETCH
Go to RAM and grab the next instruction
🔍
DECODE
Read the 1s and 0s and figure out what kind of operation it is
EXECUTE
Do the work. Store the result. Loop back to FETCH.
🔗 How this connects to transistors
Remember those ON/OFF switches? The instruction that arrives during FETCH is a specific pattern of 1s and 0s — like 10110011. During DECODE, that pattern literally turns on and off different sets of transistors inside the CPU, activating the right circuits. Every step is just switches flipping. Billions of them, perfectly orchestrated.
🎮 Run a CPU cycle — step by step!

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.

CPU · How Computers Think · 2 of 8
🤝
No chip is an island

The CPU can't do it alone

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:

🎮 Match each part to its job

Click a part on the left, then click its matching job on the right. Can you connect them all?

CPU · How Computers Think · 2 of 8
📝
Check your learning

CPU — Quiz Time!

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.

How Computers Think · 3 of 8
📋
Random Access Memory

RAM — Your Desk

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!

🖥️ Why this matters for you
When a computer feels slow and laggy, it's often because RAM is full. The computer has to start swapping things in and out of slower storage — like working at a tiny desk and constantly digging through filing cabinets. More RAM = bigger desk = faster computer.
🎮 Manage the desk — keep RAM organized!

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.

How Computers Think · 4 of 8
💾
Hard Drives and SSDs

Storage — The Filing Cabinet

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.

🎮 Feel the speed difference!

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!

💿 HDD — Spinning disk
~100 MB/s
Ready
⚡ SSD — Flash chips
~3,500 MB/s
Ready

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.

How Computers Think · 5 of 8
🗺️
The main circuit board

Motherboard — The City Roads

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.

🔬 What those lines actually are
If you look closely at a motherboard, you see tiny copper lines running everywhere. Those are called traces — microscopic wires etched into the board. They carry electrical signals at close to the speed of light. Some motherboards have over 10 layers of these traces stacked on top of each other.
🎮 Route the signal — connect the parts!

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.

How Computers Think · 6 of 8
🎨
Graphics Processing Unit

GPU — The Painter

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.

🎮 Paint the screen — parallel vs. one-by-one!

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!

How Computers Think · 7 of 8
⌨️
How you talk to computers — and they talk back

Input & Output — The Conversation

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.

🎮 Trace the path — input to output!

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.

How Computers Think · 8 of 8
🔌
The Power Supply Unit

Power Supply — The Heartbeat

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.

🎮 Power up the computer — match each part to its voltage!

Click a component, then click its correct voltage. Wrong voltage = the part won't work!

🔗 The Full Picture
PSU powers everything → Motherboard connects everything → CPU runs instructions → fetches data from RAM → RAM loads from Storage → GPU draws the output → Monitor displays it → You see it and respond with Input → CPU receives it and starts again.
Programming Fundamentals · Lesson 1
🤖
The most important rule in programming

Computers do exactly what you say

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.

🎮 Robot Game — Give the robot instructions!

The robot wants to pick up a ball. What should it do FIRST?

🤖
Awaiting instructions, human...

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.

📖 Fun Fact — The First Real Bug
The word "bug" in programming comes from 1947, when engineer Grace Hopper found an actual moth stuck inside a computer causing errors. She taped it in her notebook and wrote "First actual case of bug being found." The word stuck!
Programming Fundamentals · Lesson 2
📋
The recipe for everything

What is an Algorithm?

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.

🥪 The Peanut Butter Test
Teachers sometimes tell students to write instructions for making a peanut butter sandwich — as if explaining it to a robot. Then the teacher follows them EXACTLY. If you wrote "put peanut butter on bread," the teacher places the whole jar on top of the whole loaf. Kids always laugh — and never forget to be specific again!

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.

💻 Lab 1Hello, World!
 program.code
  📟 Output
📋 Mission:Loading...
Programming Fundamentals · Lesson 3
📦
Storing information

Variables — Giving things names

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.

📦 The Box Analogy
A cardboard box with a sticky note that says "myName". Inside you put "Alex". Whenever you need the name, look at the box labeled "myName." The box remembers so you do not have to.

In the code lab, create a variable using store() and print it using say():

store("name", "Alex") // put "Alex" in box "name"
store("age", "11") // put "11" in box "age"
say("name") // look in "name" box → prints Alex
say("age") // look in "age" box → prints 11

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.

💻 Lab 2Variables
 program.code
  📟 Output
📋 Mission:Loading...
Final Project
🤖
Put it all together

Build Your Robot's Brain

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.

🧠 What you will use
Variables — store your robot's traits
say() — make it speak and introduce itself
Order matters — your algorithm runs top to bottom
📋 Requirements:
Store at least 4 variables (name, color, power, catchphrase)
Write at least 4 say() lines telling your robot's story
End with your robot's catchphrase using its variable
🏆 Final Project Build Your Robot's Brain
 robot_brain.code
  🤖 Robot Profile
📋 Mission:Store 4 variables, write 4+ say() lines, end with your catchphrase variable!
🏆

You are a Programmer!

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.

+200 XP
Lesson Complete
Intro to CS ✦ Earned
✓ How Computers Work ✓ All 8 Components ✓ Exact Instructions ✓ Algorithms ✓ Hello World ✓ Variables ✓ Final Project

Next up: HTML — Building Your First Web Page.

💡 Hint