0% found this document useful (0 votes)
38 views9 pages

Fetch Decode Execute Cycle

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views9 pages

Fetch Decode Execute Cycle

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

MICROPROCESSORS

Engr. Paul John Vincent A. Goopio, SP, SO-3


Fetch-Decode-Execute Cycle

■ The Fetch-Decode-Execute Cycle is followed by


a processor to process an instruction. The
cycle consists of several stages.
High Level Understanding of the Fetch-
Decode-Execute Cycle
1. The memory address held in the program counter is copied into the MAR.
2. The address in the program counter is then incremented-increased – by one. The
program counter now holds the address of the next instruction to be fetched.
3. The processor sends a signal along the address bus to the memory address held in the
MAR.
4. The instruction/data held in that memory address is sent along the data bus to the
MBR/MDR.
5. The instruction/data held in the MBR/MDR is copied into the CIR.
6. The instruction/data held in the CIR is decoded and then executed. Results of
processing are stored in the ACC.
7. The cycle then returns to step one.
Fetch-Decode-Execute Cycle: A Deeper
Dive
■ The Central Processing Unit (CPU) is the brain of the computer because it is what
makes all the decisions and it is where all programs are executed. The purpose of
the CPU is to process data. The CPU works by following a process known as ‘fetch-
decode-execute’. The CPU fetches an instruction from memory, decodes this
instruction and then executes it. The CPU carries out this cycle continuously, millions
of times per second. Whatever software is being used on computers, the CPU
processes the data being used.
Step 1. Fetch

■ The Control Unit sends a signal to the RAM in order to fetch the program and data,
which is then stored in one of the CPU’s register. To do so, the CPU makes use of a
vital hardware path called the “address bus” along which the program and data
travels.
■ The Control Unit then increments the Program Counter (PC). The PC is an important
register that keeps track of the running order of the instructions and shows which
instruction in the program is due to be executed next.
■ The CPU then places the address of the next item to be fetched onto the address
bus. Data from this address then moves from main memory into the CPU by
travelling along another hardware path called the “Data Bus”.
Step 2. Decode

■ The “Instruction Set” of the CPU is designed to understand a specific set of


commands, which serves to make sense of the instruction it has just fetched. This
process is called “decode”. A single piece of program code might require several
instructions. For example, look at this Python code:
– area = length * width
■ First, the computer needs to load in the value of the variable length into the
immediate access store (registers). Next, it needs to load in the value of the variable
width.
Step 3. Execute

■ This is the part of the cycle when data processing takes place, and the instruction is
executed. In the example earlier, the values from the two variables, length and width
would be multiplied together. The result of this processing is then stored as the
variable area in yet another register.
■ Once the execute stage is complete, the CPU begins the cycle all over again.
Fetch-Decode-Execute Cycle in Detail
ANY QUESTIONS?

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy