π Quick Recap
In Lesson 1, we learned:
-
A bus is not a yellow ride-to-school bus, but a set of wires carrying 1s and 0s.
-
There are three main buses:
-
Address bus β tells where to go.
-
Data bus β carries the actual stuff.
-
Control bus β tells what action to take (read/write).
-
Now letβs see what happens when the CPU actually uses these buses to move data.
Β
π¦ Step 1: The CPU Wants Something
Imagine youβre playing a game. You press a key, and the game character should move.
-
The CPU says: βI need the next instruction from RAM so I know what to do!β
-
The CPU takes the instructionβs address (like βbox #1010 in RAMβ) and puts that number on the address bus.
-
On the control bus, the CPU says, βREAD.β
-
Now RAM knows exactly what to do.
Β
π€ Step 2: RAM Responds
RAM checks:
-
βDid the CPU ask for box #1010?β β Yes.
-
βOkay, Iβll put the contents of that box (maybe the number 42) on the data bus.β
Now the data bus carries that number back to the CPU.
Β
π Step 3: Back and Forth
This back-and-forth happens billions of times per second:
-
CPU says, βGive me this.β
-
RAM replies, βHere it is.β
-
Or CPU says, βPut this in memory.β
-
RAM says, βOkay, stored!β
The buses are like roads that keep everything moving.
Β
π£οΈ Parallel vs Serial Travel
Not all buses are the same:
-
Parallel buses: Many wires side by side. Each wire carries 1 bit. If you have 32 wires, you can send 32 bits at once.
-
Faster for small distances.
-
Example: the old βfront-side bus.β
-
-
Serial buses: Only a few wires, but they send bits very fast one after another.
-
Fewer wires, but higher clock speeds.
-
Example: PCIe (used by modern graphics cards and SSDs), USB.
-
So: parallel = wide road, serial = super-fast train track.
Β
π§ Example: Loading an Image
Letβs say your computer is showing you a photo:
-
The CPU says, βI need part of this photo from storage.β
-
Storage device (like SSD) sends the data over a storage bus (like SATA or NVMe PCIe).
-
Data lands in RAM.
-
CPU later says, βGive me the part of the photo stored at address #12345.β
-
RAM puts that part on the data bus β CPU gets it.
-
CPU sends the processed data to the graphics card (GPU), over a fast PCIe bus.
-
GPU sends the final pixels to your monitor, using HDMI or DisplayPort wires.
All of that in just a blink.
Β
π Real-Life Analogy
Imagine a city with different roads:
-
Small local roads β carry things within one neighborhood (like address/data buses).
-
Highways β connect different neighborhoods (like PCIe).
-
Train lines β carry lots of people long distances quickly (like serial buses).
Your CPU is the mayor, always shouting orders:
-
βSend food here!β
-
βDeliver paper there!β
-
Roads (buses) make sure everyone knows where to go.
Β
π Recap
-
Data moves inside a computer using buses.
-
The CPU uses the address bus (where), control bus (what to do), and data bus (actual info).
-
Some buses are parallel (many lanes), others are serial (fewer lanes, but super fast).
-
Every time you click, type, or run a program, trillions of little trips happen along these buses.
Β