Epstein Files Full PDF

CLICK HERE
Technopedia Center
PMB University Brochure
Faculty of Engineering and Computer Science
S1 Informatics S1 Information Systems S1 Information Technology S1 Computer Engineering S1 Electrical Engineering S1 Civil Engineering

faculty of Economics and Business
S1 Management S1 Accountancy

Faculty of Letters and Educational Sciences
S1 English literature S1 English language education S1 Mathematics education S1 Sports Education
teknopedia

  • Registerasi
  • Brosur UTI
  • Kip Scholarship Information
  • Performance
Flag Counter
  1. World Encyclopedia
  2. Program counter - Wikipedia
Program counter - Wikipedia
From Wikipedia, the free encyclopedia
Register that stores where in a program a processor is executing
icon
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Program counter" – news · newspapers · books · scholar · JSTOR
(February 2025) (Learn how and when to remove this message)

Front panel of an IBM 701 computer introduced in 1952. Lights in the middle display the contents of various registers. The instruction counter is at the lower left.

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),[3][1] 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.

Hardware implementation

[edit]

In a simple central processing unit (CPU), the PC is a digital counter (which is the origin of the term "program counter") that may be one of several hardware registers. The instruction cycle[8] begins with a fetch, in which the CPU places the value of the PC on the address bus to send it to the memory. The memory responds by sending the contents of that memory location on the data bus. (This is the stored-program computer model, in which a single memory space contains both executable instructions and ordinary data.[9]) Following the fetch, the CPU proceeds to execution, taking some action based on the memory contents that it obtained. At some point in this cycle, the PC will be modified so that the next instruction executed is a different one (typically, incremented so that the next instruction is the one starting at the memory address immediately following the last memory location of the current instruction).

Like other processor registers, the PC may be a bank of binary latches, each one representing one bit of the value of the PC.[10] The number of bits (the width of the PC) relates to the processor architecture. For instance, a “32-bit” CPU may use 32 bits to be able to address 232 units of memory. On some processors, the width of the program counter instead depends on the addressable memory; for example, some AVR microcontrollers have a PC which wraps around after 12 bits.[11]

If the PC is a binary counter, it may increment when a pulse is applied to its COUNT UP input, or the CPU may compute some other value and load it into the PC by a pulse to its LOAD input.[12]

To identify the current instruction, the PC may be combined with other registers that identify a segment or page. This approach permits a PC with fewer bits by assuming that most memory units of interest are within the current vicinity.

Consequences in machine architecture

[edit]

Use of a PC that normally increments assumes that what a computer does is execute a usually linear sequence of instructions. Such a PC is central to the von Neumann architecture. Thus programmers write a sequential control flow even for algorithms that do not have to be sequential. The resulting “von Neumann bottleneck” led to research into parallel computing,[13] including non-von Neumann or dataflow models that did not use a PC; for example, rather than specifying sequential steps, the high-level programmer might specify desired function and the low-level programmer might specify this using combinatory logic.

This research also led to ways to making conventional, PC-based, CPUs run faster, including:

  • Pipelining, in which different hardware in the CPU executes different phases of multiple instructions simultaneously.
  • The very long instruction word (VLIW) architecture, where a single instruction can achieve multiple effects.
  • Techniques to predict out-of-order execution and prepare subsequent instructions for execution outside the regular sequence.

Consequences in high-level programming

[edit]

Modern high-level programming languages still follow the sequential-execution model and, indeed, a common way of identifying programming errors is with a “procedure execution” in which the programmer's finger identifies the point of execution as a PC would. The high-level language is essentially the machine language of a virtual machine,[14] too complex to be built as hardware but instead emulated or interpreted by software.

However, new programming models transcend sequential-execution programming:

  • When writing a multi-threaded program, the programmer may write each thread as a sequence of instructions without specifying the timing of any instruction relative to instructions in other threads.
  • In event-driven programming, the programmer may write sequences of instructions to respond to events without specifying an overall sequence for the program.
  • In dataflow programming, the programmer may write each section of a computing pipeline without specifying the timing relative to other sections.

See also

[edit]
  • Branch prediction – Digital circuitPages displaying short descriptions of redirect targets
  • Instruction cache – Hardware cache of a central processing unitPages displaying short descriptions of redirect targets
  • Instruction cycle – Basic instruction cycle in a computer
  • Instruction unit – Computer component
  • Instruction pipeline – Method of improving instruction-level parallelismPages displaying short descriptions of redirect targets
  • Instruction register – Register in a CPU control unit holding the currently-executing instruction
  • Instruction scheduling – Compiler optimization technique
  • Program status word – Computer processor element

References

[edit]
  1. ^ a b Hayes, John P. (1978). Computer Architecture and Organization. McGraw-Hill. p. 245. ISBN 0-07-027363-4.
  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.
  8. ^ John L. Hennessy and David A. Patterson (1990), Computer Architecture: a quantitative approach, Morgan Kaufmann Publishers, Palo Alto, USA, ISBN 1-55860-069-8
  9. ^ B. Randall (1982), The Origins of Digital Computers, Springer-Verlag, Berlin, D
  10. ^ C. Gordon Bell and Allen Newell (1971), Computer Structures: Readings and Examples, McGraw-Hill Book Company, New York, USA
  11. ^ Arnold, Alfred (2020) [1996, 1989]. "E. Predefined Symbols". Macro Assembler AS – User's Manual. V1.42. Translated by Arnold, Alfred; Hilse, Stefan; Kanthak, Stephan; Sellke, Oliver; De Tomasi, Vittorio. p. Table E.3: Predefined Symbols – Part 3. Archived from the original on 2020-02-28. Retrieved 2020-02-28. 3.2.12. WRAPMODE […] AS will assume that the processor's program counter does not have the full length of 16 bits given by the architecture, but instead a length that is exactly sufficient to address the internal ROM. For example, in case of the AT90S8515, this means 12 bits, corresponding to 4 Kwords or 8 Kbytes. This assumption allows relative branches from the ROM's beginning to the end and vice versa which would result in an out-of-branch error when using strict arithmetics. Here, they work because the carry bits resulting from the target address computation are discarded. […] In case of the abovementioned AT90S8515, this option is even necessary because it is the only way to perform a direct jump through the complete address space […]
  12. ^ Walker, B. S. (1967). Introduction to Computer Engineering. London, UK: University of London Press. ISBN 0-340-06831-0.
  13. ^ F. B. Chambers, D. A. Duce and G. P. Jones (1984), Distributed Computing, Academic Press, Orlando, USA, ISBN 0-12-167350-2
  14. ^ Douglas Hofstadter (1980), Gödel, Escher, Bach: an eternal golden braid, Penguin Books, Harmondsworth, UK, ISBN 0-14-005579-7
  • v
  • t
  • e
x86 assembly topics
Topics
  • Assembly language
  • Comparison of assemblers
  • Disassembler
  • Instruction set
  • Low-level programming language
  • Machine code
  • Microassembler
  • x86 assembly language
Assemblers
  • A86/A386
  • Flat Assembler (FASM)
  • GNU Assembler (GAS)
  • High Level Assembly (HLA)
  • Microsoft Macro Assembler (MASM)
  • Netwide Assembler (NASM)
  • Turbo Assembler (TASM)
  • Open Watcom Assembler (WASM)
Programming
issues
  • Call stack
  • Flags
    • Carry flag
    • Direction flag
    • Interrupt flag
    • Overflow flag
    • Zero flag
  • Memory address
  • Opcode
  • Program counter
  • Processor register
  • Calling conventions
  • Instruction listings
  • Registers
  • v
  • t
  • e
Processor technologies
Models
  • Abstract machine
  • Stored-program computer
  • Finite-state machine
    • with datapath
    • Hierarchical
    • Deterministic finite automaton
    • Queue automaton
    • Cellular automaton
    • Quantum cellular automaton
  • Turing machine
    • Alternating Turing machine
    • Universal
    • Post–Turing
    • Quantum
    • Nondeterministic Turing machine
    • Probabilistic Turing machine
    • Hypercomputation
    • Zeno machine
  • Belt machine
  • Stack machine
  • Register machines
    • Counter
    • Pointer
    • Random-access
    • Random-access stored program
Architecture
  • Microarchitecture
  • Von Neumann
  • Harvard
    • modified
  • Dataflow
  • Transport-triggered
  • Cellular
  • Endianness
  • Memory access
    • NUMA
    • HUMA
    • Load–store
    • Register/memory
  • Cache hierarchy
  • Memory hierarchy
    • Virtual memory
    • Secondary storage
  • Heterogeneous
  • Fabric
  • Multiprocessing
  • Cognitive
  • Neuromorphic
Instruction set
architectures
Types
  • Orthogonal instruction set
  • CISC
  • RISC
  • Application-specific
  • EDGE
    • TRIPS
  • VLIW
    • EPIC
  • MISC
  • OISC
  • NISC
  • ZISC
  • VISC architecture
  • Quantum computing
  • Comparison
    • Addressing modes
Instruction
sets
  • Motorola 68000 series
  • VAX
  • PDP-11
  • x86
  • ARM
  • Stanford MIPS
  • MIPS
  • MIPS-X
  • Power
    • POWER
    • PowerPC
    • Power ISA
  • Clipper architecture
  • SPARC
  • SuperH
  • DEC Alpha
  • ETRAX CRIS
  • M32R
  • Unicore
  • Itanium
  • OpenRISC
  • RISC-V
  • MicroBlaze
  • LMC
  • System/3x0
    • S/360
    • S/370
    • S/390
    • z/Architecture
  • Tilera ISA
  • VISC architecture
  • Epiphany architecture
  • Others
Execution
Instruction pipelining
  • Pipeline stall
  • Operand forwarding
  • Classic RISC pipeline
Hazards
  • Data dependency
  • Structural
  • Control
  • False sharing
Out-of-order
  • Scoreboarding
  • Tomasulo's algorithm
    • Reservation station
    • Re-order buffer
  • Register renaming
  • Wide-issue
Speculative
  • Branch prediction
  • Memory dependence prediction
Parallelism
Level
  • Bit
    • Bit-serial
    • Word
  • Instruction
  • Pipelining
    • Scalar
    • Superscalar
  • Task
    • Thread
    • Process
  • Data
    • Vector
  • Memory
  • Distributed
Multithreading
  • Temporal
  • Simultaneous
    • Hyperthreading
    • Simultaneous and heterogenous
  • Speculative
  • Preemptive
  • Cooperative
Flynn's taxonomy
  • SISD
  • SIMD
    • Array processing (SIMT)
    • Pipelined processing
    • Associative processing
    • SWAR
  • MISD
  • MIMD
    • SPMD
Processor
performance
  • Transistor count
  • Instructions per cycle (IPC)
    • Cycles per instruction (CPI)
  • Instructions per second (IPS)
  • Floating-point operations per second (FLOPS)
  • Transactions per second (TPS)
  • Synaptic updates per second (SUPS)
  • Performance per watt (PPW)
  • Cache performance metrics
  • Computer performance by orders of magnitude
Types
  • Central processing unit (CPU)
  • Graphics processing unit (GPU)
    • GPGPU
  • Vector
  • Barrel
  • Stream
  • Tile processor
  • Coprocessor
  • PAL
  • ASIC
  • FPGA
  • FPOA
  • CPLD
  • Multi-chip module (MCM)
  • System in a package (SiP)
  • Package on a package (PoP)
By application
  • Embedded system
  • Microprocessor
  • Microcontroller
  • Mobile
  • Ultra-low-voltage
  • ASIP
  • Soft microprocessor
Systems
on chip
  • System on a chip (SoC)
  • Multiprocessor (MPSoC)
  • Cypress PSoC
  • Network on a chip (NoC)
Hardware
accelerators
  • Coprocessor
  • AI accelerator
  • Graphics processing unit (GPU)
  • Image processor
  • Vision processing unit (VPU)
  • Physics processing unit (PPU)
  • Digital signal processor (DSP)
  • Tensor Processing Unit (TPU)
  • Secure cryptoprocessor
  • Network processor
  • Baseband processor
Word size
  • 1-bit
  • 4-bit
  • 8-bit
  • 12-bit
  • 15-bit
  • 16-bit
  • 24-bit
  • 32-bit
  • 48-bit
  • 64-bit
  • 128-bit
  • 256-bit
  • 512-bit
  • bit slicing
  • others
    • variable
Core count
  • Single-core
  • Multi-core
  • Manycore
  • Heterogeneous architecture
Components
  • Core
  • Cache
    • CPU cache
    • Scratchpad memory
    • Data cache
    • Instruction cache
    • replacement policies
    • coherence
  • Bus
  • Clock rate
  • Clock signal
  • FIFO
Functional
units
  • Arithmetic logic unit (ALU)
  • Address generation unit (AGU)
  • Floating-point unit (FPU)
  • Memory management unit (MMU)
    • Load–store unit
    • Translation lookaside buffer (TLB)
  • Branch predictor
  • Branch target predictor
  • Integrated memory controller (IMC)
    • Memory management unit
  • Instruction decoder
Logic
  • Combinational
  • Sequential
  • Glue
  • Logic gate
    • Quantum
    • Array
Registers
  • Processor register
  • Status register
  • Stack register
  • Register file
  • Memory buffer
  • Memory address register
  • Program counter
Control unit
  • Hardwired control unit
  • Instruction unit
  • Data buffer
  • Write buffer
  • Microcode
  • ROM
  • Counter
Datapath
  • Multiplexer
  • Demultiplexer
  • Adder
  • Multiplier
    • CPU
  • Binary decoder
    • Address decoder
    • Sum-addressed decoder
  • Barrel shifter
Circuitry
  • Integrated circuit
    • 3D
    • Mixed-signal
    • Power management
  • Boolean
  • Digital
  • Analog
  • Quantum
  • Switch
Power
management
  • PMU
  • APM
  • ACPI
  • Dynamic frequency scaling
  • Dynamic voltage scaling
  • Clock gating
  • Performance per watt (PPW)
Related
  • History of general-purpose CPUs
  • Microprocessor chronology
  • Processor design
  • Digital electronics
  • Hardware security module
  • Semiconductor device fabrication
  • Tick–tock model
  • Pin grid array
  • Chip carrier
Retrieved from "https://teknopedia.ac.id/w/index.php?title=Program_counter&oldid=1331240105"
Categories:
  • Control flow
  • Central processing unit
  • Digital registers
Hidden categories:
  • Articles with short description
  • Short description is different from Wikidata
  • Articles needing additional references from February 2025
  • All articles needing additional references
  • Use dmy dates from February 2020
  • Pages displaying short descriptions of redirect targets via Module:Annotated link

  • indonesia
  • Polski
  • العربية
  • Deutsch
  • English
  • Español
  • Français
  • Italiano
  • مصرى
  • Nederlands
  • 日本語
  • Português
  • Sinugboanong Binisaya
  • Svenska
  • Українська
  • Tiếng Việt
  • Winaray
  • 中文
  • Русский
Sunting pranala
url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url url
Pusat Layanan

UNIVERSITAS TEKNOKRAT INDONESIA | ASEAN's Best Private University
Jl. ZA. Pagar Alam No.9 -11, Labuhan Ratu, Kec. Kedaton, Kota Bandar Lampung, Lampung 35132
Phone: (0721) 702022
Email: pmb@teknokrat.ac.id