5.2 Stored-Program Concept 125 The steps in the processing cycle are: ± Fetch the next instruction. ± Decode the instruction. ± Get data if needed. ± Execute the instruction. Let’s look at each of these steps in more detail. The process starts with the address in memory of the first instruction being stored in the program counter. Fetch the Next Instruction The program counter (PC) contains the address of the next instruction to be executed, so the control unit goes to the address in memory specified in the PC, makes a copy of the contents, and places the copy in the instruc-tion register. At this point the instruction register contains the instruction to be executed. Before going on to the next step in the cycle, the program counter must be updated to hold the address of the next instruction to be executed when the current instruction has been completed. Because the instructions are stored contiguously in memory, adding 1 to the program counter should put the address of the next instruction into the PC. So the
This is the end of the preview.
access the rest of the document.
Central processing unit, Machine code, Computer program, Input device