SlideShare a Scribd company logo
1 of 5
Download to read offline
Page 1 of 5
1.3 Hardware and software
1.3.2 Computer architecture and the fetch-execute cycle
Von Neumann Architecture
The earliest computing machines had fixed programs. For example, a desk calculator (in principle) is a fixed
program computer. It can do basic mathematics, but it cannot be used as a word processor or a gaming
console. Changing the program of a fixed-program machine requires re-wiring, re-structuring, or re-designing
the machine. The earliest computers were not so much "programmed" as they were "designed".
"Reprogramming", when it was possible at all, was a laborious process, starting with flowcharts and paper
notes, followed by detailed engineering designs, and then the often-arduous process of physically re-wiring
and re-building the machine. It could take three weeks to set up a program on ENIAC (a computer of 1940s)
and get it working.
The phrase Von Neumann architecture derives from a paper written by computer scientist John von Neumann
in1945. This describes design architecture for an electronic digital computer with subdivisions of a central
arithmetic part, a central control part, a memory to store both data and instructions, external storage, and input
and output mechanisms. The meaning of the phrase has evolved to mean a stored-program computer. A
stored-program digital computer is one that keeps its programmed instructions, as well as its data, in read-
write, random-access memory (RAM). So John Von Neumann introduced the idea of the stored program.
Previously data and programs were stored in separate memories. Von Neumann realized that data and
programs are indistinguishable and can, therefore, use the same memory. On a large scale, the ability to treat
instructions as data is what makes assemblers, compilers and other automated programming tools possible.
One can "write programs which write programs". This led to the introduction of compilers which accepted
high level language source code as input and produced binary code as output.
Page 2 of 5
1.3 Hardware and software
1.3.2 Computer architecture and the fetch-execute cycle
The Von Neumann architecture uses a single processor which follows a linear sequence of fetch-decode-
execute. In order to do this, the processor has to use some special registers, which are discrete memory
locations with special purposes attached. These are:
Register Meaning
PC Program Counter
CIR Current Instruction Register
MAR Memory Address Register
MDR Memory Data Register
IR/IX Index Register
Accumulator Holds results
The program counter keeps track of where to find the next instruction so that a copy of the
instruction can be placed in the current instruction register. Sometimes the program counter is called
the Sequence Control Register (SCR) as it controls the sequence in which instructions are executed.
The current instruction register holds the instruction that is to be executed.
The memory address register is used to hold the memory address that contains either the next piece
of data or an instruction that is to be used.
The memory data register acts like a buffer and holds anything that is copied from the memory
ready for the processor to use it.
The central processor contains the arithmetic-logic unit (also known as the arithmetic unit) and the control
unit. The arithmetic-logic unit (ALU) is where data is processed. This involves arithmetic and logical
operations. Arithmetic operations are those that add and subtract numbers, and so on. Logical operations
involve comparing binary patterns and making decisions.
Page 3 of 5
1.3 Hardware and software
1.3.2 Computer architecture and the fetch-execute cycle
The control unit fetches instructions from memory, decodes them and synchronizes the operations before
sending signals to other parts of the computer.
The accumulator is in the arithmetic unit, the program counter and the instruction registers are in the
control unit and the memory data register and memory address register are in the processor.
An index register is a microprocessor register used for modifying operand addresses during the run
of a program, typically for doing vector/array operations. Index registers are used for a special kind of
indirect addressing (where an immediate constant, which is part of the instruction itself) is added to
the contents of the index register to form the address to the actual operand or data.
A typical layout is shown in Fig. 3.3.a.1 which also shows the data paths.
Page 4 of 5
1.3 Hardware and software
1.3.2 Computer architecture and the fetch-execute cycle
The Fetch-Decode-Execute-Reset Cycle
The following is an algorithm that shows the steps in the cycle. At the end, the cycle is reset and the
algorithm repeated.
1. Load the address that is in the program counter (PC) into the memory address register (MAR).
2. Increment the PC by 1.
3. Load the instruction that is in the memory address given by the MAR into the memory data register
(MDR).
4. Load the instruction that is now in the MDR into the current instruction register (CIR).
5. Decode the instruction that is in the CIR.
6. If the instruction is a jump instruction then
a. Load the address part of the instruction into the PC
b. Reset by going to step 1.
7. Execute the instruction.
8. Reset by going to step 1.
Steps 1 to 4 are the fetch part of the cycle. Steps 5, 6a and 7 are the execute part of the cycle and steps 6b and
8 are the reset part.
Step 1 simply places the address of the next instruction into the memory address register so that the control
unit can fetch the instruction from the right part of the memory. The program counter is then incremented by
1 so that it contains the address of the next instruction, assuming that the instructions are in consecutive
locations.
The memory data register is used whenever anything is to go from the central processing unit to main
memory, or vice versa. Thus the next instruction is copied from memory into the MDR and is then copied
into the current instruction register.
Now that the instruction has been fetched the control unit can decode it and decide what has to be done. This
is the execute part of the cycle. If it is an arithmetic instruction, this can be executed and the cycle can
restart as the PC contains the address of the next instruction in order. However, if the instruction involves
jumping to an instruction that is not the next one in order, the PC has to be loaded with the address of the
instruction that is to be executed next. This address is in the address part of the current instruction, hence the
address part is loaded into the PC before the cycle is reset and starts all over again.
Page 5 of 5
1.3 Hardware and software
1.3.2 Computer architecture and the fetch-execute cycle
A CPU cannot do math on data registers, although it can do it indirectly with an index register. The index
register works with the data registers, allowing a program to process strings of data efficiently. To process
your first name, for example, a program move 300 to MAR and zero to the index register. An indexed
operation adds the index value to the MDR, retrieving the letter at location 300. Next, the program increments
the index by one and gets the next letter. It repeats this process until it has moved the whole name. By itself,
the index register does little; its value is that it gives greater speed and convenience to address registers.

More Related Content

What's hot

Процессорын архитектур
Процессорын архитектурПроцессорын архитектур
Процессорын архитектурMuuluu
 
Pipelining and vector processing
Pipelining and vector processingPipelining and vector processing
Pipelining and vector processingKamal Acharya
 
Computer Organisation (DFT1113)
Computer Organisation (DFT1113)Computer Organisation (DFT1113)
Computer Organisation (DFT1113)PSMZA
 
Run time, frequently, non-frequently reconfigurable system &
Run time, frequently, non-frequently reconfigurable system &Run time, frequently, non-frequently reconfigurable system &
Run time, frequently, non-frequently reconfigurable system &Sudhanshu Janwadkar
 
Lecture 3
Lecture 3Lecture 3
Lecture 3Mr SMAK
 
Computer architecture
Computer architectureComputer architecture
Computer architectureneclinux
 
Unit 1 computer architecture (1)
Unit 1   computer architecture (1)Unit 1   computer architecture (1)
Unit 1 computer architecture (1)DevaKumari Vijay
 
L 2 basic computer organization
L 2 basic computer organizationL 2 basic computer organization
L 2 basic computer organizationStubborn sam
 
Computer-Processing-Devices.pdf
Computer-Processing-Devices.pdfComputer-Processing-Devices.pdf
Computer-Processing-Devices.pdfDKGAUTAMgautam
 
Processor organization & register organization
Processor organization & register organizationProcessor organization & register organization
Processor organization & register organizationGhanshyam Patel
 
Basic computer organisation
Basic computer organisationBasic computer organisation
Basic computer organisationvito_carleone
 
Computer System Architecture
Computer System ArchitectureComputer System Architecture
Computer System ArchitectureBrenda Debra
 
Von-Neumann machine and IAS architecture
Von-Neumann machine and  IAS architectureVon-Neumann machine and  IAS architecture
Von-Neumann machine and IAS architectureShishir Aryal
 
L3 instruction-execution-steps
L3 instruction-execution-stepsL3 instruction-execution-steps
L3 instruction-execution-stepsrsamurti
 

What's hot (20)

Процессорын архитектур
Процессорын архитектурПроцессорын архитектур
Процессорын архитектур
 
Pipelining and vector processing
Pipelining and vector processingPipelining and vector processing
Pipelining and vector processing
 
Computer Organisation (DFT1113)
Computer Organisation (DFT1113)Computer Organisation (DFT1113)
Computer Organisation (DFT1113)
 
Run time, frequently, non-frequently reconfigurable system &
Run time, frequently, non-frequently reconfigurable system &Run time, frequently, non-frequently reconfigurable system &
Run time, frequently, non-frequently reconfigurable system &
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
Unit 1 computer architecture (1)
Unit 1   computer architecture (1)Unit 1   computer architecture (1)
Unit 1 computer architecture (1)
 
Unit 2
Unit 2Unit 2
Unit 2
 
Cpu organisation
Cpu organisationCpu organisation
Cpu organisation
 
L 2 basic computer organization
L 2 basic computer organizationL 2 basic computer organization
L 2 basic computer organization
 
computer system organization basics
computer system organization basicscomputer system organization basics
computer system organization basics
 
Computer-Processing-Devices.pdf
Computer-Processing-Devices.pdfComputer-Processing-Devices.pdf
Computer-Processing-Devices.pdf
 
Processor organization & register organization
Processor organization & register organizationProcessor organization & register organization
Processor organization & register organization
 
Chapter 10
Chapter 10Chapter 10
Chapter 10
 
Basic computer organisation
Basic computer organisationBasic computer organisation
Basic computer organisation
 
computer Architecture
computer Architecturecomputer Architecture
computer Architecture
 
Computer System Architecture
Computer System ArchitectureComputer System Architecture
Computer System Architecture
 
Von-Neumann machine and IAS architecture
Von-Neumann machine and  IAS architectureVon-Neumann machine and  IAS architecture
Von-Neumann machine and IAS architecture
 
L3 instruction-execution-steps
L3 instruction-execution-stepsL3 instruction-execution-steps
L3 instruction-execution-steps
 

Similar to 1.3.2 computer architecture and the fetch execute cycle By ZAK

03. top level view of computer function & interconnection
03. top level view of computer function & interconnection03. top level view of computer function & interconnection
03. top level view of computer function & interconnectionnoman yasin
 
Ass#1 ramirez.cv (cs3112 os)
Ass#1 ramirez.cv (cs3112 os)Ass#1 ramirez.cv (cs3112 os)
Ass#1 ramirez.cv (cs3112 os)charize
 
Bca examination 2015 csa
Bca examination 2015 csaBca examination 2015 csa
Bca examination 2015 csaAnjaan Gajendra
 
Please send the answers to my email. Mirre06@hotmail.comSomeone se.pdf
Please send the answers to my email. Mirre06@hotmail.comSomeone se.pdfPlease send the answers to my email. Mirre06@hotmail.comSomeone se.pdf
Please send the answers to my email. Mirre06@hotmail.comSomeone se.pdfebrahimbadushata00
 
Assignment#1 lograbo, s.f. (cs3112-os)
Assignment#1 lograbo, s.f. (cs3112-os)Assignment#1 lograbo, s.f. (cs3112-os)
Assignment#1 lograbo, s.f. (cs3112-os)myanddy
 
Assignment#1 lograbo, s.f. (cs3112-os)
Assignment#1 lograbo, s.f. (cs3112-os)Assignment#1 lograbo, s.f. (cs3112-os)
Assignment#1 lograbo, s.f. (cs3112-os)myanddy
 
Co module 1 2019 20-converted
Co module 1 2019 20-convertedCo module 1 2019 20-converted
Co module 1 2019 20-convertedramamani keshava
 
Assignment#1 Mapacpac, F M P (Cs3112 Os)
Assignment#1 Mapacpac, F M P  (Cs3112 Os)Assignment#1 Mapacpac, F M P  (Cs3112 Os)
Assignment#1 Mapacpac, F M P (Cs3112 Os)dyandmy
 
module 1 computer architecture diploma
 module 1 computer architecture diploma   module 1 computer architecture diploma
module 1 computer architecture diploma Manoharan Ragavan
 
COMPUTER ORGNAIZATION NOTES
COMPUTER ORGNAIZATION NOTESCOMPUTER ORGNAIZATION NOTES
COMPUTER ORGNAIZATION NOTESDr.MAYA NAYAK
 
HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005
HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005
HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005SOLOMONCHINAEMEUCHEA
 

Similar to 1.3.2 computer architecture and the fetch execute cycle By ZAK (20)

03. top level view of computer function & interconnection
03. top level view of computer function & interconnection03. top level view of computer function & interconnection
03. top level view of computer function & interconnection
 
Intro to cao &store program
Intro to cao &store programIntro to cao &store program
Intro to cao &store program
 
Control unit
Control  unitControl  unit
Control unit
 
Ass#1 ramirez.cv (cs3112 os)
Ass#1 ramirez.cv (cs3112 os)Ass#1 ramirez.cv (cs3112 os)
Ass#1 ramirez.cv (cs3112 os)
 
unit-i.pdf
unit-i.pdfunit-i.pdf
unit-i.pdf
 
Reconfigurable computing
Reconfigurable computingReconfigurable computing
Reconfigurable computing
 
Bca examination 2015 csa
Bca examination 2015 csaBca examination 2015 csa
Bca examination 2015 csa
 
Cpu
CpuCpu
Cpu
 
Co notes3 sem
Co notes3 semCo notes3 sem
Co notes3 sem
 
Cpu execution
Cpu executionCpu execution
Cpu execution
 
Spr ch-01
Spr ch-01Spr ch-01
Spr ch-01
 
Unit2fit
Unit2fitUnit2fit
Unit2fit
 
Please send the answers to my email. Mirre06@hotmail.comSomeone se.pdf
Please send the answers to my email. Mirre06@hotmail.comSomeone se.pdfPlease send the answers to my email. Mirre06@hotmail.comSomeone se.pdf
Please send the answers to my email. Mirre06@hotmail.comSomeone se.pdf
 
Assignment#1 lograbo, s.f. (cs3112-os)
Assignment#1 lograbo, s.f. (cs3112-os)Assignment#1 lograbo, s.f. (cs3112-os)
Assignment#1 lograbo, s.f. (cs3112-os)
 
Assignment#1 lograbo, s.f. (cs3112-os)
Assignment#1 lograbo, s.f. (cs3112-os)Assignment#1 lograbo, s.f. (cs3112-os)
Assignment#1 lograbo, s.f. (cs3112-os)
 
Co module 1 2019 20-converted
Co module 1 2019 20-convertedCo module 1 2019 20-converted
Co module 1 2019 20-converted
 
Assignment#1 Mapacpac, F M P (Cs3112 Os)
Assignment#1 Mapacpac, F M P  (Cs3112 Os)Assignment#1 Mapacpac, F M P  (Cs3112 Os)
Assignment#1 Mapacpac, F M P (Cs3112 Os)
 
module 1 computer architecture diploma
 module 1 computer architecture diploma   module 1 computer architecture diploma
module 1 computer architecture diploma
 
COMPUTER ORGNAIZATION NOTES
COMPUTER ORGNAIZATION NOTESCOMPUTER ORGNAIZATION NOTES
COMPUTER ORGNAIZATION NOTES
 
HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005
HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005
HHCJ AMUMARA:COMPUTER STUDIES LECTURE NOTE FOR SS3:005
 

More from Tabsheer Hasan

Lab Network Settings And Testing
Lab Network Settings And TestingLab Network Settings And Testing
Lab Network Settings And TestingTabsheer Hasan
 
How to train cortana to respond to your voice
How to train cortana to respond to your voiceHow to train cortana to respond to your voice
How to train cortana to respond to your voiceTabsheer Hasan
 
How to turn on hey cortana on windows 10
How to turn on hey cortana on windows 10How to turn on hey cortana on windows 10
How to turn on hey cortana on windows 10Tabsheer Hasan
 
How to pin cortana to your taskbar on
How to pin cortana to your taskbar on How to pin cortana to your taskbar on
How to pin cortana to your taskbar on Tabsheer Hasan
 
Introduction To Computer
Introduction To ComputerIntroduction To Computer
Introduction To ComputerTabsheer Hasan
 
How to set up cortana on windows 10
How to set up cortana on windows 10How to set up cortana on windows 10
How to set up cortana on windows 10Tabsheer Hasan
 
Data structures; arrays By ZAK
Data structures; arrays By ZAKData structures; arrays By ZAK
Data structures; arrays By ZAKTabsheer Hasan
 
Programming concepts By ZAK
Programming concepts By ZAKProgramming concepts By ZAK
Programming concepts By ZAKTabsheer Hasan
 
problem solving and design By ZAK
problem solving and design By ZAKproblem solving and design By ZAK
problem solving and design By ZAKTabsheer Hasan
 
operating systems By ZAK
operating systems By ZAKoperating systems By ZAK
operating systems By ZAKTabsheer Hasan
 
memory, storage devices and media By ZAK
memory, storage devices and media By ZAKmemory, storage devices and media By ZAK
memory, storage devices and media By ZAKTabsheer Hasan
 
computer architecture and the fetch execute cycle By ZAK
computer architecture and the fetch execute cycle By ZAKcomputer architecture and the fetch execute cycle By ZAK
computer architecture and the fetch execute cycle By ZAKTabsheer Hasan
 
internet principles of operation By ZAK
internet principles of operation By ZAKinternet principles of operation By ZAK
internet principles of operation By ZAKTabsheer Hasan
 

More from Tabsheer Hasan (20)

Lab Network Settings And Testing
Lab Network Settings And TestingLab Network Settings And Testing
Lab Network Settings And Testing
 
How to train cortana to respond to your voice
How to train cortana to respond to your voiceHow to train cortana to respond to your voice
How to train cortana to respond to your voice
 
How to turn on hey cortana on windows 10
How to turn on hey cortana on windows 10How to turn on hey cortana on windows 10
How to turn on hey cortana on windows 10
 
How to pin cortana to your taskbar on
How to pin cortana to your taskbar on How to pin cortana to your taskbar on
How to pin cortana to your taskbar on
 
Introduction To Computer
Introduction To ComputerIntroduction To Computer
Introduction To Computer
 
How to set up cortana on windows 10
How to set up cortana on windows 10How to set up cortana on windows 10
How to set up cortana on windows 10
 
2210 s15 qp_ms_er_12
2210 s15 qp_ms_er_122210 s15 qp_ms_er_12
2210 s15 qp_ms_er_12
 
Databases By ZAK
Databases By ZAKDatabases By ZAK
Databases By ZAK
 
Data structures; arrays By ZAK
Data structures; arrays By ZAKData structures; arrays By ZAK
Data structures; arrays By ZAK
 
Programming concepts By ZAK
Programming concepts By ZAKProgramming concepts By ZAK
Programming concepts By ZAK
 
Pseudocode By ZAK
Pseudocode By ZAKPseudocode By ZAK
Pseudocode By ZAK
 
problem solving and design By ZAK
problem solving and design By ZAKproblem solving and design By ZAK
problem solving and design By ZAK
 
Ethics By ZAK
Ethics By ZAKEthics By ZAK
Ethics By ZAK
 
security By ZAK
security By ZAKsecurity By ZAK
security By ZAK
 
operating systems By ZAK
operating systems By ZAKoperating systems By ZAK
operating systems By ZAK
 
memory, storage devices and media By ZAK
memory, storage devices and media By ZAKmemory, storage devices and media By ZAK
memory, storage devices and media By ZAK
 
input devices By ZAK
input devices By ZAKinput devices By ZAK
input devices By ZAK
 
computer architecture and the fetch execute cycle By ZAK
computer architecture and the fetch execute cycle By ZAKcomputer architecture and the fetch execute cycle By ZAK
computer architecture and the fetch execute cycle By ZAK
 
logic gates By ZAK
logic gates By ZAKlogic gates By ZAK
logic gates By ZAK
 
internet principles of operation By ZAK
internet principles of operation By ZAKinternet principles of operation By ZAK
internet principles of operation By ZAK
 

Recently uploaded

Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 

Recently uploaded (20)

Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 

1.3.2 computer architecture and the fetch execute cycle By ZAK

  • 1. Page 1 of 5 1.3 Hardware and software 1.3.2 Computer architecture and the fetch-execute cycle Von Neumann Architecture The earliest computing machines had fixed programs. For example, a desk calculator (in principle) is a fixed program computer. It can do basic mathematics, but it cannot be used as a word processor or a gaming console. Changing the program of a fixed-program machine requires re-wiring, re-structuring, or re-designing the machine. The earliest computers were not so much "programmed" as they were "designed". "Reprogramming", when it was possible at all, was a laborious process, starting with flowcharts and paper notes, followed by detailed engineering designs, and then the often-arduous process of physically re-wiring and re-building the machine. It could take three weeks to set up a program on ENIAC (a computer of 1940s) and get it working. The phrase Von Neumann architecture derives from a paper written by computer scientist John von Neumann in1945. This describes design architecture for an electronic digital computer with subdivisions of a central arithmetic part, a central control part, a memory to store both data and instructions, external storage, and input and output mechanisms. The meaning of the phrase has evolved to mean a stored-program computer. A stored-program digital computer is one that keeps its programmed instructions, as well as its data, in read- write, random-access memory (RAM). So John Von Neumann introduced the idea of the stored program. Previously data and programs were stored in separate memories. Von Neumann realized that data and programs are indistinguishable and can, therefore, use the same memory. On a large scale, the ability to treat instructions as data is what makes assemblers, compilers and other automated programming tools possible. One can "write programs which write programs". This led to the introduction of compilers which accepted high level language source code as input and produced binary code as output.
  • 2. Page 2 of 5 1.3 Hardware and software 1.3.2 Computer architecture and the fetch-execute cycle The Von Neumann architecture uses a single processor which follows a linear sequence of fetch-decode- execute. In order to do this, the processor has to use some special registers, which are discrete memory locations with special purposes attached. These are: Register Meaning PC Program Counter CIR Current Instruction Register MAR Memory Address Register MDR Memory Data Register IR/IX Index Register Accumulator Holds results The program counter keeps track of where to find the next instruction so that a copy of the instruction can be placed in the current instruction register. Sometimes the program counter is called the Sequence Control Register (SCR) as it controls the sequence in which instructions are executed. The current instruction register holds the instruction that is to be executed. The memory address register is used to hold the memory address that contains either the next piece of data or an instruction that is to be used. The memory data register acts like a buffer and holds anything that is copied from the memory ready for the processor to use it. The central processor contains the arithmetic-logic unit (also known as the arithmetic unit) and the control unit. The arithmetic-logic unit (ALU) is where data is processed. This involves arithmetic and logical operations. Arithmetic operations are those that add and subtract numbers, and so on. Logical operations involve comparing binary patterns and making decisions.
  • 3. Page 3 of 5 1.3 Hardware and software 1.3.2 Computer architecture and the fetch-execute cycle The control unit fetches instructions from memory, decodes them and synchronizes the operations before sending signals to other parts of the computer. The accumulator is in the arithmetic unit, the program counter and the instruction registers are in the control unit and the memory data register and memory address register are in the processor. An index register is a microprocessor register used for modifying operand addresses during the run of a program, typically for doing vector/array operations. Index registers are used for a special kind of indirect addressing (where an immediate constant, which is part of the instruction itself) is added to the contents of the index register to form the address to the actual operand or data. A typical layout is shown in Fig. 3.3.a.1 which also shows the data paths.
  • 4. Page 4 of 5 1.3 Hardware and software 1.3.2 Computer architecture and the fetch-execute cycle The Fetch-Decode-Execute-Reset Cycle The following is an algorithm that shows the steps in the cycle. At the end, the cycle is reset and the algorithm repeated. 1. Load the address that is in the program counter (PC) into the memory address register (MAR). 2. Increment the PC by 1. 3. Load the instruction that is in the memory address given by the MAR into the memory data register (MDR). 4. Load the instruction that is now in the MDR into the current instruction register (CIR). 5. Decode the instruction that is in the CIR. 6. If the instruction is a jump instruction then a. Load the address part of the instruction into the PC b. Reset by going to step 1. 7. Execute the instruction. 8. Reset by going to step 1. Steps 1 to 4 are the fetch part of the cycle. Steps 5, 6a and 7 are the execute part of the cycle and steps 6b and 8 are the reset part. Step 1 simply places the address of the next instruction into the memory address register so that the control unit can fetch the instruction from the right part of the memory. The program counter is then incremented by 1 so that it contains the address of the next instruction, assuming that the instructions are in consecutive locations. The memory data register is used whenever anything is to go from the central processing unit to main memory, or vice versa. Thus the next instruction is copied from memory into the MDR and is then copied into the current instruction register. Now that the instruction has been fetched the control unit can decode it and decide what has to be done. This is the execute part of the cycle. If it is an arithmetic instruction, this can be executed and the cycle can restart as the PC contains the address of the next instruction in order. However, if the instruction involves jumping to an instruction that is not the next one in order, the PC has to be loaded with the address of the instruction that is to be executed next. This address is in the address part of the current instruction, hence the address part is loaded into the PC before the cycle is reset and starts all over again.
  • 5. Page 5 of 5 1.3 Hardware and software 1.3.2 Computer architecture and the fetch-execute cycle A CPU cannot do math on data registers, although it can do it indirectly with an index register. The index register works with the data registers, allowing a program to process strings of data efficiently. To process your first name, for example, a program move 300 to MAR and zero to the index register. An indexed operation adds the index value to the MDR, retrieving the letter at location 300. Next, the program increments the index by one and gets the next letter. It repeats this process until it has moved the whole name. By itself, the index register does little; its value is that it gives greater speed and convenience to address registers.