Skip to content
Tactiverge

Computer

The processor is fast; the real engineering is keeping it fed with data.

Open a desktop computer (in your imagination) and you find a processor under a large cooler, memory sticks beside it, a graphics card, storage and a power supply, all joined by one big circuit board. The processor can do billions of operations a second, but only if data arrives in time, so much of the design is a hierarchy of memories, from tiny and fast to huge and slow.

  • 7 components
  • 2 worked equations
  • 1 live model
  • 2 safe experiments

1Exploded view

Take the desktop computer apart.

plate 07 · desktop computer, isometric, exploded

Tab to a numbered part (or tap it) to jump to its description. The same parts as a list:

  1. 1Motherboard
  2. 2Processor (CPU)
  3. 3CPU cooler
  4. 4Memory (RAM)
  5. 5Graphics card (GPU)
  6. 6Solid-state drive
  7. 7Power supply

2Major components

What every part does, and how.

  1. 01

    Motherboard

    Connects everything: power delivery, memory slots, expansion slots and the wiring between them.

    how →Fast signals travel on carefully matched copper traces; lengths and spacing are designed like transmission lines.

  2. 02

    Processor (CPU)

    Executes instructions: several cores, each with its own small caches, plus a shared larger cache.

    how →Pipelining overlaps the steps of many instructions; caches keep recently used data close.

  3. 03

    CPU cooler

    A heat sink and fan that carry the processor's heat into the air.

    how →Heat flows from hot to cold through a chain of thermal resistances: chip, paste, metal fins, air.

  4. 04

    Memory (RAM)

    Holds the programs and data in use, billions of bytes, but far slower to reach than cache.

    how →Each bit is a tiny capacitor that leaks, so the memory is refreshed thousands of times a second.

  5. 05

    Graphics card (GPU)

    Thousands of simpler cores that do the same operation on lots of data at once.

    how →Graphics and machine learning are full of independent arithmetic, so wide parallel hardware wins.

  6. 06

    Solid-state drive

    Keeps files when the power is off, in flash memory.

    how →Flash stores charge on an insulated gate; reading is fast but erasing works on large blocks, so a controller manages wear.

  7. 07

    Power supply

    Converts mains AC into low-voltage DC rails.

    how →A switch-mode supply chops the input at high frequency so its transformer can be small; efficiency is typically around 90%.

3System relationships

Where the energy and information go.

Each block is a part (or the world outside). Solid lines carry energy, dashed lines carry information, dotted lines carry matter such as water or air.

MainsPower supplyAC → 12 V DCMotherboardpower + wiringRAMworking memoryCPU + cachesStoragefilesGPUCoolerheat → airDisplay
Energy (solid)Information (dashed)Matter (dotted) Source Decide Convert Store Output

Flows, in order

  • Mains sends energy to Power supplyenergy: AC
  • Power supply sends energy to Motherboardenergy: DC rails
  • Motherboard sends energy to CPU + cachesenergy: core voltage
  • CPU + caches sends information to Storageinformation: save files
  • RAM sends information to CPU + cachesinformation: data + instructions
  • CPU + caches sends information to GPUinformation: draw commands
  • GPU sends information to Displayinformation: frames
  • CPU + caches sends energy to Coolerenergy: heat

Loops that close

  • Cooler feeds back to CPU + cachesinformation: temperature limit

4Physical principles

The physics doing the work.

5Mathematical foundations

The equations, with real numbers in them.

The Iron Law of performance

T = N · CPI / f

T
run time [s]
N
instructions executed [–]
CPI
average cycles per instruction [–]
f
clock frequency [Hz]

Worked example

  1. 1.T = 2 × 10⁹ × 0.8 / (4 × 10⁹)
  2. 2.T = 0.4 s
Run time
0.4 s

AssumesOne core, fixed frequency, and an average CPI that already includes cache misses.

Average memory access time

AMAT = t₁ + m₁ · (t₂ + m₂ · t_mem)

t₁, t₂
L1 and L2 hit times [ns]
m₁, m₂
L1 and L2 miss rates [–]
t_mem
main-memory latency [ns]

Worked example

  1. 1.L2 path: 4 + 0.2 × 80 = 20 ns
  2. 2.AMAT = 1 + 0.05 × 20 = 2.0 ns
Average access time
2 ns

AssumesTwo cache levels and fixed latencies; real memory latency varies with traffic.

6Computing architecture

The computer inside the system.

Here the computer is the exhibit: cores, caches, memory controller and input/output, organised as a hierarchy from registers to storage.

  1. Layer 1

    Registers and L1

    A few hundred bytes to tens of kilobytes, reached in about a nanosecond.

  2. Layer 2

    L2 / L3 caches

    Megabytes, several to tens of nanoseconds.

  3. Layer 3

    RAM and storage

    Gigabytes at around 100 ns; storage is terabytes at microseconds or more.

7Engineering trade-offs

Every choice costs something.

  • Bigger caches

    Gain:Fewer slow trips to RAM.

    Cost:More chip area and power, and a slightly slower hit time.

  • Higher clock frequency

    Gain:More cycles per second.

    Cost:Power rises steeply because voltage must rise too; heat limits it.

  • More cores

    Gain:More work done in parallel.

    Cost:Only helps programs that can be split; the serial part limits the speed-up (Amdahl's law).

8 · Try it · runs in your browser

Feed the processor

Change the cache miss rates and memory latency. Watch the average memory access time, and how a few per cent of misses can double it.

5.0 %
20 %
80 ns
Average access time
2.00 ns
Slowdown vs. always hitting L1
2.00 ×
L2 path cost
20.0 ns

Memory stalls at least double the access time: bigger or smarter caches would pay off.

5.00.0020L1 miss rate (%)ns

ModelTwo cache levels with 1 ns (L1) and 4 ns (L2) hit times; every miss waits the full latency, with no overlap.

Go further with a related simulation: Cache hit rate vs size and associativity

9Suggested safe experiments

Things to try, safely.

Every experiment here is virtual or a household-safe observation. Never open real devices, batteries or power supplies, never work on mains electricity, and never look at the Sun.

  1. Observation

    Watch the task manager

    1. Open your computer's task manager or activity monitor.
    2. Note CPU and memory use while idle, then while a video plays.
    3. Explain which resource each task stresses.

    Safety: Software only. Do not open a computer case or power supply: power supplies hold dangerous charge even when unplugged.

  2. Virtual

    Cache in the simulator

    1. Open the cache hit-rate model linked below.
    2. Double the cache size and record the hit rate.
    3. Find where extra size stops helping.

    Safety: Runs entirely in your browser.