How Computers Really Work

Lesson 1 of 9Grades 9–12

You have been using computers for years — but how do they actually work? From transistors switching billions of times per second to the operating system managing memory and processes, this lesson opens the hood on the machine you use every day.

Key Concepts

Transistors and Logic Gates

A transistor is a tiny switch — on or off, 1 or 0. Billions of them on a chip. Combine two transistors in the right pattern and you get a logic gate: AND returns 1 only when both inputs are 1; OR returns 1 when either is; NOT flips the bit. All computation is built from these.

CPU, Memory, and Storage

The CPU (Central Processing Unit) executes instructions — billions per second. RAM (Random Access Memory) holds data currently in use — fast but temporary. Storage (SSD/HDD) holds data permanently — slower but lasting. The speed gap between CPU and RAM is why caching exists.

The Fetch-Decode-Execute Cycle

Every CPU instruction follows the same cycle: Fetch (read the next instruction from memory), Decode (figure out what it means), Execute (carry it out), Write Back (store the result). Modern CPUs do this out-of-order and with multiple cores, but the cycle is the foundation.

🆕 CPU Cycle Simulator

Step through the fetch-decode-execute cycle for a simple program.

✅ Check Your Understanding

1. What is a transistor?

2. What is the Fetch-Decode-Execute cycle?

3. Why is RAM faster than storage (SSD/HDD)?