Instruction pointer

From regional-training
Revision as of 20:43, 19 August 2022 by Ralph (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Usually, the Program Counter (PC) or Instruction pointer is a register that is incremented after fetching an instruction, and holds the memory address of ("points to") the next instruction that would be executed.

Processors usually fetch instructions sequentially from memory, but control transfer instructions change the sequence by placing a new value in the PC. These include branches (sometimes called jumps), subroutine calls, and returns. A transfer that is conditional on the truth of some assertion lets the computer follow a different sequence under different conditions.

See also register.