Menu
Coddy logo textTech

What is CPU

Part of the Fundamentals section of Coddy's Assembly journey — lesson 1 of 45.

The CPU (Central Processing Unit) is the brain of the computer. But unlike a human brain, it is actually very simple. It does only one thing: it reads instructions from memory and executes them, one by one, very fast. When you write Assembly code, you're giving direct instructions to the CPU.

Unlike high-level languages like Python or JavaScript that hide hardware details, Assembly language allows you to control exactly what the CPU does, step by step. 

Think of the CPU as a very fast worker who:

  • Cannot think or make decisions on its own
  • Follows simple commands like "add these two numbers" or "move this value there"
  • Does millions of these simple commands every second

Inside the CPU there are tiny storage boxes called registers. A register holds a single number. The CPU can access registers extremely fast — much faster than accessing main memory (RAM).

The CPU also has a special register called the Program Counter (PC). The PC holds the memory address of the next instruction to execute. After each instruction, the PC automatically moves to the next address.

Key facts about a CPU:

FactExplanation
It executes one instruction at a timeNo multitasking at the hardware level
It only understands numbersEverything (instructions, data, addresses) is a number
It has no memory of its own (except registers)Everything must be stored in RAM
It is incredibly fastModern CPUs execute billions of instructions per second

 

Try it yourself

This lesson doesn't include a code challenge.

quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Fundamentals