Fetch Execute Cycle
Fetch Execute Cycle
• The CPU (central processing unit) is one of the fundamental parts of a computer.
• Many people say it is the most important part, as it is where all the data and
• instructions are processed. This means it is a little bit like your brain, as that is where
• you process all the data and instructions that you sense on a daily basis.
Microprocessor.
• All computers have a form of CPU. In devices such as personal computers (PC) and
laptops, this is normally a separate component in the computer. In devices such as
those found in our houses, e.g. our washing machine, a similar type of component
exists called a microprocessor.
• Address bus: wires used for the transmission of addresses between components in a
computer.
Memory data register (MDR
• Once the MAR has received the address it now knows where to find the instruction in
the RAM.
• To retrieve the instruction the MAR needs to send the address to the location in RAM. It
uses the address bus again to do this.
• Once the address is received at the location in RAM, the data stored in this location,
e.g. the instruction, is sent to a component within the CPU called the memory data
register (MDR).
• This is also an example of a register in the CPU.
• The instruction is sent to the MDR using the data bus.
Current instruction register (CIR
• When the MDR has received the instruction, it sends it to the current instruction
register (CIR).
• This is another example of a register in the CPU.
• The MDR uses the data bus to send the instruction to the CIR.
• This register is part of a component within the CPU called the control unit (CU).
• It is the CU that is responsible for the next stage of the cycle, the decode stage.
The decode stage
• The decode stage of the cycle begins when the instruction is received by the CU.
• The CU is the unit in the CPU that decodes the instruction.
• The instruction needs to be decoded so that the CPU can understand what is required
to execute the instruction.
Instruction set.
• The instruction is then decoded so that it can be interpreted in the next part of the
cycle.
• To decode an instruction the CU uses an instruction set.
• This is a set of all the commands that are understood and can be processed by the
CPU.
• These commands are in machine code.
• Once the instruction is decoded using the instruction set, it can now be executed.
The execute stage
• The CPU passes the decoded instruction as a set of control signals to the appropriate
components within the computer system.
• The execute stage is when any actions that are required for the instruction are carried
out.
• This is likely to involve some mathematical and logical calculations.
• If these kinds calculations are required, the data used in the process is sent to the
arithmetic logic
unit (ALU).
Arithmetic logic unit (ALU):
• The component in the CPU that performs all the mathematical and logical operations
required when processing data and instructions.
• This is a component within the CPU that is responsible for any calculations.
• Interim values may be created whilst these calculations are being performed, the ALU
has a special register built into it called the accumulator (ACC).
Accumulator (ACC):
• A register that is built into the ALU that stores the result of any interim calculations.
• It is this special register that will store the interim values that are created in any
calculations.
• Once any calculations have been performed, the actions for the instruction can be
performed,
e.g. the file can be opened or the letter typed can be displayed.
Control unit (CU):
• The component in the CPU that controls all the operations in the CPU.
• How do all the different components know what they are doing in the fetch-decode
execute cycle?
• They have a conductor! This conductor is the CU.
• It sends signals to all the components within the CPU to tell them when they need to
perform their different roles.
• The CU uses the control bus to send these signals.
Questions