Technology · 8 min read

How a Computer Works

At its core, a computer does one thing: it reads an instruction, figures out what it means, and carries it out. Then it does it again. Three billion times per second. Everything your computer has ever done — every game, every email, every video — is the result of that single loop running at incomprehensible speed.

The core idea

CPU

Executes instructions — billions per second using the fetch-decode-execute cycle.

Memory hierarchy

Data moves from slow storage → RAM → cache → CPU registers as it's needed.

The instruction cycle

Every program is a sequence of primitive instructions the CPU executes one by one.

Key insight Your CPU doesn't actually understand the software you run. It only knows a small set of primitive instructions: move this number, add these two numbers, jump to this memory address if zero. All software — every app, every AI model, every video game — is ultimately compiled down to sequences of these primitive operations.

How it works

Click a stage to explore
CPU ALU arithmetic CTRL decode registers L1/L2 cache L3 cache 3.8GHz RAM SSD GPU VRAM memory bus storage bus RAM

The parts that make it work

CPU

The central processing unit — executes instructions via the fetch-decode-execute cycle. Modern CPUs have 8–24 cores, each capable of billions of operations per second.

RAM

Random access memory — fast, temporary working memory. The CPU reads and writes data here during active computation. Wiped when power is cut.

SSD/Storage

Permanent storage for the OS, apps, and files. 1,000× slower than RAM, but retains data without power. The CPU doesn't directly access storage — data loads into RAM first.

GPU

Graphics processing unit — thousands of small cores optimized for parallel math. Originally for rendering graphics; now also used for AI, video encoding, and scientific computing.

Motherboard

The main circuit board connecting all components. Contains the bus pathways that carry data between CPU, RAM, GPU, and storage.

Cache

Ultra-fast memory built directly into the CPU die (L1/L2/L3). Stores recently used data so the CPU doesn't wait for slower RAM. L1 cache access takes ~1 nanosecond; RAM takes ~60ns.

Memory hierarchy — access speed

CPU Register (~0.3ns) 0.3 ns
L1 Cache (~1ns) 1 ns
L3 Cache (~10ns) 10 ns
RAM (~60ns) 60 ns
SSD (~50µs) 50,000 ns
HDD (~5ms) 5,000,000 ns

Tips & maintenance

  1. Upgrading RAM is the single most cost-effective performance improvement for most computers — especially for multitasking and creative work.
  2. Replacing a hard drive (HDD) with an SSD makes a computer feel dramatically faster — boot times drop from 60 seconds to under 10.
  3. Close unused browser tabs — each tab is a separate process consuming RAM and CPU cycles.
  4. Keep storage at least 20% free — both SSDs and operating systems need headroom to manage files and maintain performance.
  5. Clean cooling vents and fans annually. Dust buildup causes thermal throttling — the CPU deliberately slows down to avoid overheating.

Common questions

RAM is your computer's working space. More RAM lets you run more programs simultaneously without them competing for resources. When RAM fills up, the OS uses slow storage as overflow (called virtual memory or swap), which causes the sluggishness you feel when a system is overwhelmed.

RAM is fast, temporary working memory — it holds data the CPU is actively using and is wiped when power is cut. Storage (SSD or HDD) is permanent and much slower — it holds your OS, apps, and files indefinitely. Think of RAM as your desk and storage as your filing cabinet.

Several causes: accumulated software and startup programs consuming more RAM and CPU, storage filling up (reducing performance headroom), thermal paste degrading (causing heat throttling), and software becoming more demanding over time while hardware stays the same.

A core is a complete execution unit — it can independently run the fetch-decode-execute cycle. An 8-core CPU has 8 of these units, each capable of running different tasks simultaneously. More cores help with multitasking and software specifically optimized for parallel execution.

A CPU has a few powerful cores optimized for complex, sequential tasks. A GPU has thousands of smaller cores optimized for doing the same simple math operation on many pieces of data simultaneously — perfect for rendering pixels, training AI models, or physics simulation.

This refers to how much memory an application can address. 32-bit software is limited to 4GB of RAM. 64-bit software can use effectively unlimited RAM. All modern computers and operating systems are 64-bit; 32-bit is only relevant when running very old software.