{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Dale - Computer Science Illuminated 152

Dale - Computer Science Illuminated 152 - 5.2...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
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
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Ask a homework question - tutors are online