Program Counter:
The Program Counter (PC) is a crucial register within the CPU that holds the address of the next instruction to be fetched and executed during the program's operation. It plays a central role in the fetch-decode-execute cycle.
Instruction Address Tracking:
Stores the memory address of the instruction to be executed next.
Automatic Increment:
After an instruction is fetched, the PC is incremented to point to the address of the subsequent instruction in sequence.
Branching and Jumping:
If the current instruction involves a jump, branch, or subroutine call, the PC updates to the new target address instead of incrementing sequentially.
Program Flow Control:
Ensures the CPU processes instructions in the correct sequence unless explicitly modified by a control instruction.
Fetch Phase:
The CPU reads the address stored in the PC to fetch the next instruction from memory.
Increment Phase:
After fetching, the PC updates to the next instruction addressÂ
Execution Phase:
Executes the instruction while maintaining or updating the PC as required.
Sequential Execution: Maintains the flow of the program by fetching instructions in order.
Non-Sequential Execution: Handles jumps, calls, and interrupts to alter the normal sequence when needed.
LOGISIM FILE CAN BE ACCESSED HERE: