SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle ppt
sheetal singh
 
Fetch decode-execute presentation
Fetch decode-execute presentationFetch decode-execute presentation
Fetch decode-execute presentation
chantellemallia
 
Part I:Introduction to assembly language
Part I:Introduction to assembly languagePart I:Introduction to assembly language
Part I:Introduction to assembly language
Ahmed M. Abed
 

Tendances (20)

Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 
Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organization
 
Computer architecture
Computer architecture Computer architecture
Computer architecture
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
 
Motherboard and its components
Motherboard and its componentsMotherboard and its components
Motherboard and its components
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle ppt
 
Memory organization in computer architecture
Memory organization in computer architectureMemory organization in computer architecture
Memory organization in computer architecture
 
Fetch decode-execute presentation
Fetch decode-execute presentationFetch decode-execute presentation
Fetch decode-execute presentation
 
CS304PC:Computer Organization and Architecture UNIT I.pdf
CS304PC:Computer Organization and Architecture UNIT I.pdfCS304PC:Computer Organization and Architecture UNIT I.pdf
CS304PC:Computer Organization and Architecture UNIT I.pdf
 
Control Unit Design
Control Unit DesignControl Unit Design
Control Unit Design
 
Assembly Language
Assembly LanguageAssembly Language
Assembly Language
 
Instruction format
Instruction formatInstruction format
Instruction format
 
Input & Output
Input & OutputInput & Output
Input & Output
 
mano.ppt
mano.pptmano.ppt
mano.ppt
 
Control unit design
Control unit designControl unit design
Control unit design
 
Part I:Introduction to assembly language
Part I:Introduction to assembly languagePart I:Introduction to assembly language
Part I:Introduction to assembly language
 

En vedette

Segments
SegmentsSegments
Segments
aviban
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and Design
mekind
 
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
 

En vedette (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
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Assembly Language Lecture 1
Assembly Language Lecture 1Assembly Language Lecture 1
Assembly Language Lecture 1
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and Design
 
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)
 

Similaire à Memory & the fetch decode-execute cycle

Computer System Architecture - Computer System Architecture
Computer System Architecture - Computer System ArchitectureComputer System Architecture - Computer System Architecture
Computer System Architecture - Computer System Architecture
ssusera1e32a1
 

Similaire à 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
 
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)
 
Cpu organisation
Cpu organisationCpu organisation
Cpu organisation
 

Dernier

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
ssuserdda66b
 

Dernier (20)

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
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
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
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
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 

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