SlideShare a Scribd company logo
4
Most read
5
Most read
11
Most read
MEMORYREFERENCE
INSTRUCTIONS
1
Presented by: Rabin BK
BSc.CSIT 3rd Semester
Introduction to Memory Reference Instructions
Some terminologies
Memory Reference Instructions
References
2
There are seven different memory-reference instructions
Actual execution of the instruction in the bus system requires a sequence of
microoperations as data in memory cannot be processed directly
Microoperations are needed for the data to be read from memory to a
register to operate them on logic circuits
3
Introduction to Memory Reference Instructions
Symbol Operation Decoder
AND D0
ADD D1
LDA D2
STA D3
BUN D4
BSA D5
ISZ D6
Effective address (EA)
• Any operand to an instruction which references memory
• Basically enclosed inside a square brackets
• Calculated as: EA = Base + (Index*Scale) + Displacement
• Displacement — An 8-, 16-, or 32-bit value.
• Base — The value in a general-purpose register
• Index — The value in a general-purpose register
• Scale factor — A value of 2, 4, or 8 that is multiplied by the index value
DR → Data Register
AR → Address Register
IR → Instruction Register
PC → Program Counter
AC→ Accumulator
SC → Sequence Counter
4
Some terminologies
AND to AC
 Performs the AND logic operations on pairs of bits in AC and the
memory word specified by the effective address
 Two timing signals are needed
• In T4 transfering operand from memory into DR
• In T5 transfering result of AND logic operation between the contents
of DR and AC
• In T5 SC is cleared to 0 and control is transfered to T0 to start a new
instruction cycle
 Example:
• D0T4: DR←M[AR]
• D0T5: AC←AC∧ DR, SC←0
5
Instructions
ADD to AC
 Adds the contents of memory word specified by the effective
address to the value of AC
 Sum is transferred into AC and the output carry Cout is transferred to
the E(extended accumulator) flip flop
 Two timing signals are needed but decoder D1 instead of D0
 Example:
• D1T4: DR←M[AR]
• D1T5: AC←AC+DR, E←Cout SC←0
6
Instructions cont...
LDA:Load to AC
 Tranfers the memory word specified by the effective address to AC
 Necessary to read the memory word into DR first and transfer the
contents of DR into AC
 there is no direct path from bus into AC
 to maintain one clock cycle as well
 Example:
 D2T4: DR←M[AR]
 D2T5: AC←DR SC←0
7
Instructions cont...
STA:Store AC
Stores the content of AC into the memory word specified by the
effective address
 The output of AC is applied to the bus and the data input of
memory is connected to the bus
 Example:
 D3T4: M[AR]←AC, SC←0
8
Instructions cont...
BUN:Branch Unconditionally
 PC is incremented at time T1 to prepare it for the address of the next
instruction in the program sequence
 BUN transfers the program to the instruction specified by the
effective address
 Allows the programmer to specify an instruction out of sequence
and we say that the program branches (jumps) unconditionally
 Example:
 D4T4: PC←AR SC←0 (resetting SC transfers control to T4)
9
Instructions cont...
BSA:Branch and Save Return Address
 Useful for branching to a portion of the program called a subroutine
or procedure
 When executed, it stores the address of the next instruction in
sequence (which is available in PC) into a memory location
specified by the effective address
 (Effective address + 1) is then transferred to PC to serve as the
address of the first instruction in the subroutine
 The return to the original program is accomplished by the BUN
instruction placed at the end of the subroutine
 Example:
 D5T4: M[AR]←PC, AR←AR+1
 D5T5: PC ← AR, SC←0
10
Instructions cont...
ISZ:Increment and Skip if Zero
 Increments the word specified by the effective address
 If the incremented value is equal to 0, PC is incremented by 1
 When a negative number(in 2's compelement) stored in memory word is
repeatedy incremented by 1 it eventually reaches zero
 At this time PC is incremented by one in order to skip the next
instruction in the program
 It is necessary to read the word into DR, increment DR and store the
word back into memory since it is not possible to increment a word
inside the memory
 Example:
 D6T4: DR←M[AR]
 D6T5: DR←DR+1
 D6T6: M[AR] ← DR, if (DR=0) then (PC←PC+1), SC←0
11
Instructions cont...
References
• Dasgupta, S., Computer Architecture: A Modern Synthersis, Vol. 2 New
York: John Wiley, 1989
• M.Morris Mano, Computer System Architecture, Pearson, Third Edition
• https://www.tortall.net/projects/yasm/manual/html/nasm-effaddr.html
• http://faculty.cs.niu.edu/~berezin/463/notes/addrmode.html
• https://everything2.com/title/Effective+address
12
Queries
13

More Related Content

What's hot (20)

PPTX
Modes of data transfer
Shah Ishtiyaq Mehfooze
 
PPTX
Basic Computer Organization and Design
Aksum Institute of Technology(AIT, @Letsgo)
 
PPT
Instruction cycle
shweta-sharma99
 
PPTX
Asynchronous data transfer
priya Nithya
 
PPTX
Computer registers
DeepikaT13
 
PPS
Computer instructions
Anuj Modi
 
PPTX
Register transfer and micro-operation
Nikhil Pandit
 
PPTX
Register transfer language
Sanjeev Patel
 
PPTX
Timing and control
chauhankapil
 
PPTX
Modes of transfer
Andhra University
 
PPTX
Types of Addressing modes- COA
Ruchi Maurya
 
PPTX
Instruction format
chauhankapil
 
PPTX
Stack organization
chauhankapil
 
PPTX
Memory Hierarchy
chauhankapil
 
PPTX
instruction cycle ppt
sheetal singh
 
PPTX
Dynamic memory allocation in c
lavanya marichamy
 
PPTX
Microprogrammed Control Unit
PreethiSureshkumar1
 
PPT
Addressing modes
Mahesh Kumar Attri
 
PPTX
Memory organization in computer architecture
Faisal Hussain
 
PPTX
Direct memory access (dma)
Zubair Khalid
 
Modes of data transfer
Shah Ishtiyaq Mehfooze
 
Basic Computer Organization and Design
Aksum Institute of Technology(AIT, @Letsgo)
 
Instruction cycle
shweta-sharma99
 
Asynchronous data transfer
priya Nithya
 
Computer registers
DeepikaT13
 
Computer instructions
Anuj Modi
 
Register transfer and micro-operation
Nikhil Pandit
 
Register transfer language
Sanjeev Patel
 
Timing and control
chauhankapil
 
Modes of transfer
Andhra University
 
Types of Addressing modes- COA
Ruchi Maurya
 
Instruction format
chauhankapil
 
Stack organization
chauhankapil
 
Memory Hierarchy
chauhankapil
 
instruction cycle ppt
sheetal singh
 
Dynamic memory allocation in c
lavanya marichamy
 
Microprogrammed Control Unit
PreethiSureshkumar1
 
Addressing modes
Mahesh Kumar Attri
 
Memory organization in computer architecture
Faisal Hussain
 
Direct memory access (dma)
Zubair Khalid
 

Similar to Memory Reference Instructions (20)

PPTX
Memory reference
rajshreemuthiah
 
PPT
8051 instruction_set.ppt
20EUEE018DEEPAKM
 
PDF
CAAL_CCSU_U1.pdf
salabhmehrotra
 
PPTX
Basic computer organization design
ndasharath
 
PDF
Computer Organization and Architecture Themes and Variations 1st Edition Alan...
sosingpets
 
PPT
8051d.ppt microcontroller instruction set summary
anushkayadav3011
 
PPT
8051 Programming Instruction Set
Shreyans Pathak
 
PPTX
Unit_2 (4).pptx
AyushiBhatla
 
PDF
Instruction set of 8085
Sri Manakula Vinayagar Engineering College
 
PDF
computer organization and assembly language giki course slides
danishahmed3232
 
PPT
CO_Chapter2.ppt
Pranav726214
 
PDF
16-bit microprocessors
Zahra Sadeghi
 
PPT
Register Transfer Language and Micro Operations
KAVITHA N S
 
PDF
mca is a microcontroller and accmulator is a third year couse
gauravsharma4365
 
PPT
Instructions_introductionM2.1.about.microcontrollerppt
yesmskai
 
PPTX
Unit iv introduction to 8051 microcontroller ppts
Sreenivas Hanumandla
 
PPTX
Microcontroller architecture programming and interfacing
thejasmeetsingh
 
PDF
Computer Organization and Architecture Themes and Variations 1st Edition Alan...
depluskakeru
 
PDF
Lecture5
misgina Mengesha
 
PDF
Lecture5(1)
misgina Mengesha
 
Memory reference
rajshreemuthiah
 
8051 instruction_set.ppt
20EUEE018DEEPAKM
 
CAAL_CCSU_U1.pdf
salabhmehrotra
 
Basic computer organization design
ndasharath
 
Computer Organization and Architecture Themes and Variations 1st Edition Alan...
sosingpets
 
8051d.ppt microcontroller instruction set summary
anushkayadav3011
 
8051 Programming Instruction Set
Shreyans Pathak
 
Unit_2 (4).pptx
AyushiBhatla
 
computer organization and assembly language giki course slides
danishahmed3232
 
CO_Chapter2.ppt
Pranav726214
 
16-bit microprocessors
Zahra Sadeghi
 
Register Transfer Language and Micro Operations
KAVITHA N S
 
mca is a microcontroller and accmulator is a third year couse
gauravsharma4365
 
Instructions_introductionM2.1.about.microcontrollerppt
yesmskai
 
Unit iv introduction to 8051 microcontroller ppts
Sreenivas Hanumandla
 
Microcontroller architecture programming and interfacing
thejasmeetsingh
 
Computer Organization and Architecture Themes and Variations 1st Edition Alan...
depluskakeru
 
Lecture5(1)
misgina Mengesha
 
Ad

More from Rabin BK (20)

PPTX
Artificial Intelligence in E-commerce
Rabin BK
 
PPTX
Three address code generation
Rabin BK
 
PPTX
Consumer Oriented Application, Mercantile process and Mercantile models
Rabin BK
 
PPTX
Clang compiler `
Rabin BK
 
PPTX
Simple Mail Transfer Protocol
Rabin BK
 
PPTX
HTML text formatting tags
Rabin BK
 
PPTX
Data encryption in database management system
Rabin BK
 
PPTX
Object Relational Database Management System(ORDBMS)
Rabin BK
 
PPTX
Kolmogorov Smirnov
Rabin BK
 
PPTX
Job sequencing in Data Strcture
Rabin BK
 
PPTX
Stack Data Structure
Rabin BK
 
PPTX
Bluetooth
Rabin BK
 
PPTX
Data Science
Rabin BK
 
PPTX
Graphics_3D viewing
Rabin BK
 
PPTX
Neural Netwrok
Rabin BK
 
PPTX
Watermarking in digital images
Rabin BK
 
PPTX
Heun's Method
Rabin BK
 
PPTX
Mutual Exclusion
Rabin BK
 
PPTX
Systems Usage
Rabin BK
 
PPTX
Manager of a company
Rabin BK
 
Artificial Intelligence in E-commerce
Rabin BK
 
Three address code generation
Rabin BK
 
Consumer Oriented Application, Mercantile process and Mercantile models
Rabin BK
 
Clang compiler `
Rabin BK
 
Simple Mail Transfer Protocol
Rabin BK
 
HTML text formatting tags
Rabin BK
 
Data encryption in database management system
Rabin BK
 
Object Relational Database Management System(ORDBMS)
Rabin BK
 
Kolmogorov Smirnov
Rabin BK
 
Job sequencing in Data Strcture
Rabin BK
 
Stack Data Structure
Rabin BK
 
Bluetooth
Rabin BK
 
Data Science
Rabin BK
 
Graphics_3D viewing
Rabin BK
 
Neural Netwrok
Rabin BK
 
Watermarking in digital images
Rabin BK
 
Heun's Method
Rabin BK
 
Mutual Exclusion
Rabin BK
 
Systems Usage
Rabin BK
 
Manager of a company
Rabin BK
 
Ad

Recently uploaded (20)

PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Python basic programing language for automation
DanialHabibi2
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
July Patch Tuesday
Ivanti
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 

Memory Reference Instructions

  • 2. Introduction to Memory Reference Instructions Some terminologies Memory Reference Instructions References 2
  • 3. There are seven different memory-reference instructions Actual execution of the instruction in the bus system requires a sequence of microoperations as data in memory cannot be processed directly Microoperations are needed for the data to be read from memory to a register to operate them on logic circuits 3 Introduction to Memory Reference Instructions Symbol Operation Decoder AND D0 ADD D1 LDA D2 STA D3 BUN D4 BSA D5 ISZ D6
  • 4. Effective address (EA) • Any operand to an instruction which references memory • Basically enclosed inside a square brackets • Calculated as: EA = Base + (Index*Scale) + Displacement • Displacement — An 8-, 16-, or 32-bit value. • Base — The value in a general-purpose register • Index — The value in a general-purpose register • Scale factor — A value of 2, 4, or 8 that is multiplied by the index value DR → Data Register AR → Address Register IR → Instruction Register PC → Program Counter AC→ Accumulator SC → Sequence Counter 4 Some terminologies
  • 5. AND to AC  Performs the AND logic operations on pairs of bits in AC and the memory word specified by the effective address  Two timing signals are needed • In T4 transfering operand from memory into DR • In T5 transfering result of AND logic operation between the contents of DR and AC • In T5 SC is cleared to 0 and control is transfered to T0 to start a new instruction cycle  Example: • D0T4: DR←M[AR] • D0T5: AC←AC∧ DR, SC←0 5 Instructions
  • 6. ADD to AC  Adds the contents of memory word specified by the effective address to the value of AC  Sum is transferred into AC and the output carry Cout is transferred to the E(extended accumulator) flip flop  Two timing signals are needed but decoder D1 instead of D0  Example: • D1T4: DR←M[AR] • D1T5: AC←AC+DR, E←Cout SC←0 6 Instructions cont...
  • 7. LDA:Load to AC  Tranfers the memory word specified by the effective address to AC  Necessary to read the memory word into DR first and transfer the contents of DR into AC  there is no direct path from bus into AC  to maintain one clock cycle as well  Example:  D2T4: DR←M[AR]  D2T5: AC←DR SC←0 7 Instructions cont...
  • 8. STA:Store AC Stores the content of AC into the memory word specified by the effective address  The output of AC is applied to the bus and the data input of memory is connected to the bus  Example:  D3T4: M[AR]←AC, SC←0 8 Instructions cont...
  • 9. BUN:Branch Unconditionally  PC is incremented at time T1 to prepare it for the address of the next instruction in the program sequence  BUN transfers the program to the instruction specified by the effective address  Allows the programmer to specify an instruction out of sequence and we say that the program branches (jumps) unconditionally  Example:  D4T4: PC←AR SC←0 (resetting SC transfers control to T4) 9 Instructions cont...
  • 10. BSA:Branch and Save Return Address  Useful for branching to a portion of the program called a subroutine or procedure  When executed, it stores the address of the next instruction in sequence (which is available in PC) into a memory location specified by the effective address  (Effective address + 1) is then transferred to PC to serve as the address of the first instruction in the subroutine  The return to the original program is accomplished by the BUN instruction placed at the end of the subroutine  Example:  D5T4: M[AR]←PC, AR←AR+1  D5T5: PC ← AR, SC←0 10 Instructions cont...
  • 11. ISZ:Increment and Skip if Zero  Increments the word specified by the effective address  If the incremented value is equal to 0, PC is incremented by 1  When a negative number(in 2's compelement) stored in memory word is repeatedy incremented by 1 it eventually reaches zero  At this time PC is incremented by one in order to skip the next instruction in the program  It is necessary to read the word into DR, increment DR and store the word back into memory since it is not possible to increment a word inside the memory  Example:  D6T4: DR←M[AR]  D6T5: DR←DR+1  D6T6: M[AR] ← DR, if (DR=0) then (PC←PC+1), SC←0 11 Instructions cont...
  • 12. References • Dasgupta, S., Computer Architecture: A Modern Synthersis, Vol. 2 New York: John Wiley, 1989 • M.Morris Mano, Computer System Architecture, Pearson, Third Edition • https://www.tortall.net/projects/yasm/manual/html/nasm-effaddr.html • http://faculty.cs.niu.edu/~berezin/463/notes/addrmode.html • https://everything2.com/title/Effective+address 12