🔵 🔵 🔵


Primary

၊၊||၊|။

Program Counter (PC) ○꠹|Definition|1st|20251119205401-00-⌔

Program counter - Wikipedia

Program counter

🖼️ ➺

A program counter (PC)1 is a register that stores where a computer program is being executed by a processor.2 It is also commonly called the instruction pointer (IP) in Intel x86 and Itanium microprocessors, and sometimes called the instruction address register (IAR),31 the instruction counter,4 or just part of the instruction sequencer.5

Usually, a PC stores the memory address of an instruction. Further, it usually is incremented after fetching an instruction, and therefore points to the next instruction to be executed.6 For a processor that increments before fetch, the PC points to the instruction being executed. In some processors, the PC points some distance beyond the current instruction. For instance, in the ARM7, the value of PC visible to the programmer reflects instruction prefetching and reads as the address of the current instruction plus 8 in ARM State, or plus 4 in Thumb State.7 For modern processors, the location of execution in the program is complicated by instruction-level parallelism and out-of-order execution.

By default, a processor fetches instructions sequentially from memory, but a control transfer instruction changes the sequence by writing a value in the PC. A branch allows the next instruction to be fetched from elsewhere in memory. A function call not only branches but saves the value of the PC. A return restores the value of the PC to resume execution with the instruction following the call by branching to the saved value. A transfer that is conditional on the truth of some condition lets the computer follow a different sequence under different conditions.

Printed 2026-06-28.

(echo:: @ )

Footnotes

  1. Hayes, John P. (1978). Computer Architecture and Organization. McGraw-Hill. p. 245. ISBN 0-07-027363-4. 2

  2. Bates, Martin (2011). “Microcontroller Operation”. PIC Microcontrollers. Elsevier. pp. 27–44. doi:10.1016/b978-0-08-096911-4.10002-3. ISBN 978-0-08-096911-4. Program Counter (PC) is a register that keeps track of the program sequence, by storing the address of the instruction currently being executed. It is automatically loaded with zero when the chip is powered up or reset. As each instruction is executed, PC is incremented (increased by one) to point to the next instruction.

  3. Mead, Carver; Conway, Lynn (1980). Introduction to VLSI Systems. Reading, USA: Addison-Wesley. ISBN 0-201-04358-0.

  4. Principles of Operation, Type 701 and Associated Equipment (PDF). IBM. 1953.

  5. Harry Katzan (1971), Computer Organization and the System/370, Van Nostrand Reinhold Company, New York, USA, LCCCN 72-153191

  6. Silberschatz, Abraham; Gagne, Greg; Galvin, Peter B. (April 2018). Operating System Concepts. United States: Wiley. pp. 27, G-29. ISBN 978-1-119-32091-3.

  7. “ARM7TDMI (Rev3) Reference manual”. ARM Limited. 2001. Retrieved 2026-01-05.

Link to original

Secondary

• • •