Program Counter
The Program Counter (PC) is a special register in a computer's CPU that keeps track of the address of the next instruction to be executed in a program. As the CPU processes instructions, the PC increments automatically to point to the subsequent instruction, ensuring the program runs in the correct sequence.
When a program is executed, the PC plays a crucial role in fetching instructions from memory. If a jump or branch instruction is encountered, the PC can be updated to a different address, allowing for conditional execution and loops, which are essential for programming logic and flow control.