Computer Architecture Cheatsheet

Overview

Use this Computer Architecture reference while you build software engineering projects, review code, or refresh the syntax you reach for most.

What Computer Architecture Studies

Computer architecture defines the abstract interface between software and hardware — what a programmer (or compiler) can assume the machine will do. It spans three interrelated levels:

LevelNameConcerns
ISAInstruction Set ArchitectureInstructions, registers, addressing modes, data types
MicroarchitectureImplementationPipeline stages, cache sizes, execution units
Digital logicCircuitsGates, flip-flops, ALUs, memory cells

ISA is the contract. Two CPUs with the same ISA (e.g., x86-64) can run identical binaries even if their microarchitectures differ completely (e.g., Intel Raptor Lake vs AMD Zen 4).

Key Abstractions

  • Von Neumann model — single shared memory holds both instructions and data; CPU fetches, decodes, and executes one instruction at a time (conceptually). Almost every general-purpose CPU follows this.
  • Harvard architecture — separate instruction and data memories. Common in microcontrollers (AVR, PIC) and DSPs; also used internally by modern CPUs via split I-cache / D-cache.
  • Stored-program concept — programs are data; they can be loaded, moved, and even self-modified at run time.

The Classic Von Neumann Machine

+------------------+         +-------------------+
|      Memory      |<------->|        CPU        |
| (instructions +  |  bus    | +------+ +------+ |
|      data)       |         | | ALU  | |Regs  | |
+------------------+         | +------+ +------+ |
         ^                   |    Control Unit    |
         |                   +-------------------+
         v
    I/O Devices

Components:

ComponentRole
ALUArithmetic & logic operations
RegistersFast, on-chip storage (words)
Control UnitFetch-decode-execute sequencing
MemoryAddressable byte/word storage
I/OPeripherals, buses, DMA

Instruction Execution Cycle

  1. Fetch — load instruction from memory[PC] into IR
  2. Decode — control unit interprets opcode and operand fields
  3. Execute — ALU or memory operation performed
  4. Write-back — result stored to register or memory
  5. PC update — PC ← PC + instruction_length (or branch target)

Design Goals and Trade-offs

GoalTension
High performanceMore power, more area, more complexity
Low powerSlower clocks, fewer execution units
Low costFewer transistors, simpler design
CompatibilityConstraints on ISA evolution
SecuritySide-channel vulnerabilities (Spectre, Meltdown)

Major ISA Families

FamilyStyleExamplesNotes
x86 / x86-64CISCIntel Core, AMD RyzenDominant desktop/server
ARM (A-profile)RISCApple M-series, Cortex-ADominant mobile/embedded
RISC-VRISC (open)SiFive, VexRiscvGrowing in research & embedded
MIPSRISCClassic textbook ISALargely retired from mainstream
POWERRISCIBM POWER10High-end servers

Flynn's Taxonomy of Parallelism

ClassInstruction streamsData streamsExample
SISD11Classic uniprocessor
SIMD1MultipleAVX/SSE vector units, GPUs
MISDMultiple1Rare; fault-tolerant pipelines
MIMDMultipleMultipleMulti-core CPUs, clusters

Measures of Complexity

  • Transistor count — billions on modern dies (Apple M3 Ultra: ~184 B)
  • Die area — mm²; area = cost driver
  • TDP — Thermal Design Power (Watts), sustained power envelope
  • Process node — TSMC 3 nm, Intel 7, etc. (marketing labels, not literal dimensions)