Computer Architecture
Understand how a CPU works, how memory is organized, and how data flows through a computer at the hardware level.
What is Computer Architecture?
Computer Architecture describes the design and organization of a computer's fundamental components — the CPU, memory, and I/O systems — and how they interact to execute programs.
The CPU
The Central Processing Unit (CPU) executes instructions using the Fetch-Decode-Execute cycle:
- Fetch — Retrieve the next instruction from memory.
- Decode — Interpret what the instruction means.
- Execute — Carry out the instruction.
Modern CPUs have multiple cores, allowing true parallel execution of multiple tasks simultaneously.
CPU Components
- ALU (Arithmetic Logic Unit) — Performs math and logical operations.
- Control Unit (CU) — Directs the operation of the processor.
- Registers — Tiny, ultra-fast memory inside the CPU for immediate values.
- Cache (L1/L2/L3) — Small, fast memory between the CPU and RAM. Reduces latency.
- Clock — Synchronizes all CPU operations. Measured in GHz (billions of cycles/second).
Memory Hierarchy
From fastest/smallest to slowest/largest:
- Registers — Inside the CPU. Nanosecond access. Bytes of capacity.
- L1/L2/L3 Cache — On or near the CPU chip. Kilobytes to megabytes.
- RAM — Main system memory. Gigabytes. ~100ns access time.
- SSD / HDD — Permanent storage. Terabytes. Milliseconds to access.
- Network Storage — Remote data. Gigabytes to petabytes. Latency varies.
Instruction Set Architecture (ISA)
The ISA defines the set of instructions a CPU can execute. Two major families:
- x86/x64 — Used by Intel and AMD. Found in most desktop and laptop computers.
- ARM — Used in smartphones, tablets, and Apple Silicon Macs. Known for power efficiency.
Von Neumann Architecture
Most modern computers follow the Von Neumann model: a single memory stores both program instructions and data, which are fetched and processed by the CPU. This architecture forms the foundation of essentially all general-purpose computers.
What's Next?
Now that you understand how hardware works, explore Operating Systems to see how software manages it, or dive into Networking to learn how computers communicate.