ProgramViz
Step 320–25 minutes

Instruction Execution Cycle

The CPU runs in a continuous loop called the Instruction Cycle. Every single operation your computer performs goes through these four stages.

Fetch

The CPU gets the next instruction from memory using the address in the Program Counter.

Interactive 8-Bit Assembly Simulator

CPU Hardware Registers & Machine Stepper

Cycle Stage: FETCH
ROM Instruction Memory:
0x00MOV R0, 15
◀ CURRENT PC
0x01MOV R1, 27
0x02ADD R0, R1
0x03STORE [0x10], R0
0x04HALT
Hardware Register File & RAM:
PC (Program Counter)
0x00
ACC (Accumulator)
0
R0 Register
0
R1 Register
0
RAM Address [0x10]:0x00
Hardware Trace: Click "Step Instruction" to fetch and execute line 0x00.

The Loop Never Stops

A modern CPU repeats this cycle billions of times every second. This speed is what we call "Clock Speed" (measured in GHz).

Fetch vs Execute

Fetch is about communicating with external RAM, while Execute happens entirely inside the CPU's own circuitry.

CPU Basics