The instruction follower itself
When a laptop ad says "3 GHz, 8 cores", it is describing the chip this lesson explains — and when your code someday feels slow, the fix starts with knowing what the machine is actually doing per instruction.
The CPU (central processing unit) is the chip that actually follows instructions. It understands only a small set of primitive operations called machine code: load a value from a memory address, add two values, store a result back, jump to another instruction. Each is encoded as bits (unit 6-1), and programs sit in RAM (unit 6-2) as long sequences of them.
The CPU runs one relentless cycle:
- Fetch the next instruction from RAM
- Decode it: figure out which operation those bits encode
- Execute it, then move to the next instruction
That is all a computer does, but it does it billions of times per second (a 3 GHz CPU cycles about 3,000,000,000 times each second).
Your Python code is not machine code. The interpreter you met in lesson 1-2 is itself a program (made of machine code) that reads your text and performs it, instruction by instruction. Python's if and while become jumps, your arithmetic becomes add and multiply operations.
Quiz
Put the CPU cycle in order:
Problem
Your Python file is plain text, but the CPU only runs machine code. What is the name of the program (met in lesson 1-2) that reads your Python line by line and carries it out for you?