Lesson 1.1 · Free

Introduction — The Computer System

A computer is not one mysterious box. It is a few big parts that work together. If you remember this diagram, every later topic (cache, pipelines, interrupts) has a place to sit.

1. The computer-system diagram

Think of three workers and one road:

This is the classic stored-program picture: programs live in memory, the CPU reads them, and I/O is how humans and other devices join in. Later lessons add caches, DMA, and interrupts — they do not replace this map; they refine it.

2. What is the CPU?

CPU means Central Processing Unit — the part that actually runs instructions.

Inside the CPU (from the diagram)

  • ALU (Arithmetic Logic Unit) — does the math and logic: add, subtract, AND, OR, compare.
  • Registers — tiny, very fast storage inside the CPU. The values you are using right now sit here (like a few sticky notes on the desk, not the whole filing cabinet).
  • Control unit — the traffic cop. It reads the next instruction, decides what should happen, and sends control signals (“read memory”, “add these two registers”, “write the result”).

In one sentence: the CPU fetches an instruction from memory, decodes it, then executes it. Repeat that loop billions of times per second.

3. What is memory?

Memory is where the computer keeps programs (the list of instructions) and data (the numbers those instructions work on).

Three layers you will hear all semester

  • Primary memory — RAM (working memory, lost at power-off) and ROM (fixed startup code). The CPU can reach this relatively quickly over the bus.
  • Secondary memory — SSD, HDD, microSD. Huge and cheap. Keeps files when the laptop is off. Too slow to feed the CPU every cycle, so programs are copied into RAM first.
  • Cache memory — a small, extra-fast copy of recently used RAM, usually built from SRAM and sitting next to the CPU. Hits are fast; misses wait for DRAM.

Need the video-buffering story for cache vs DRAM? See the public article Primary vs Secondary Memory.

4. What is I/O?

I/O means Input / Output — anything that is not “the CPU thinking” or “memory storing”.

Input devices

  • Bring information into the system.
  • Examples: keyboard, mouse, touchscreen, microphone, camera, network receive.

Output devices

  • Send results out of the system.
  • Examples: monitor, printer, speaker, LEDs, network transmit.

The CPU rarely “is” the keyboard. A controller chip talks on the bus, and the CPU reads or writes registers that represent keys, pixels, or packets.

5. What is the system bus?

A bus is a shared set of connections. Instead of a private wire from every chip to every other chip, CPU, memory, and I/O take turns on the same road.

Three parts of the system bus

  • Address buswhere. The CPU puts a number here that means “this memory location” or “this I/O register”.
  • Data buswhat. The actual bits travelling: an instruction word, a pixel, a key code.
  • Control busthe command. Typical signals: read vs write, memory vs I/O, clock, interrupt, reset, “transfer finished”.

Arrows on the diagram are two-way for a reason: the CPU can write data to memory, and later read data from memory. I/O uses the same idea.

Real chips often split this into several buses (PCIe, AXI, memory channels). The intro diagram is still the right first model: one shared interconnect with address, data, and control.

6. How a simple instruction uses all four

Example: “add the number in memory location 100 to a register.”

If you can narrate that story, you already understand the introduction to Computer Architecture and Organization.

7. FAQ

Is ROM primary memory?

Yes in the textbook split: primary = what the CPU can address as main store (RAM and ROM). Secondary = bulk storage like disks. ROM is still non-volatile; RAM usually is not.

Is cache part of the CPU or part of memory?

Both stories are used. Physically it is often on the CPU chip (SRAM). Logically it is a layer of the memory hierarchy. On the intro diagram we list it under Memory so you see it as “storage”, not as the ALU.

Does every computer still look exactly like this?

Phones and PCs still have CPU, memory, I/O, and interconnects. The “one fat system bus” is simplified — modern SoCs have many buses — but the three roles (compute, store, talk to the world) never go away.