Megahertz, Gigahertz, Registers and Instructions: How does a CPU actually work?
summary
Covers concrete CPU mechanics: registers and instruction memory, the five-step fetch–decode–fetchdata–execute–writeback cycle, and example x86-386 assembly sequences that show why one high-level operation becomes multiple instructions. Gives clock and cache numbers (e.g. 32KB L1 / 4 cycles, L2 ~12, L3 ~36, main memory ~200 cycles) to show why memory dominates performance. Explains pipelining, calling conventions, stacks, and speculative execution and branch prediction and notes real security impact from Meltdown and Spectre exploiting those optimizations.
AI-written summary · about
chapters (14)
- 0:00Introduction to CPUs
- 2:48Building a CPU from scratch
- 7:19Modern CPU architecture
- 11:24Instruction sets explained
- 16:07Assembly language examples
- 20:33Math and logic in assembly
- 24:05Control flow and functions
- 28:46The C calling convention
- 35:26Fetch-execute cycle and clock
- 39:42Pipelining and optimization
- 41:52Branch prediction and speculation
- 45:43Memory hierarchy and performance
- 52:21RISC vs CISC architecture
- 58:02Conclusion and Q&A
related talks
01h 02mMegahertz, Gigahertz, Registers and Instructions: How does a CPU actually work?
54mx86 Internals for Fun & Profit
43mWhat Every Programmer Should Know about How CPUs Work
45mEfficient Use of Modern x86-Compatible CPUs
01h 11mPerformance engineering - being friendly to your hardware
02h 02mBuild a Computer from Scratch
42mHow shit works: the CPU
48mPerformance and Cost: How Hardware Influences Our Programs
