4. Registers in a CPU - Program Counter
The diagram below shows the main registers within a CPU.
Program Counter
All data and instructions in memory have a unique and specific address. As each instruction is processed, the software that is currently running, updates the program counter with the address of the next instruction to fetch.
The program counter then passes this next address to the memory address register as part of the standard fetch/decode/execute cycle (which will be explained in the next mini-web)
Normally the address of the next instruction will be only one location higher than the current one. Sometimes though, it is instructed to jump to a completely different address. This is called a branch instruction.
The software that is currently running controls the program counter.
Challenge see if you can find out one extra fact on this topic that we haven't already told you Click on this link: Describe conditional branching