Show
InstructionsAll computer software is built up of sets of instructions. Instructions are encoded in binary. The fetch-decode-execute cycle is the sequence of steps that the CPU follows to process instructions. The main job of the
CPU is to
execute programs using the fetch-decode-execute cycle (also known as the instruction cycle). This cycle begins as soon as you turn on a computer. To execute a program, the
program code is copied from secondary storage into the main memory. The CPU's program counter is set to the memory location where the first instruction in the program has been stored, and execution begins.
The program is now running. In a program, each machine code instruction takes up a slot in the main memory. These slots (or memory locations) each have a unique memory address. The program counter stores the address of each instruction and tells the CPU in what order they should be carried out. When a program is being executed, the CPU performs the fetch-decode-execute cycle, which repeats over and over again until reaching the STOP instruction. Summary of the fetch-decode-execute cycle
GCSE Subjects
When a CPU executes the instructions in a program it is engage in what process?When a CPU executes the instructions in a program, it is engaged in a process that is known as the fetch-decode-execute cycle. This cycle, which consists of three steps, is repeated for each instruction in the program.
How does the CPU perform a instruction?The actual mathematical operation for each instruction is performed by a combinational logic circuit within the CPU's processor known as the arithmetic–logic unit or ALU. In general, a CPU executes an instruction by fetching it from memory, using its ALU to perform an operation, and then storing the result to memory.
What tells the CPU which instruction to execute?A CPU "receives" instructions from memory, by asking for them by address. The only commands a CPU "sends" (in the simplistic view, at least) are commands to the memory to deliver data, and commands on I/O buses, to operate I/O devices.
|