[prev] 8 [next]

Fetch-Execute Cycle

All CPUs have program execution logic like:

while (1)
{
   instruction = memory[PC] 
   PC++  // move to next instr
   if (instruction == HALT)
      break
   else
      execute(instruction)
}


PC = Program Counter, a CPU register which keeps track of execution

Note that some instructions may modify PC further (e.g. JUMP)