SlideShare a Scribd company logo
F453 COMPUTER SCIENCE
FETCH DECODE EXECUTE CYCLE
THE PROCESSOR
Registers
Control
unit
ALU
Memory
Input / output
Address bus
Control bus
Data bus
REGISTERS
• Registers are memory locations within the processor itself.
They work at extremely fast speeds, so they can be used by the
processor, without causing a bottleneck.
• A bottleneck is the slowest part of the system, which limits the
speed of the system as a whole.
PROGRAM COUNTER (PC)
• The program counter keeps track of the memory location of the
line of machine code being executed. It gets incremented, to
point to the next instruction.
• The program counter is also changed by instructions that alter
the flow of control. In the case of the Little Man Computer,
instructions like Branch if Zero (BRZ), Branch Always (BRA) and
Branch if Positive (BRP) can move the program counter
backwards or forwards.
MEMORY DATA REGISTER (MDR)
• The memory data register stores the data that has been fetched
from or stored in the memory.
MEMORY ADDRESS REGISTER
• The memory address register stores the address of the data or
instructions that are to be fetched from, or sent to.
CURRENT INSTRUCTION REGISTER (CIR)
• The current instruction register stores the most recently
fetched instruction, waiting to be decoded and executed.
ACCUMULATOR (ACC)
• The accumulator stores the results of calculations made by the
ALU.
• In the Little Man Computer, the instruction LDA loads the
contents of a given memory location into the accumulator, and
STA stores the contents of the accumulator in a given memory
location.
GENERAL PURPOSE REGISTERS
• Processors may also have general purpose registers.
• These can be used temporarily to store data being used rather
than sensing data to and from the comparatively much slower
memory.
BUSSES
• Busses are the communications channels through which data
can be sent around the computer. A USB (universal serial bus) is
a common, well known bus, and is used to transfer data
between the computer and external devices.
• There are 3 busses when relating to the FDE cycle, the data
bus, control bus and address bus.
WHAT DO THE BUSES DO IN THE FDE CYCLE
• The data bus carries data between the processor and memory.
• The address bus carries the address of the memory location
being read from or written to.
• And the control bus sends control signals from the control unit.
ARITHMETIC LOGIC UNIT (ALU)
• The ALU carries out the calculations and logical decisions.
• The results of its calculations are stored in the accumulator.
CONTROL UNIT (CU)
• The control unit sends out signals to co-ordinate how the
processor works.
• It controls how the data moves around parts of the CPU and
how it moves between the CPU and memory.
• Instructions are decoded in the control unit.
HOW DOES THE PROCESSOR EXECUTE THE
FDE CYCLE
STEP 1 (FETCH)
• The first step in this set of instructions is to fetch the first
instruction from the memory.
• The program counter starts at 0 0(the program counter actually
points to the next instruction to be executed, but at the start of
the program, the next instruction is 0), and the value 0 is
loaded into the memory address register (MAR).
• The control unit (CU) then sends a fetch command, via the
control bus, and the value 0 is sent down the address bus,
meaning fetch the contents of memory location 0.
STEP 1
Instruction in
memory location 0
STEP 2
• The contents of location 0 (LDA Num1) are sent down the data
bus. This data is then stored in the memory data register
(MDR), and then moved to the current instruction register (CIR).
STEP 2
STEP 3
• The program counter is then increased by 1.
STEP 3
STEP 4 (DECODE)
• For the current instruction, the fetch step is complete, the next
step is the decode step.
• The contents of the CIR are sent to the CU.
• The CU decodes the instruction LDA Num1 as load the contents
of Num1 into the accumulator.
• As the program will be executing the instruction on Num1, this
location will be loaded onto the MAR.
STEP 4
STEP 5 (EXECUTE)
• After the contents of the CIR have been decoded, the next step
is the execute step.
• The CU sends a fetch instruction down the control bus, and the
value in the MAR (Num1) is sent down the address bus.
• The contents of memory address 4 are sent to the processor via
the data bus, and loaded into the MDR, and then sent to the
accumulator.
• This is the complete run through for the FDE cycle. The process
is now repeated for the next line of code.
STEP 5
Instruction in
memory location 4
REST OF CODE
• Fetch: The PC is copied to the MAR. The contents of memory
location 1 are loaded onto the CIR. The PC is incremented.
• Decode: The contents of the CIR are sent to the control unit,
and decoded as add the contents of Num2 (location 5) to the
contents of the accumulator.
• Execute: The contents of memory location 5 are fetched from
memory and loaded into the MDR, and then to the ALU.
REST OF CODE
• Fetch: the PC is copied into the MAR, and the contents of
memory location 2 are fetched and loaded into the CIR. The PC
is incremented to 3.
• Decode: The contents of the CIR are sent to the control unit,
and decoded as store the contents of the ACC in Total (in
memory location 6). The location for total 6 is loaded into the
MAR, and the contents of the ACC are copied to the MDR.
• Execute: A write signal is sent down the control bus, the
location 6 is sent down the address bus and the contents of the
MDR (15) is sent down the data bus. This results in the value 15
REST OF CODE
• Fetch: The PC is copied into the MAR, and the contents of
location 3 are fetched and loaded into the CIR. The PC is
incremented to 4.
• Decode: The contents of the CIR are sent to the control unit,
and decoded as Halt.
• Execute: The program terminates.
THE VON NEUMANN ARCHITECTURE
• Von Neumann is the person who created the simplified version
of the processor at the start of this presentation.
• In his diagram, the instructions and data are stored in memory
together. In the LMC, the instructions are stored in memory
locations 0 to 3, and the data in

More Related Content

PPT
Fetch decode-execute presentation
PPT
A451 cpu fetch execute cycle (2-12 & 2-14)
PPT
Memory & the fetch decode-execute cycle
PPT
Fetch-execute Cycle
PPT
Fetch Execute Cycle
PPT
National 5 Computing Science - Fetch Execute Cycle
PPTX
Instruction cycle presentation
Fetch decode-execute presentation
A451 cpu fetch execute cycle (2-12 & 2-14)
Memory & the fetch decode-execute cycle
Fetch-execute Cycle
Fetch Execute Cycle
National 5 Computing Science - Fetch Execute Cycle
Instruction cycle presentation

What's hot (20)

PPTX
Cpu & its execution of instruction
PPTX
Instruction Execution Cycle
PPTX
instruction cycle ppt
PPT
Instruction cycle
PPT
Fetch execute cycle
PDF
Coal 10 instruction cycle and interrupts in Assembly Programming
PPTX
Instruction set and instruction execution cycle
PDF
Instruction cycle
PPTX
Instruction cycle with interrupts
PDF
Basic Computer Organization and Design
PPTX
Program execution
PPTX
Register Organization and Instruction cycle
PPTX
Cpu & its execution of instruction
PPT
Program control
PPT
Cpu organisation
PPTX
Addressing sequencing
PDF
L3 instruction-execution-steps
PPT
basic computer programming and micro programmed control
PPTX
Control unit
Cpu & its execution of instruction
Instruction Execution Cycle
instruction cycle ppt
Instruction cycle
Fetch execute cycle
Coal 10 instruction cycle and interrupts in Assembly Programming
Instruction set and instruction execution cycle
Instruction cycle
Instruction cycle with interrupts
Basic Computer Organization and Design
Program execution
Register Organization and Instruction cycle
Cpu & its execution of instruction
Program control
Cpu organisation
Addressing sequencing
L3 instruction-execution-steps
basic computer programming and micro programmed control
Control unit
Ad

Viewers also liked (17)

PPT
13.computer buses
PPTX
Mother Board
PPTX
Expansion cards
DOCX
Introduction to CPU registers
PPSX
04. Computer Casing (Case, Housing)
PPT
External Cards and Slots
PPTX
Buses in a computer
PPTX
Mother board
PPTX
Computer architecture
PPT
Addressing modes
PPTX
Computer memory
DOCX
Cancer cervicouterino
DOC
siddhartsharma
PDF
1 BUF AW 14
PDF
Partnership-Study-Vietnam-Summary_Donor-Platform-2008
PDF
Modelo genecologico
PDF
Citologia exfoliativa 1
13.computer buses
Mother Board
Expansion cards
Introduction to CPU registers
04. Computer Casing (Case, Housing)
External Cards and Slots
Buses in a computer
Mother board
Computer architecture
Addressing modes
Computer memory
Cancer cervicouterino
siddhartsharma
1 BUF AW 14
Partnership-Study-Vietnam-Summary_Donor-Platform-2008
Modelo genecologico
Citologia exfoliativa 1
Ad

Similar to F453 computer science fde cycle (20)

PPT
The Processor
PPTX
lecture2.pptx
PDF
computer architecture and the fetch execute cycle By ZAK
PDF
1.3.2 computer architecture and the fetch execute cycle By ZAK
PDF
Central processing unit i
PPTX
ICT-Lecture_12(VonNeumannArchitecture).pptx
PPT
Data path of Computer Architecture ALU and other components
PPT
Patt patelch04
PPTX
oLecture09-Internal Organization of CPU.pptx
PDF
embedded system and computer architecure
PPT
PattPatelCh04.ppt
PPTX
Central Processing Unit
PPT
Unit-3 Von Neumann Architecture.ppt
PPT
Von neuman architecture
PDF
3. IICT_Lecture 03_Computer Org Personal
PPTX
Computer Architecture – An Introduction
PPTX
overview-Microprocessor of 8085 processor
PPT
Chapter 4-The Von Neumann Model-PattPatel.ppt
PPTX
3.3 computer architectures (kk) v2
PPT
Introduction to C programing for problem
The Processor
lecture2.pptx
computer architecture and the fetch execute cycle By ZAK
1.3.2 computer architecture and the fetch execute cycle By ZAK
Central processing unit i
ICT-Lecture_12(VonNeumannArchitecture).pptx
Data path of Computer Architecture ALU and other components
Patt patelch04
oLecture09-Internal Organization of CPU.pptx
embedded system and computer architecure
PattPatelCh04.ppt
Central Processing Unit
Unit-3 Von Neumann Architecture.ppt
Von neuman architecture
3. IICT_Lecture 03_Computer Org Personal
Computer Architecture – An Introduction
overview-Microprocessor of 8085 processor
Chapter 4-The Von Neumann Model-PattPatel.ppt
3.3 computer architectures (kk) v2
Introduction to C programing for problem

Recently uploaded (20)

PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Pre independence Education in Inndia.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
Institutional Correction lecture only . . .
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
Cell Types and Its function , kingdom of life
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
master seminar digital applications in india
PDF
Insiders guide to clinical Medicine.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
TR - Agricultural Crops Production NC III.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Pre independence Education in Inndia.pdf
Renaissance Architecture: A Journey from Faith to Humanism
Institutional Correction lecture only . . .
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
01-Introduction-to-Information-Management.pdf
VCE English Exam - Section C Student Revision Booklet
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Cell Types and Its function , kingdom of life
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
master seminar digital applications in india
Insiders guide to clinical Medicine.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Week 4 Term 3 Study Techniques revisited.pptx
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...

F453 computer science fde cycle

  • 1. F453 COMPUTER SCIENCE FETCH DECODE EXECUTE CYCLE
  • 2. THE PROCESSOR Registers Control unit ALU Memory Input / output Address bus Control bus Data bus
  • 3. REGISTERS • Registers are memory locations within the processor itself. They work at extremely fast speeds, so they can be used by the processor, without causing a bottleneck. • A bottleneck is the slowest part of the system, which limits the speed of the system as a whole.
  • 4. PROGRAM COUNTER (PC) • The program counter keeps track of the memory location of the line of machine code being executed. It gets incremented, to point to the next instruction. • The program counter is also changed by instructions that alter the flow of control. In the case of the Little Man Computer, instructions like Branch if Zero (BRZ), Branch Always (BRA) and Branch if Positive (BRP) can move the program counter backwards or forwards.
  • 5. MEMORY DATA REGISTER (MDR) • The memory data register stores the data that has been fetched from or stored in the memory.
  • 6. MEMORY ADDRESS REGISTER • The memory address register stores the address of the data or instructions that are to be fetched from, or sent to.
  • 7. CURRENT INSTRUCTION REGISTER (CIR) • The current instruction register stores the most recently fetched instruction, waiting to be decoded and executed.
  • 8. ACCUMULATOR (ACC) • The accumulator stores the results of calculations made by the ALU. • In the Little Man Computer, the instruction LDA loads the contents of a given memory location into the accumulator, and STA stores the contents of the accumulator in a given memory location.
  • 9. GENERAL PURPOSE REGISTERS • Processors may also have general purpose registers. • These can be used temporarily to store data being used rather than sensing data to and from the comparatively much slower memory.
  • 10. BUSSES • Busses are the communications channels through which data can be sent around the computer. A USB (universal serial bus) is a common, well known bus, and is used to transfer data between the computer and external devices. • There are 3 busses when relating to the FDE cycle, the data bus, control bus and address bus.
  • 11. WHAT DO THE BUSES DO IN THE FDE CYCLE • The data bus carries data between the processor and memory. • The address bus carries the address of the memory location being read from or written to. • And the control bus sends control signals from the control unit.
  • 12. ARITHMETIC LOGIC UNIT (ALU) • The ALU carries out the calculations and logical decisions. • The results of its calculations are stored in the accumulator.
  • 13. CONTROL UNIT (CU) • The control unit sends out signals to co-ordinate how the processor works. • It controls how the data moves around parts of the CPU and how it moves between the CPU and memory. • Instructions are decoded in the control unit.
  • 14. HOW DOES THE PROCESSOR EXECUTE THE FDE CYCLE
  • 15. STEP 1 (FETCH) • The first step in this set of instructions is to fetch the first instruction from the memory. • The program counter starts at 0 0(the program counter actually points to the next instruction to be executed, but at the start of the program, the next instruction is 0), and the value 0 is loaded into the memory address register (MAR). • The control unit (CU) then sends a fetch command, via the control bus, and the value 0 is sent down the address bus, meaning fetch the contents of memory location 0.
  • 17. STEP 2 • The contents of location 0 (LDA Num1) are sent down the data bus. This data is then stored in the memory data register (MDR), and then moved to the current instruction register (CIR).
  • 19. STEP 3 • The program counter is then increased by 1.
  • 21. STEP 4 (DECODE) • For the current instruction, the fetch step is complete, the next step is the decode step. • The contents of the CIR are sent to the CU. • The CU decodes the instruction LDA Num1 as load the contents of Num1 into the accumulator. • As the program will be executing the instruction on Num1, this location will be loaded onto the MAR.
  • 23. STEP 5 (EXECUTE) • After the contents of the CIR have been decoded, the next step is the execute step. • The CU sends a fetch instruction down the control bus, and the value in the MAR (Num1) is sent down the address bus. • The contents of memory address 4 are sent to the processor via the data bus, and loaded into the MDR, and then sent to the accumulator. • This is the complete run through for the FDE cycle. The process is now repeated for the next line of code.
  • 25. REST OF CODE • Fetch: The PC is copied to the MAR. The contents of memory location 1 are loaded onto the CIR. The PC is incremented. • Decode: The contents of the CIR are sent to the control unit, and decoded as add the contents of Num2 (location 5) to the contents of the accumulator. • Execute: The contents of memory location 5 are fetched from memory and loaded into the MDR, and then to the ALU.
  • 26. REST OF CODE • Fetch: the PC is copied into the MAR, and the contents of memory location 2 are fetched and loaded into the CIR. The PC is incremented to 3. • Decode: The contents of the CIR are sent to the control unit, and decoded as store the contents of the ACC in Total (in memory location 6). The location for total 6 is loaded into the MAR, and the contents of the ACC are copied to the MDR. • Execute: A write signal is sent down the control bus, the location 6 is sent down the address bus and the contents of the MDR (15) is sent down the data bus. This results in the value 15
  • 27. REST OF CODE • Fetch: The PC is copied into the MAR, and the contents of location 3 are fetched and loaded into the CIR. The PC is incremented to 4. • Decode: The contents of the CIR are sent to the control unit, and decoded as Halt. • Execute: The program terminates.
  • 28. THE VON NEUMANN ARCHITECTURE • Von Neumann is the person who created the simplified version of the processor at the start of this presentation. • In his diagram, the instructions and data are stored in memory together. In the LMC, the instructions are stored in memory locations 0 to 3, and the data in