CPUs and architecture

What does a CPU's program counter (PC) hold?

  1. AThe address of the next instruction to execute
  2. BThe total number of instructions executed
  3. 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.
Practice this topic Back to topic

More CPUs and architecture questions

  1. Which correctly describes the write-back policy for caches?
  2. Which correctly describes a set-associative cache?
  3. What is the typical size of a cache line (cache block) in many current CPUs?
  4. In a pipeline, when the next instruction immediately uses the result of the previous one (a data hazard), which technique passes the result directly to the next instruction without waiting for it to be written to the register?
  5. Which correctly describes little-endian byte order?