CPU

Domain: Computer Systems

🎯 Motivation

The CPU is the brain of the computer. It executes instructions: arithmetic, logic, input/output. Understanding CPUs helps you understand why code is fast or slow.

📋 Concrete Example

A 3GHz CPU executes 3 billion instructions per second. Your Python loop runs 1 million iterations: the CPU finishes in milliseconds. But if each iteration does complex I/O, it is slow because the CPU waits.

🔗 Analogy

The CPU is like a chef in a kitchen - they follow recipes (instructions), chop ingredients (arithmetic), check seasoning (logic), and plate dishes (output). A faster chef cooks faster, but they still need ingredients delivered (I/O).