The Program Counter (PC) is a 16-bit register that holds the address of the next instruction to be executed. It ensures the sequential execution of instructions by incrementing after each fetch, unless modified by a branch or jump instruction.
A 16-bit register that holds the address of the next instruction to be executed.
Increments after each instruction fetch unless modified by a branch instruction.
Instruction Fetching:
The PC provides the address of the current instruction to the memory unit. Once the instruction is fetched, the PC increments to point to the next instruction.
Control Flow:
The PC can be directly modified by branch, jump, or call instructions. This allows the processor to change the sequence of execution, enabling loops, conditional execution, and function calls.
Address Calculation:
In the case of indirect addressing, the PC is used to fetch the base or initial address, which is then used to determine the effective address of the operand.
LOGISIM FILE CAN BE ACCESSED HERE: