SlideShare a Scribd company logo
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

More Related Content

PPTX
Main memory of computer .ppt
PPT
Cache Memory
PPT
Memory Management in OS
PPT
Fetch decode-execute presentation
PPTX
Computer registers
PPTX
memory hierarchy
PPS
Interrupts
PDF
CS4109 Computer System Architecture
Main memory of computer .ppt
Cache Memory
Memory Management in OS
Fetch decode-execute presentation
Computer registers
memory hierarchy
Interrupts
CS4109 Computer System Architecture

What's hot (20)

PPTX
Cache memory and virtual memory
PPTX
Virtual Memory in Operating System
PPTX
register
PPTX
Memory management ppt
PPTX
Query processing
PPTX
Basic computer organization
PPT
Computer System Organization
PPTX
General register organization (computer organization)
PPT
Operating System Deadlock Galvin
PPTX
interprocessor arbitration
PPTX
Operating system memory management
PPTX
Timing and control circuit
PPT
input output Organization
PPTX
Computer organization
PPTX
Memory Organization
PPTX
Input & Output
PPTX
Producer consumer problem operating system
PPT
Computer organisation Module 1.ppt
PPT
Introduction to data structures and Algorithm
Cache memory and virtual memory
Virtual Memory in Operating System
register
Memory management ppt
Query processing
Basic computer organization
Computer System Organization
General register organization (computer organization)
Operating System Deadlock Galvin
interprocessor arbitration
Operating system memory management
Timing and control circuit
input output Organization
Computer organization
Memory Organization
Input & Output
Producer consumer problem operating system
Computer organisation Module 1.ppt
Introduction to data structures and Algorithm
Ad

Viewers also liked (20)

PPT
Instruction cycle
PPTX
Segments
PPT
PPT
13.computer buses
PDF
Memory segmentation-of-8086
PPTX
instruction cycle ppt
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
PPT
Assembly Language Lecture 1
PDF
Basic Computer Organization and Design
PPT
The Intel 8086 microprocessor
PPTX
Paging and segmentation
DOCX
ARM7-ARCHITECTURE
Instruction cycle
Segments
13.computer buses
Memory segmentation-of-8086
instruction cycle ppt
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
Assembly Language Lecture 1
Basic Computer Organization and Design
The Intel 8086 microprocessor
Paging and segmentation
ARM7-ARCHITECTURE
Ad

Similar to Memory & the fetch decode-execute cycle (20)

PDF
Computer System Architecture - Computer System Architecture
PDF
Computer organization and architecture|KTU
PDF
Computer organization and architecture|KTU
PDF
Running a Program.pdf
PPTX
Computer Organisation & Architecture (chapter 1)
PPTX
Cpu & its execution of instruction
PDF
Computer Organization and Architechuture basics
PPTX
CAO.pptx
PDF
Unit 3 - Computer Organization .pdf
PPTX
basicfunctionalunit-190124043726555.pptx
PDF
3. IICT_Lecture 03_Computer Org Personal
PPTX
Unit2fit
PDF
cpuorganisation-140723043011-phpapp02.pdf
PPT
Cpu organisation
PPTX
Register
PPTX
The Basic Organization of Computers
PPTX
System Programming- Unit I
Computer System Architecture - Computer System Architecture
Computer organization and architecture|KTU
Computer organization and architecture|KTU
Running a Program.pdf
Computer Organisation & Architecture (chapter 1)
Cpu & its execution of instruction
Computer Organization and Architechuture basics
CAO.pptx
Unit 3 - Computer Organization .pdf
basicfunctionalunit-190124043726555.pptx
3. IICT_Lecture 03_Computer Org Personal
Unit2fit
cpuorganisation-140723043011-phpapp02.pdf
Cpu organisation
Register
The Basic Organization of Computers
System Programming- Unit I

Recently uploaded (20)

PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Pre independence Education in Inndia.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Computing-Curriculum for Schools in Ghana
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
Cell Types and Its function , kingdom of life
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Basic Mud Logging Guide for educational purpose
PDF
Complications of Minimal Access Surgery at WLH
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Pre independence Education in Inndia.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPH.pptx obstetrics and gynecology in nursing
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Module 4: Burden of Disease Tutorial Slides S2 2025
Computing-Curriculum for Schools in Ghana
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Sports Quiz easy sports quiz sports quiz
Cell Types and Its function , kingdom of life
VCE English Exam - Section C Student Revision Booklet
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
102 student loan defaulters named and shamed – Is someone you know on the list?
Microbial diseases, their pathogenesis and prophylaxis
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Final Presentation General Medicine 03-08-2024.pptx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Basic Mud Logging Guide for educational purpose
Complications of Minimal Access Surgery at WLH

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