The program counter answers one question: where is the next instruction? It holds a memory address, and the fetch step reads the word at that address.
The name is a little misleading: it points at an address rather than counting anything. Some architectures, such as x86, call it the instruction pointer instead.
How it changes in Tiny8:
- During fetch (step F2),
PC ← PC + 1. Most instructions are followed by the next word in memory, so the PC moves on straight away, in parallel with the memory read. - On a jump, the execute step overwrites it:
PC ← IR[3:0]. A conditional branch does this only when its condition holds. - At reset, PC = 0, so the program starts at address 0.
So by the time an instruction executes, the PC already points at the next one. A JZ that isn't taken does nothing at all; the PC + 1 from fetch stands.
Its width is set by memory size: it needs one bit per address bit. Tiny8's 16 words need a 4-bit PC.