# program counter

> processor register that indicates the location in memory of the currently-executing instruction in the binary code of a program

**Wikidata**: [Q814194](https://www.wikidata.org/wiki/Q814194)  
**Wikipedia**: [English](https://en.wikipedia.org/wiki/Program_counter)  
**Source**: https://4ort.xyz/entity/program-counter

## Summary
The program counter is a processor register that stores the memory address of the currently executing instruction in a program's binary code. It is a fundamental component in processor architecture, enabling sequential instruction execution by pointing to the next instruction to be processed.

## Key Facts
- The program counter is a specific type of processor register, belonging to the broader class of immediately accessible working storage available as part of a digital processor.
- It is also known by several aliases: PC, instruction pointer (IP), instruction address register (IAR), instruction counter, pointeur d'instruction, registre d'adresse d'instruction, compteur d'instructions, and compteur de programme.
- The program counter is associated with historical processors, including the Zilog Z80 (inception: March 1976) and the Intel 8080.
- It is classified as a processor register and is explicitly distinct from concepts like a personal computer, a generic counter, a classifier, or a numerator.
- The entity has a sitelink count of 26 across various Wikimedia projects, indicating its documented presence in multiple languages including Arabic, Catalan, Czech, Danish, German, English, Spanish, Persian, and French.
- Its Wikidata ID is /m/0g9tz, and it is indexed by Open Library under the subject "program_counter".

## FAQs
### Q: What is the primary function of the program counter?
A: The program counter's primary function is to store the memory address of the next instruction to be fetched and executed by the processor. It sequentially points to instructions in the program's binary code.

### Q: How does the program counter differ from the instruction pointer?
A: In this context, "instruction pointer" (IP) is listed as an alias for the program counter. They refer to the same fundamental register in processor architecture that tracks the current instruction address.

### Q: Is the program counter used in modern processors?
A: Yes, the program counter (or instruction pointer) remains a core register in virtually all modern processors, including complex ones beyond the historical Z80 and 8080, enabling the fundamental execution sequence of programs.

## Why It Matters
The program counter is critically important because it is the fundamental mechanism enabling sequential program execution. Without it, processors could not reliably fetch and execute instructions in the correct order. It underpins the basic operation of every computing device, from microcontrollers to supercomputers. By automatically incrementing to point to the next instruction (or jumping to a different address via branch instructions), the program counter provides the essential "program flow" control. It is the cornerstone of the fetch-decode-execute cycle that defines von Neumann architecture, making the entire concept of stored-program computers possible.

## Notable For
- It is a core component of processor registers, specifically designed to track instruction addresses for sequential program execution.
- It is explicitly defined by the Wikidata description as "processor register that indicates the location in memory of the currently-executing instruction in the binary code of a program".
- It has a documented historical association with foundational 8-bit microprocessors like the Zilog Z80 (1976) and Intel 8080.
- It possesses a wide range of international aliases, reflecting its fundamental nature across different language computing traditions (e.g., "compteur de programme", "pointeur d'instruction").
- It is distinctly classified away from unrelated concepts like personal computers or generic counters.

## Body
### Definition and Core Function
The program counter is a dedicated processor register. Its sole purpose is to hold the memory address of the instruction that the processor is currently executing or is about to fetch next within a program's binary code. This enables the processor to sequence through instructions in the correct order.

### Processor Register Classification
The program counter is explicitly classified as a subclass of processor register. Processor registers are a form of immediately accessible, high-speed working storage integral to the digital processor's operation, providing the fastest location for data the CPU is actively using.

### Historical Processor Integration
The program counter is associated with specific historical processors, notably the Zilog Z80 (introduced March 1976) and the Intel 8080. These early 8-bit microprocessors relied on the program counter mechanism to execute their instruction sets.

### Aliases and Terminology
The program counter is known by several synonymous terms across different contexts and languages: PC, instruction pointer (IP), instruction address register (IAR), instruction counter, pointeur d'instruction, registre d'adresse d'instruction, compteur d'instructions, and compteur de programme. These aliases all refer to the same core register function.

### Documentation and Presence
The entity is formally documented, with a Wikipedia entry titled "Program Counter" available in multiple languages (Arabic, Catalan, Czech, Danish, German, English, Spanish, Persian, French). It has a sitelink count of 26, indicating its presence in 26 distinct Wikimedia projects. Its Wikidata identifier is /m/0g9tz.

## References

1. Freebase Data Dumps. 2013