CPUs and architecture
What does a CPU's program counter (PC) hold?
- AThe address of the next instruction to execute
- BThe total number of instructions executed
- CThe CPU's temperature
Show answer and explanation
Answer: A. The address of the next instruction to execute
The program counter is a register holding the memory address of the next instruction to fetch and execute. It normally advances to the next instruction's address after each instruction, and branch instructions overwrite it with the jump target address.
- A. Correct. It holds the address of the next instruction to execute.
- B. Counting executed instructions is done by performance counters and the like.
- C. Temperature is measured by sensors and is unrelated to the program counter.