SlideShare a Scribd company logo
1 of 33
EE5440
COMPUTER ARCHITECTURE
Mr. Dilawar
Lecturer,
Computer Science Faculty,
Bakhtar University
Kabul, Afghanistan.
Previous Lecture
• The different types of computers
• The basic structure of a computer and its operation
• Machine instructions and their execution
• Integer, floating-point, and character representations
• Addition and subtraction of binary numbers
• Basic performance issues in computer systems
• A brief history of computer development
Instruction Set Architecture
Chapter 2
Lecture Outline
• Memory Locations and Addresses
• Memory Operations
• Instructions and Instruction Sequencing
• Addressing Modes
Memory Locations and Addresses
• How memory is organized
• Consist of millions of storage cells, each store
one bit of information.
• Bits are normally handled in groups of fixed
size.
• Requires single basic operation.
• Each n-bit group is called word.
• n-length describes the word length.
• Memory can be represented as a collection
of words.
Memory Locations and Addresses
• Modern PCs have word length
from 16 to 64.
• E.g: if 32-bit word length – a
single word can store 32-bit
signed number or four ASCII-
encoded characters, each
occupying 8 bits (byte).
Memory Locations and Addresses
• Machine instructions may require one or more words.
• Each word requires a distinct address in order to be accessed.
• 0 to 2k-1, for some suitable value of k.
• A memory can have up to 2k addressable locations, constitutes
address space of the computer.
• E.g: a 24-bit address generates an address space of 224 (16,777,216) locations.
Memory Locations and Addresses
Byte Addressability
• Three basic information quantities: bit, byte, and word.
• The most practical assignment is to have successive addresses refer to
successive byte locations in the memory..
• Byte-addressable memory is used for this assignment.
• Byte locations have address 0, 1, 2, …… thus, if the word length of the
machine is 32-bits, locations are located 0, 4, 8, ….. Consisting four
bytes.
Memory Locations and Addresses
Big-Endian and Little-Endian Assignments
• Two ways that byte addresses can be assigned across words:
• Big-Endian – When lower byte addresses are used for the more significant
bytes (the leftmost bytes) of the word.
• Little-Endian – Opposite ordering, where the lower byte addresses are used
for the less significant bytes (the rightmost bytes) of the word.
Memory Locations and Addresses
Big-Endian and Little-Endian Assignments
Memory Locations and Addresses
Accessing Numbers and Characters
• A number occupies one word, and can be accessed by specifying its
word address.
• Individual characters can be accessed by their byte address.
Memory Operations
• Two basic operations involving the memory are needed, namely, Read
and Write.
• Read Operation:
• Transfers a copy of contents to memory and contents in memory are
unchanged.
• Processor sends address to the memory and makes request for access.
• Memory reads the data stored and sends them to the processor.
• Write Operation:
• Vice versa.
Instructions and Instruction Sequencing
• A computer must have instructions capable of performing four types
of operations:
• Data transfers between the memory and the processor registers
• Arithmetic and logic operations on data
• Program sequencing and control
• I/O transfers
Instructions and Instruction Sequencing
Register Transfer Notation – RTN
• That may be involved in such transfers are memory locations,
processor registers, or registers in the I/O subsystem.
• Locations are represented symbolically with convenient names.
• LOC, PLACE, VAR2, R0, R5, DATAIN, OUTSTATUS etc…
• The contents of any location are denoted by placing square brackets
around its name – transfer of information.
Instructions and Instruction Sequencing
Assembly Language Notation
• Instructions specifies operation to be performed and the operand.
• These operations are represented through mnemonics such as LD and
STR or ST.
• Assembly language for different processors or different.
Instructions and Instruction Sequencing
RISC and CISC Instruction Sets
• Nature of instruction – distinguish different computers.
• One of the approach is – Reduced Instruction Set Computers
• That high performance can be achieved
• Each instruction occupies exactly one word in memory.
• Operands needed to execute a given arithmetic or logic are in registers.
• Instructions are performed in pipelined fashion to overlap activity and reduce total
execution time of a program.
Instructions and Instruction Sequencing
RISC and CISC Instruction Sets
• Alternative approach is – Complex Instruction Set Computers
• Each instruction occupies more than one word.
• More complicated operations
• Before RISC computers in 1970s.
Instructions and Instruction Sequencing
Introduction to RISC Instruction Sets
• Two key characteristics of RISC instruction sets are:
• Each instruction fits in a single word.
• A load/store architecture is used, in which
• Memory operands are accessed only using Load and Store instructions.
• All operands involved in an arithmetic or logic operation must be in processor register or
must be explicitly given.
Instructions and Instruction Sequencing
Introduction to RISC Instruction Sets
• Memory location can be specified through addressing modes.
Instructions and Instruction Sequencing
Introduction to RISC Instruction Sets
• Let us now consider a typical arithmetic operation.
• Machine instructions
Instructions and Instruction Sequencing
Instruction Execution and
Straight-Line Sequencing
• Program counter
• Straight-line sequencing
• Two-phase procedure:
• Instruction fetch
• Instruction Register
• Instruction execute
Instructions and Instruction Sequencing
Branching
• Instead of long list of
Load and Add
• It is possible to use a
program loop.
• Branch Instruction
• Branch Target
• Conditional Branch
Addressing Modes
• Program operates on data that resides in the computer memory.
• Different data structures are used for the organization of data.
• HLL statements are converted to several low-level instructions.
• The different ways for specifying the locations of instruction operands
are known as addressing modes.
Addressing Modes
Addressing Modes
Implementation of Variables and Constants
• Variable is represented by a register or
memory location to hold its value.
• Operands can be accessed using
• Register mode
• Absolute mode
• Constants can be represented in assembly
language using immediate mode.
Addressing Modes
Indirection and Pointers
• The register acts as a pointer to the list
• An item in the list is accessed indirectly by using
the address in the register.
• In indirect addressing, effective address of
the operand is the contents of a register.
Addressing Modes
Indirection and Pointers
• Indirection and the use of
pointers are important and
powerful concepts in
programming.
• They permit the same code
to be used to operate on
different data.
Addressing Modes
Indirection and Pointers
• Indirection and the use of pointers are important and powerful
concepts in programming.
• They permit the same code to be used to operate on different data.
• As another example of pointers, consider the C-language
Addressing Modes
Indexing and Arrays
• The effective address of the operand is generated by adding a
constant value to the contents of a register – Index mode.
• The register used in this mode as the index register.
• We indicate the Index mode
• The effective address of the operand is given by
Addressing Modes
Indexing and Arrays
Addressing Modes
Indexing and Arrays
Summery
• Memory Locations and Addresses
• Memory Operations
• Instructions and Instruction Sequencing
• Addressing Modes
Thank You
For your Patience

More Related Content

What's hot

General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)rishi ram khanal
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)Sandesh Jonchhe
 
Computer architecture input output organization
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organizationMazin Alwaaly
 
Intel x86 and ARM Data types
Intel x86 and ARM Data typesIntel x86 and ARM Data types
Intel x86 and ARM Data typesRowena Cornejo
 
Computer instruction
Computer instructionComputer instruction
Computer instructionSanjeev Patel
 
Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and ArchitectureVinit Raut
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control Anuj Modi
 
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)cs19club
 
Input output organization
Input output organizationInput output organization
Input output organizationabdulugc
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 80869840596838
 
Stack organization
Stack organizationStack organization
Stack organizationchauhankapil
 
Computer organization memory
Computer organization memoryComputer organization memory
Computer organization memoryDeepak John
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Gaditek
 

What's hot (20)

Instruction format
Instruction formatInstruction format
Instruction format
 
Read & write
Read & writeRead & write
Read & write
 
General register organization (computer organization)
General register organization  (computer organization)General register organization  (computer organization)
General register organization (computer organization)
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
 
Computer architecture input output organization
Computer architecture input output organizationComputer architecture input output organization
Computer architecture input output organization
 
Floating point arithmetic
Floating point arithmeticFloating point arithmetic
Floating point arithmetic
 
Intel x86 and ARM Data types
Intel x86 and ARM Data typesIntel x86 and ARM Data types
Intel x86 and ARM Data types
 
Lecture 3 instruction set
Lecture 3  instruction setLecture 3  instruction set
Lecture 3 instruction set
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference Instructions
 
Computer instruction
Computer instructionComputer instruction
Computer instruction
 
Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and Architecture
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control
 
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
 
Input output organization
Input output organizationInput output organization
Input output organization
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Stack organization
Stack organizationStack organization
Stack organization
 
Computer organization memory
Computer organization memoryComputer organization memory
Computer organization memory
 
Chapter11 addressing
Chapter11 addressingChapter11 addressing
Chapter11 addressing
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 

Similar to ISA Architecture Memory Addressing Modes

instruction sets (1).pptx
instruction sets (1).pptxinstruction sets (1).pptx
instruction sets (1).pptxAmanMomin9
 
Computer_Organization and architecture _unit 1.pptx
Computer_Organization and architecture _unit 1.pptxComputer_Organization and architecture _unit 1.pptx
Computer_Organization and architecture _unit 1.pptxManimegalaM3
 
Addressing modes, Operations in the instruction set 1.2.3 (1).pptx
Addressing modes, Operations in the instruction set 1.2.3 (1).pptxAddressing modes, Operations in the instruction set 1.2.3 (1).pptx
Addressing modes, Operations in the instruction set 1.2.3 (1).pptxAmarRaj22
 
EE5440 – Computer Architecture - Lecture 3
EE5440 – Computer Architecture - Lecture 3EE5440 – Computer Architecture - Lecture 3
EE5440 – Computer Architecture - Lecture 3Dilawar Khan
 
Computer organization basics
Computer organization  basicsComputer organization  basics
Computer organization basicsDeepak John
 
CE412 -advanced computer Architecture lecture 1.pdf
CE412 -advanced computer Architecture lecture 1.pdfCE412 -advanced computer Architecture lecture 1.pdf
CE412 -advanced computer Architecture lecture 1.pdfAdelAbougdera
 
Basic Structure of a Computer System
Basic Structure of a Computer SystemBasic Structure of a Computer System
Basic Structure of a Computer SystemAmirthavalli Senthil
 
Reduced instruction set computers
Reduced instruction set computersReduced instruction set computers
Reduced instruction set computersSyed Zaid Irshad
 
Advanced Processor Power Point Presentation
Advanced Processor  Power Point  PresentationAdvanced Processor  Power Point  Presentation
Advanced Processor Power Point PresentationPrashantYadav931011
 
Unit 1 Basic structureCOA.pdf
Unit 1 Basic structureCOA.pdfUnit 1 Basic structureCOA.pdf
Unit 1 Basic structureCOA.pdfSujanTimalsina5
 
10 instruction sets characteristics
10 instruction sets characteristics10 instruction sets characteristics
10 instruction sets characteristicsAnwal Mirza
 

Similar to ISA Architecture Memory Addressing Modes (20)

CO_Chapter2.ppt
CO_Chapter2.pptCO_Chapter2.ppt
CO_Chapter2.ppt
 
instruction sets (1).pptx
instruction sets (1).pptxinstruction sets (1).pptx
instruction sets (1).pptx
 
Computer_Organization and architecture _unit 1.pptx
Computer_Organization and architecture _unit 1.pptxComputer_Organization and architecture _unit 1.pptx
Computer_Organization and architecture _unit 1.pptx
 
Addressing modes, Operations in the instruction set 1.2.3 (1).pptx
Addressing modes, Operations in the instruction set 1.2.3 (1).pptxAddressing modes, Operations in the instruction set 1.2.3 (1).pptx
Addressing modes, Operations in the instruction set 1.2.3 (1).pptx
 
EE5440 – Computer Architecture - Lecture 3
EE5440 – Computer Architecture - Lecture 3EE5440 – Computer Architecture - Lecture 3
EE5440 – Computer Architecture - Lecture 3
 
Computer organization basics
Computer organization  basicsComputer organization  basics
Computer organization basics
 
Assembler
AssemblerAssembler
Assembler
 
CE412 -advanced computer Architecture lecture 1.pdf
CE412 -advanced computer Architecture lecture 1.pdfCE412 -advanced computer Architecture lecture 1.pdf
CE412 -advanced computer Architecture lecture 1.pdf
 
Basic Structure of a Computer System
Basic Structure of a Computer SystemBasic Structure of a Computer System
Basic Structure of a Computer System
 
Reduced instruction set computers
Reduced instruction set computersReduced instruction set computers
Reduced instruction set computers
 
Memory Management.pdf
Memory Management.pdfMemory Management.pdf
Memory Management.pdf
 
Advanced Processor Power Point Presentation
Advanced Processor  Power Point  PresentationAdvanced Processor  Power Point  Presentation
Advanced Processor Power Point Presentation
 
Instruction Codes.pptx
Instruction Codes.pptxInstruction Codes.pptx
Instruction Codes.pptx
 
13 risc
13 risc13 risc
13 risc
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Unit 1 Basic structureCOA.pdf
Unit 1 Basic structureCOA.pdfUnit 1 Basic structureCOA.pdf
Unit 1 Basic structureCOA.pdf
 
RISC.ppt
RISC.pptRISC.ppt
RISC.ppt
 
13 risc
13 risc13 risc
13 risc
 
10 instruction sets characteristics
10 instruction sets characteristics10 instruction sets characteristics
10 instruction sets characteristics
 
Microprocessor
MicroprocessorMicroprocessor
Microprocessor
 

More from Dilawar Khan

EE5440 – Computer Architecture - Lecture 1
EE5440 – Computer Architecture - Lecture 1EE5440 – Computer Architecture - Lecture 1
EE5440 – Computer Architecture - Lecture 1Dilawar Khan
 
CS7330 - Electronic Commerce - lecture (3)
CS7330 - Electronic Commerce - lecture (3)CS7330 - Electronic Commerce - lecture (3)
CS7330 - Electronic Commerce - lecture (3)Dilawar Khan
 
CS7330 - Electronic Commerce - lecture (2)
CS7330 - Electronic Commerce - lecture (2)CS7330 - Electronic Commerce - lecture (2)
CS7330 - Electronic Commerce - lecture (2)Dilawar Khan
 
CS3270 - DATABASE SYSTEM - Lecture (2)
CS3270 - DATABASE SYSTEM - Lecture (2)CS3270 - DATABASE SYSTEM - Lecture (2)
CS3270 - DATABASE SYSTEM - Lecture (2)Dilawar Khan
 
CS4443 - Modern Programming Language - I Lecture (2)
CS4443 - Modern Programming Language - I  Lecture (2)CS4443 - Modern Programming Language - I  Lecture (2)
CS4443 - Modern Programming Language - I Lecture (2)Dilawar Khan
 
CS3270 - DATABASE SYSTEM - Lecture (1)
CS3270 - DATABASE SYSTEM -  Lecture (1)CS3270 - DATABASE SYSTEM -  Lecture (1)
CS3270 - DATABASE SYSTEM - Lecture (1)Dilawar Khan
 
EE5440 – Computer Architecture Course Outline
EE5440 – Computer Architecture Course OutlineEE5440 – Computer Architecture Course Outline
EE5440 – Computer Architecture Course OutlineDilawar Khan
 
CS4443 - Modern Programming Language I
CS4443 - Modern Programming Language ICS4443 - Modern Programming Language I
CS4443 - Modern Programming Language IDilawar Khan
 
CS3270 – Database Systems Course Outline
CS3270 – Database Systems Course OutlineCS3270 – Database Systems Course Outline
CS3270 – Database Systems Course OutlineDilawar Khan
 
CS7330 Electronic Commerce Course Outline
CS7330 Electronic Commerce Course OutlineCS7330 Electronic Commerce Course Outline
CS7330 Electronic Commerce Course OutlineDilawar Khan
 
CS4443 - Modern Programming Language - I Lecture (1)
CS4443 - Modern Programming Language - I Lecture (1)CS4443 - Modern Programming Language - I Lecture (1)
CS4443 - Modern Programming Language - I Lecture (1)Dilawar Khan
 
CS7330 - Electronic Commerce - lecture (1)
CS7330 - Electronic Commerce - lecture (1)CS7330 - Electronic Commerce - lecture (1)
CS7330 - Electronic Commerce - lecture (1)Dilawar Khan
 

More from Dilawar Khan (12)

EE5440 – Computer Architecture - Lecture 1
EE5440 – Computer Architecture - Lecture 1EE5440 – Computer Architecture - Lecture 1
EE5440 – Computer Architecture - Lecture 1
 
CS7330 - Electronic Commerce - lecture (3)
CS7330 - Electronic Commerce - lecture (3)CS7330 - Electronic Commerce - lecture (3)
CS7330 - Electronic Commerce - lecture (3)
 
CS7330 - Electronic Commerce - lecture (2)
CS7330 - Electronic Commerce - lecture (2)CS7330 - Electronic Commerce - lecture (2)
CS7330 - Electronic Commerce - lecture (2)
 
CS3270 - DATABASE SYSTEM - Lecture (2)
CS3270 - DATABASE SYSTEM - Lecture (2)CS3270 - DATABASE SYSTEM - Lecture (2)
CS3270 - DATABASE SYSTEM - Lecture (2)
 
CS4443 - Modern Programming Language - I Lecture (2)
CS4443 - Modern Programming Language - I  Lecture (2)CS4443 - Modern Programming Language - I  Lecture (2)
CS4443 - Modern Programming Language - I Lecture (2)
 
CS3270 - DATABASE SYSTEM - Lecture (1)
CS3270 - DATABASE SYSTEM -  Lecture (1)CS3270 - DATABASE SYSTEM -  Lecture (1)
CS3270 - DATABASE SYSTEM - Lecture (1)
 
EE5440 – Computer Architecture Course Outline
EE5440 – Computer Architecture Course OutlineEE5440 – Computer Architecture Course Outline
EE5440 – Computer Architecture Course Outline
 
CS4443 - Modern Programming Language I
CS4443 - Modern Programming Language ICS4443 - Modern Programming Language I
CS4443 - Modern Programming Language I
 
CS3270 – Database Systems Course Outline
CS3270 – Database Systems Course OutlineCS3270 – Database Systems Course Outline
CS3270 – Database Systems Course Outline
 
CS7330 Electronic Commerce Course Outline
CS7330 Electronic Commerce Course OutlineCS7330 Electronic Commerce Course Outline
CS7330 Electronic Commerce Course Outline
 
CS4443 - Modern Programming Language - I Lecture (1)
CS4443 - Modern Programming Language - I Lecture (1)CS4443 - Modern Programming Language - I Lecture (1)
CS4443 - Modern Programming Language - I Lecture (1)
 
CS7330 - Electronic Commerce - lecture (1)
CS7330 - Electronic Commerce - lecture (1)CS7330 - Electronic Commerce - lecture (1)
CS7330 - Electronic Commerce - lecture (1)
 

Recently uploaded

KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
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
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
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
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
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
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
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
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
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
 

Recently uploaded (20)

KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
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
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
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
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
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
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
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
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
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
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
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
 

ISA Architecture Memory Addressing Modes

  • 1. EE5440 COMPUTER ARCHITECTURE Mr. Dilawar Lecturer, Computer Science Faculty, Bakhtar University Kabul, Afghanistan.
  • 2. Previous Lecture • The different types of computers • The basic structure of a computer and its operation • Machine instructions and their execution • Integer, floating-point, and character representations • Addition and subtraction of binary numbers • Basic performance issues in computer systems • A brief history of computer development
  • 4. Lecture Outline • Memory Locations and Addresses • Memory Operations • Instructions and Instruction Sequencing • Addressing Modes
  • 5. Memory Locations and Addresses • How memory is organized • Consist of millions of storage cells, each store one bit of information. • Bits are normally handled in groups of fixed size. • Requires single basic operation. • Each n-bit group is called word. • n-length describes the word length. • Memory can be represented as a collection of words.
  • 6. Memory Locations and Addresses • Modern PCs have word length from 16 to 64. • E.g: if 32-bit word length – a single word can store 32-bit signed number or four ASCII- encoded characters, each occupying 8 bits (byte).
  • 7. Memory Locations and Addresses • Machine instructions may require one or more words. • Each word requires a distinct address in order to be accessed. • 0 to 2k-1, for some suitable value of k. • A memory can have up to 2k addressable locations, constitutes address space of the computer. • E.g: a 24-bit address generates an address space of 224 (16,777,216) locations.
  • 8. Memory Locations and Addresses Byte Addressability • Three basic information quantities: bit, byte, and word. • The most practical assignment is to have successive addresses refer to successive byte locations in the memory.. • Byte-addressable memory is used for this assignment. • Byte locations have address 0, 1, 2, …… thus, if the word length of the machine is 32-bits, locations are located 0, 4, 8, ….. Consisting four bytes.
  • 9. Memory Locations and Addresses Big-Endian and Little-Endian Assignments • Two ways that byte addresses can be assigned across words: • Big-Endian – When lower byte addresses are used for the more significant bytes (the leftmost bytes) of the word. • Little-Endian – Opposite ordering, where the lower byte addresses are used for the less significant bytes (the rightmost bytes) of the word.
  • 10. Memory Locations and Addresses Big-Endian and Little-Endian Assignments
  • 11. Memory Locations and Addresses Accessing Numbers and Characters • A number occupies one word, and can be accessed by specifying its word address. • Individual characters can be accessed by their byte address.
  • 12. Memory Operations • Two basic operations involving the memory are needed, namely, Read and Write. • Read Operation: • Transfers a copy of contents to memory and contents in memory are unchanged. • Processor sends address to the memory and makes request for access. • Memory reads the data stored and sends them to the processor. • Write Operation: • Vice versa.
  • 13. Instructions and Instruction Sequencing • A computer must have instructions capable of performing four types of operations: • Data transfers between the memory and the processor registers • Arithmetic and logic operations on data • Program sequencing and control • I/O transfers
  • 14. Instructions and Instruction Sequencing Register Transfer Notation – RTN • That may be involved in such transfers are memory locations, processor registers, or registers in the I/O subsystem. • Locations are represented symbolically with convenient names. • LOC, PLACE, VAR2, R0, R5, DATAIN, OUTSTATUS etc… • The contents of any location are denoted by placing square brackets around its name – transfer of information.
  • 15. Instructions and Instruction Sequencing Assembly Language Notation • Instructions specifies operation to be performed and the operand. • These operations are represented through mnemonics such as LD and STR or ST. • Assembly language for different processors or different.
  • 16. Instructions and Instruction Sequencing RISC and CISC Instruction Sets • Nature of instruction – distinguish different computers. • One of the approach is – Reduced Instruction Set Computers • That high performance can be achieved • Each instruction occupies exactly one word in memory. • Operands needed to execute a given arithmetic or logic are in registers. • Instructions are performed in pipelined fashion to overlap activity and reduce total execution time of a program.
  • 17. Instructions and Instruction Sequencing RISC and CISC Instruction Sets • Alternative approach is – Complex Instruction Set Computers • Each instruction occupies more than one word. • More complicated operations • Before RISC computers in 1970s.
  • 18. Instructions and Instruction Sequencing Introduction to RISC Instruction Sets • Two key characteristics of RISC instruction sets are: • Each instruction fits in a single word. • A load/store architecture is used, in which • Memory operands are accessed only using Load and Store instructions. • All operands involved in an arithmetic or logic operation must be in processor register or must be explicitly given.
  • 19. Instructions and Instruction Sequencing Introduction to RISC Instruction Sets • Memory location can be specified through addressing modes.
  • 20. Instructions and Instruction Sequencing Introduction to RISC Instruction Sets • Let us now consider a typical arithmetic operation. • Machine instructions
  • 21. Instructions and Instruction Sequencing Instruction Execution and Straight-Line Sequencing • Program counter • Straight-line sequencing • Two-phase procedure: • Instruction fetch • Instruction Register • Instruction execute
  • 22. Instructions and Instruction Sequencing Branching • Instead of long list of Load and Add • It is possible to use a program loop. • Branch Instruction • Branch Target • Conditional Branch
  • 23. Addressing Modes • Program operates on data that resides in the computer memory. • Different data structures are used for the organization of data. • HLL statements are converted to several low-level instructions. • The different ways for specifying the locations of instruction operands are known as addressing modes.
  • 25. Addressing Modes Implementation of Variables and Constants • Variable is represented by a register or memory location to hold its value. • Operands can be accessed using • Register mode • Absolute mode • Constants can be represented in assembly language using immediate mode.
  • 26. Addressing Modes Indirection and Pointers • The register acts as a pointer to the list • An item in the list is accessed indirectly by using the address in the register. • In indirect addressing, effective address of the operand is the contents of a register.
  • 27. Addressing Modes Indirection and Pointers • Indirection and the use of pointers are important and powerful concepts in programming. • They permit the same code to be used to operate on different data.
  • 28. Addressing Modes Indirection and Pointers • Indirection and the use of pointers are important and powerful concepts in programming. • They permit the same code to be used to operate on different data. • As another example of pointers, consider the C-language
  • 29. Addressing Modes Indexing and Arrays • The effective address of the operand is generated by adding a constant value to the contents of a register – Index mode. • The register used in this mode as the index register. • We indicate the Index mode • The effective address of the operand is given by
  • 32. Summery • Memory Locations and Addresses • Memory Operations • Instructions and Instruction Sequencing • Addressing Modes
  • 33. Thank You For your Patience

Editor's Notes

  1. We will first consider how the memory of a computer is organized.
  2. 16 M – 1 MB (2^20) = 1048576 32-bit – 4 GB : 1 GB is 2^30 K for Kilo and T for Tera
  3. The words “more significant” and “less significant” are used in relation to the weights (powers of 2) assigned to bits when the word represents a number. Both little-endian and big-endian assignments are used in commercial machines.
  4. The Write operation transfers an item of information from the processor to a specific memory location, overwriting the former contents of that location. To initiate a Write operation, the processor sends the address of the desired location to the memory, together with the data to be written into that location. The memory then uses the address and data to perform the write.
  5. The tasks carried out by a computer program consist of a sequence of small steps, such as adding two numbers, testing for a particular condition, reading a character from the keyboard, or sending a character to be displayed on a display screen.
  6. We need to describe the transfer of information from one location in a computer to another. Transfer and Move are same – means copy.
  7. We need another type of notation to represent machine instructions and programs. For this, we use assembly language. For example, a generic instruction that causes the transfer described above, from memory location LOC to processor register R2, is specified by the statement
  8. At the start of execution of a program, all instructions and data used in the program are stored in the memory of a computer. Processor registers do not contain valid operands at that time. If operands are expected to be in processor registers before they can be used by an instruction, then it is necessary to first bring these operands into the registers. This task is done by Load instructions which copy the contents of a memory location into a processor register.
  9. When the program containing this statement is compiled, the three variables, A, B, and C, are assigned to distinct locations in the memory. To carry out this action, the contents of memory locations A and B are fetched from the memory and transferred into the processor where their sum is computed. This result is then sent back to the memory and stored in location C. We say that Add is a three-operand, or a three-address, instruction of the form. Add destination, source1, source2 The Store instruction is of the form Store source, destination
  10. We assume that the word length is 32 bits and the memory is byte-addressable. The four instructions of the program are in successive word locations, starting at location i. Since each instruction is 4 bytes long, the second, third, and fourth instructions are at addresses i + 4, i + 8, and i + 12.
  11. Consider the task of adding a list of n numbers. The program outlined in Figure 2.5 is a generalization of the program in Figure 2.4. The addresses of the memory locations containing the n numbers are symbolically given as NUM1, NUM2, . . . , NUMn, and separate Load and Add instructions are used to add each number to the contents of register R2. After all the numbers have been added, the result is placed in memory location SUM. We now introduce branch instructions. This type of instruction loads a new address into the program counter. As a result, the processor fetches and executes the instruction at this new address, called the branch target, instead of the instruction at the location that follows the branch instruction in sequential address order. A conditional branch instruction causes a branch only if a specified condition is satisfied. If the condition is not satisfied, the PC is incremented in the normal way, and the next instruction in sequential address order is fetched and executed. Branch_if_[R4]>[R5] LOOP Branch_greater_than R4, R5, LOOP BGT R4, R5, LOOP
  12. We access an operand by specifying the name of the register or the address of the memory location where the operand is located. In the addressing modes that follow, the instruction does not give the operand or its address explicitly. Instead, it provides information from which an effective address (EA) can be derived by the processor when the instruction is executed. The effective address is then used to access the operand.
  13. To execute the Load instruction in Figure 2.7, the processor uses the value B, which is in register R5, as the effective address of the operand. It requests a Read operation to fetch the contents of location B in the memory. The value from the memory is the desired operand, which the processor loads into register R2. Indirect addressing through a memory location is also possible, but it is found only in CISC-style processors.
  14. In many RISC-type processors, one general-purpose register is dedicated to holding a constant value zero. Usually, this is register R0. Its contents cannot be changed by a program instruction.
  15. The contents of the register are not changed in the process of generating the effective address. In an assembly-language program, whenever a constant such as the value X is needed, it may be given either as an explicit number or as a symbolic name representing a numerical value. The
  16. In Figure 2.9a, the index register, R5, contains the address of a memory location, and the value X defines an offset (also called a displacement) from this address to the location where the operand is found. Here, the constant X corresponds to a memory address, and the contents of the index register define the offset to the operand. In either case, the effective address is the sum of two values; one is given explicitly in the instruction, and the other is held in a register.