SlideShare ist ein Scribd-Unternehmen logo
1 von 12
Main Memory & Memory
Addresses
Memory


A memory chip is used to store
all our data. A chip which is set
next to the CPU as it makes
direct contact with the CPU.
• Volotile - stores data temporarily, It
means that when the computer is
switched off, that particular data is
removed completely from the system.
E.g. RAM
• Non-volotile - stores data permanently,
it means that when the computer is
switched off all data remains stored in
the system. E.g. ROM
Difference between ROM &
RAM
What is Machine Code?


Machine code is the only form of program
instructions that the computer hardware
can understand and execute directly. All
other forms of computer language must be
translated into machine code in order to be
executed by the hardware. E.g. Assembly
language



Assembly language is a symbolic
representation of machine code, which
allows programmers to write programs in
machine code without having to deal with
the long binary strings.


Assembly Language is made up
of op-codes and operands
Instructions
in
assembly
language are rather simple
• An opcode is a single instruction that can be
executed by the CPU. In machine language it is
a binary or hexadecimal value such as 'b6'
loaded into the instruction register
e.g. Mov, add , jmp
•Operands are manipulated by the opcode.
MOV, AL, 34H
The operands are the register named AL and
the value 34 hex
Fetch-Decode-Execute
Cycle
THE FETCH – EXECUTE CYCLE
Both the data and the program that
acts upon that data are loaded into
main memory (RAM) by the operating
system. The CPU is now ready to do
some work.
Steps of the Fetch/Execute
Cycle:
• Get the next instruction
• Figure out what to do
• Gathering the data needed
to do it
• Do it
• Save the result, and
• Repeat (billions of
times/second)!
Fetch Cycle
• The Program Counter (PC) contains the address of
the next instruction to be fetched
• The address contained in the PC is copied to the
Memory Address Register (MAR).
• The instruction is copied from the memory location
contained in the MAR and placed in the Memory
Buffer Register (MBR).
• The entire instruction is copied from the MBR and
placed in the Current Instruction Register (CIR)
• The PC is incremented so that it points to the next
instruction to be fetched
Execute Cycle
• The address part of the instruction is
placed in the MAR
• The instruction
executed

is

decoded

and

• The processor checks for interrupts
(signals from devices or other sources
seeking the attention of the processor)
and either branches to the relevant
interrupt service routine or starts the
cycle again.
CU

100

101
100

PC

Program
Counter

IR

Multiply no.
Instruction
in 500, 501
Register

ALU
Acc Accumulator
378

Multiply no. in 500,501

101

Store result in 502

500

21

501

18

502

1.The PC contains the address of location 100
2.CU fetches instruction in location 100
3. Make a copy of the instruction into the IR
4. Increment the PC by 1
5. Activate the right circuits to execute the instruction
CU
PC

100

102
101

Program
Counter

Store result
Multiply no.
Instruction
IR
inin 502
500, 501
Register
ALU
Acc Accumulator
378

Multiply no. in 500,501

101

Store result in 502

500

21

501

18

502

378

1. The PC contains the address of location 101
2. CU fetches instruction in location 101
3. A copy of the instruction is saved in the IR
4. Increment the PC
5. Activate the right circuits to execute the instruction

Weitere ähnliche Inhalte

Was ist angesagt?

Computer registers
Computer registersComputer registers
Computer registersDeepikaT13
 
Computer architecture
Computer architectureComputer architecture
Computer architectureZuhaib Zaroon
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Gaditek
 
Arithmetic Logic Unit .
Arithmetic Logic Unit .Arithmetic Logic Unit .
Arithmetic Logic Unit .Deyaa Ahmed
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and Designmekind
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)Sandesh Jonchhe
 
Operand and Opcode | Computer Science
Operand and Opcode | Computer ScienceOperand and Opcode | Computer Science
Operand and Opcode | Computer ScienceTransweb Global Inc
 
Introduction to Bus | Address, Data, Control Bus
Introduction to Bus | Address, Data, Control BusIntroduction to Bus | Address, Data, Control Bus
Introduction to Bus | Address, Data, Control BusHem Pokhrel
 
Modes Of Transfer in Input/Output Organization
Modes Of Transfer in Input/Output OrganizationModes Of Transfer in Input/Output Organization
Modes Of Transfer in Input/Output OrganizationMOHIT AGARWAL
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Subhasis Dash
 
Unit 5 I/O organization
Unit 5   I/O organizationUnit 5   I/O organization
Unit 5 I/O organizationchidabdu
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output OrganizationKamal Acharya
 
Part I:Introduction to assembly language
Part I:Introduction to assembly languagePart I:Introduction to assembly language
Part I:Introduction to assembly languageAhmed M. Abed
 

Was ist angesagt? (20)

Computer registers
Computer registersComputer registers
Computer registers
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
 
Arithmetic Logic Unit .
Arithmetic Logic Unit .Arithmetic Logic Unit .
Arithmetic Logic Unit .
 
Input output interface
Input output interfaceInput output interface
Input output interface
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and Design
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
 
Operand and Opcode | Computer Science
Operand and Opcode | Computer ScienceOperand and Opcode | Computer Science
Operand and Opcode | Computer Science
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
Introduction to Bus | Address, Data, Control Bus
Introduction to Bus | Address, Data, Control BusIntroduction to Bus | Address, Data, Control Bus
Introduction to Bus | Address, Data, Control Bus
 
Computer arithmetic
Computer arithmeticComputer arithmetic
Computer arithmetic
 
Arithmetic & Logic Unit
Arithmetic & Logic UnitArithmetic & Logic Unit
Arithmetic & Logic Unit
 
Modes Of Transfer in Input/Output Organization
Modes Of Transfer in Input/Output OrganizationModes Of Transfer in Input/Output Organization
Modes Of Transfer in Input/Output Organization
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1)
 
Unit 5 I/O organization
Unit 5   I/O organizationUnit 5   I/O organization
Unit 5 I/O organization
 
Fetch-execute Cycle
Fetch-execute CycleFetch-execute Cycle
Fetch-execute Cycle
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
 
Part I:Introduction to assembly language
Part I:Introduction to assembly languagePart I:Introduction to assembly language
Part I:Introduction to assembly language
 
Register & Memory
Register & MemoryRegister & Memory
Register & Memory
 

Andere mochten auch

Segments
SegmentsSegments
Segmentsaviban
 
13.computer buses
13.computer buses13.computer buses
13.computer busesAbu Saleh
 
Memory segmentation-of-8086
Memory segmentation-of-8086Memory segmentation-of-8086
Memory segmentation-of-8086mudulin
 
Introduction to CPU registers
Introduction to CPU registersIntroduction to CPU registers
Introduction to CPU registersMuhammad Waqas
 
04. Computer Casing (Case, Housing)
04. Computer Casing (Case, Housing)04. Computer Casing (Case, Housing)
04. Computer Casing (Case, Housing)Akhila Dakshina
 
External Cards and Slots
External Cards and SlotsExternal Cards and Slots
External Cards and SlotsArif Samoon
 
Assembly Language Lecture 1
Assembly Language Lecture 1Assembly Language Lecture 1
Assembly Language Lecture 1Motaz Saad
 
The Intel 8086 microprocessor
The Intel 8086 microprocessorThe Intel 8086 microprocessor
The Intel 8086 microprocessorGeorge Thomas
 
ARM7-ARCHITECTURE
ARM7-ARCHITECTURE ARM7-ARCHITECTURE
ARM7-ARCHITECTURE Dr.YNM
 
F453 computer science fde cycle
F453 computer science fde cycleF453 computer science fde cycle
F453 computer science fde cycleMark Gibbs
 
Wireless Gesture Controlled Robot (FYP Report)
Wireless Gesture Controlled Robot (FYP Report)Wireless Gesture Controlled Robot (FYP Report)
Wireless Gesture Controlled Robot (FYP Report)Muhammad Ahkam Khan
 

Andere mochten auch (20)

Segments
SegmentsSegments
Segments
 
8086
80868086
8086
 
13.computer buses
13.computer buses13.computer buses
13.computer buses
 
Memory segmentation-of-8086
Memory segmentation-of-8086Memory segmentation-of-8086
Memory segmentation-of-8086
 
Mother Board
Mother BoardMother Board
Mother Board
 
Expansion cards
Expansion cardsExpansion cards
Expansion cards
 
Introduction to CPU registers
Introduction to CPU registersIntroduction to CPU registers
Introduction to CPU registers
 
04. Computer Casing (Case, Housing)
04. Computer Casing (Case, Housing)04. Computer Casing (Case, Housing)
04. Computer Casing (Case, Housing)
 
External Cards and Slots
External Cards and SlotsExternal Cards and Slots
External Cards and Slots
 
Buses in a computer
Buses in a computerBuses in a computer
Buses in a computer
 
Mother board
Mother boardMother board
Mother board
 
Computer architecture
Computer architecture Computer architecture
Computer architecture
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Assembly Language Lecture 1
Assembly Language Lecture 1Assembly Language Lecture 1
Assembly Language Lecture 1
 
The Intel 8086 microprocessor
The Intel 8086 microprocessorThe Intel 8086 microprocessor
The Intel 8086 microprocessor
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
 
ARM7-ARCHITECTURE
ARM7-ARCHITECTURE ARM7-ARCHITECTURE
ARM7-ARCHITECTURE
 
Computer memory
Computer memoryComputer memory
Computer memory
 
F453 computer science fde cycle
F453 computer science fde cycleF453 computer science fde cycle
F453 computer science fde cycle
 
Wireless Gesture Controlled Robot (FYP Report)
Wireless Gesture Controlled Robot (FYP Report)Wireless Gesture Controlled Robot (FYP Report)
Wireless Gesture Controlled Robot (FYP Report)
 

Ähnlich wie Memory & the fetch decode-execute cycle

Ähnlich wie Memory & the fetch decode-execute cycle (20)

Computer System Architecture - Computer System Architecture
Computer System Architecture - Computer System ArchitectureComputer System Architecture - Computer System Architecture
Computer System Architecture - Computer System Architecture
 
Running a Program.pdf
Running a Program.pdfRunning a Program.pdf
Running a Program.pdf
 
Cpu & its execution of instruction
Cpu & its execution of instructionCpu & its execution of instruction
Cpu & its execution of instruction
 
Computer Organization and Architechuture basics
Computer Organization and Architechuture basicsComputer Organization and Architechuture basics
Computer Organization and Architechuture basics
 
CAO.pptx
CAO.pptxCAO.pptx
CAO.pptx
 
Unit2fit
Unit2fitUnit2fit
Unit2fit
 
cpuorganisation-140723043011-phpapp02.pdf
cpuorganisation-140723043011-phpapp02.pdfcpuorganisation-140723043011-phpapp02.pdf
cpuorganisation-140723043011-phpapp02.pdf
 
Chapter1a
Chapter1aChapter1a
Chapter1a
 
Cpu
CpuCpu
Cpu
 
CPU.ppd
CPU.ppdCPU.ppd
CPU.ppd
 
Cpu organisation
Cpu organisationCpu organisation
Cpu organisation
 
Register
RegisterRegister
Register
 
The Basic Organization of Computers
The Basic Organization of ComputersThe Basic Organization of Computers
The Basic Organization of Computers
 
System Programming- Unit I
System Programming- Unit ISystem Programming- Unit I
System Programming- Unit I
 
E.s unit 4 and 5
E.s unit 4 and 5E.s unit 4 and 5
E.s unit 4 and 5
 
CPU Architecture
CPU ArchitectureCPU Architecture
CPU Architecture
 
Microprocessor systems (4)
Microprocessor systems (4)Microprocessor systems (4)
Microprocessor systems (4)
 
computer devices and memory unit 2 notes.pdf
computer devices and memory unit 2 notes.pdfcomputer devices and memory unit 2 notes.pdf
computer devices and memory unit 2 notes.pdf
 
Cpu and its execution statements
Cpu and its execution statementsCpu and its execution statements
Cpu and its execution statements
 
Unit 1 computer architecture (1)
Unit 1   computer architecture (1)Unit 1   computer architecture (1)
Unit 1 computer architecture (1)
 

Kürzlich hochgeladen

80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 

Kürzlich hochgeladen (20)

80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 

Memory & the fetch decode-execute cycle

  • 1. Main Memory & Memory Addresses
  • 2. Memory  A memory chip is used to store all our data. A chip which is set next to the CPU as it makes direct contact with the CPU. • Volotile - stores data temporarily, It means that when the computer is switched off, that particular data is removed completely from the system. E.g. RAM • Non-volotile - stores data permanently, it means that when the computer is switched off all data remains stored in the system. E.g. ROM
  • 4. What is Machine Code?  Machine code is the only form of program instructions that the computer hardware can understand and execute directly. All other forms of computer language must be translated into machine code in order to be executed by the hardware. E.g. Assembly language  Assembly language is a symbolic representation of machine code, which allows programmers to write programs in machine code without having to deal with the long binary strings.
  • 5.  Assembly Language is made up of op-codes and operands Instructions in assembly language are rather simple • An opcode is a single instruction that can be executed by the CPU. In machine language it is a binary or hexadecimal value such as 'b6' loaded into the instruction register e.g. Mov, add , jmp •Operands are manipulated by the opcode. MOV, AL, 34H The operands are the register named AL and the value 34 hex
  • 7. THE FETCH – EXECUTE CYCLE Both the data and the program that acts upon that data are loaded into main memory (RAM) by the operating system. The CPU is now ready to do some work.
  • 8. Steps of the Fetch/Execute Cycle: • Get the next instruction • Figure out what to do • Gathering the data needed to do it • Do it • Save the result, and • Repeat (billions of times/second)!
  • 9. Fetch Cycle • The Program Counter (PC) contains the address of the next instruction to be fetched • The address contained in the PC is copied to the Memory Address Register (MAR). • The instruction is copied from the memory location contained in the MAR and placed in the Memory Buffer Register (MBR). • The entire instruction is copied from the MBR and placed in the Current Instruction Register (CIR) • The PC is incremented so that it points to the next instruction to be fetched
  • 10. Execute Cycle • The address part of the instruction is placed in the MAR • The instruction executed is decoded and • The processor checks for interrupts (signals from devices or other sources seeking the attention of the processor) and either branches to the relevant interrupt service routine or starts the cycle again.
  • 11. CU 100 101 100 PC Program Counter IR Multiply no. Instruction in 500, 501 Register ALU Acc Accumulator 378 Multiply no. in 500,501 101 Store result in 502 500 21 501 18 502 1.The PC contains the address of location 100 2.CU fetches instruction in location 100 3. Make a copy of the instruction into the IR 4. Increment the PC by 1 5. Activate the right circuits to execute the instruction
  • 12. CU PC 100 102 101 Program Counter Store result Multiply no. Instruction IR inin 502 500, 501 Register ALU Acc Accumulator 378 Multiply no. in 500,501 101 Store result in 502 500 21 501 18 502 378 1. The PC contains the address of location 101 2. CU fetches instruction in location 101 3. A copy of the instruction is saved in the IR 4. Increment the PC 5. Activate the right circuits to execute the instruction