SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Downloaden Sie, um offline zu lesen
AC ¬ AC + M[X ] 
X = Operand Address 
R1¬ R2 + R3 
TOS ¬ M[X ] 
R ¬ M A + 
M B 
1 [ ] [ ] 
ADD R1, A, B 
ADD R2, C, D 
MUL X, R1, R2 [ ] 1 2 
R ¬ M C + 
M D 
2 [ ] [ ] 
M X ¬ R * 
R 
Computer System Architecture Chap. 8 Central PPrroocceessssiinngg UUnniitt 
1 / 22 
 3 types of CPU organizations 
l 1) Single AC Org. : ADD X 
l 2) General Register Org. : ADD R1, R2, R3 
l 3) Stack Org. : PUSH X 
 The influence of the number of addresses on computer instruction 
X = (A + B)*(C + D) 
- 4 arithmetic operations : ADD, SUB, MUL, DIV 
- 1 transfer operation to and from memory and general register : MOV 
- 2 transfer operation to and from memory and AC register : STORE, LOAD 
- Operand memory addresses : A, B, C, D 
- Result memory address : X 
l 1) Three-Address Instruction 
» Each address fields specify either a processor register or a memory operand 
» : Short program 
» Require too many bit to specify 3 address 
y 
8-4. Instruction Formats
8-4. Instruction Formats 
R ¬ 
M A 
1 [ ] 
MOV R1, A 
ADD R1, B 
MOV R2, C 
ADD R2, D 
MUL R1, R2 
MOV X, R1 [ ] 1 
R ¬ R + 
M B 
1 1 [ ] 
R ¬ 
M C 
2 [ ] 
R ¬ R + 
M D 
2 2 [ ] 
R ¬ R * 
R 
1 1 2 
M X ¬ 
R 
AC ¬ 
M A 
[ ] 
LOAD A 
ADD B 
STORE T 
LOAD C 
ADD D 
MUL T 
STORE X M X AC 
AC ¬ AC + 
M B 
M [ T ] 
¬ 
AC 
AC ¬ 
M C 
[ ] 
[ ] 
AC ¬ AC + 
M D 
[ ] 
AC ¬ AC * 
M T 
¬ 
[ ] 
[ ] 
Computer System Architecture Chap. 8 Central PPrroocceessssiinngg UUnniitt 
2 / 22 
l 2) Two-Address Instruction 
» The most common in commercial computers 
» Each address fields specify either a processor register or a memory operand 
l 3) One-Address Instruction 
» All operations are done between the AC register and memory operand
8-4. Instruction Formats 
TOS ¬ 
A 
PUSH A 
PUSH B 
TOS ¬ 
B 
ADD 
PUSH C 
PUSH D 
ADD 
MUL 
POP X M X TOS 
TOS ¬ A + 
B 
( ) 
TOS ¬ 
C 
TOS ¬ 
D 
TOS ¬ C + 
D 
( ) 
TOS ¬ C + D * A + 
B 
( ) ( ) 
¬ 
[ ] 
Computer System Architecture Chap. 8 Central PPrroocceessssiinngg UUnniitt 
3 / 22 
l 4) Zero-Address Instruction 
» Stack-organized computer does not use an address field for the instructions ADD, and 
MUL 
» PUSH, and POP instructions need an address field to specify the operand 
» Zero-Address : absence of address ( ADD, MUL )
8-5. Addressing Modes 
Computer System Architecture Chap. 8 Central PPrroocceessssiinngg UUnniitt 
4 / 22 
 Addressing Mode 
l 1) To give programming versatility to the user 
» pointers to memory, counters for loop control, indexing of data, …. 
l 2) To reduce the number of bits in the addressing field of the instruction 
 Instruction Cycle 
l 1) Fetch the instruction from memory and PC + 1 
l 2) Decode the instruction 
l 3) Execute the instruction
8-5. Addressing Modes 
Opcode Mode Address 
Computer System Architecture Chap. 8 Central PPrroocceessssiinngg UUnniitt 
5 / 22 
 Program Counter (PC) 
l PC keeps track of the instructions in the program stored in memory 
l PC holds the address of the instruction to be executed next 
l PC is incremented each time an instruction is fetched from memory 
 Addressing Mode of the Instruction 
1) Distinct Binary Code 
2) Single Binary Code 
 Implied Mode 
l Operands are specified implicitly in definition of the instruction 
l Examples 
» CMA : Complement Accumulator 
n Operand in AC is implied in the definition of the instruction 
» PUSH : Stack push 
n Operand is implied to be on top of the stack
8-5. Addressing Modes 
AC ¬ R1 Implied Mode 
AC ¬ M[R1] 
Computer System Architecture Chap. 8 Central PPrroocceessssiinngg UUnniitt 
6 / 22 
 Immediate Mode 
l Operand field contains the actual operand 
l Useful for initializing registers to a constant value 
l Example : LDA #NBR 
 Register Mode 
l Operands are in registers 
l Register is selected from a register field in the instruction 
» k-bit register field can specify any one of 2k registers 
l Example : LDA R1 
 Register Indirect Mode 
l Selected register contains the address of the operand rather than the operand 
itself 
l Address field of the instruction uses fewer bits to select a memory address 
l Example : LDA (R1) 
 Autoincrement or Autodecrement Mode 
l Similar to the register indirect mode except that 
» the register is incremented after its value is used to access memory 
» the register is decrement before its value is used to access memory
8-5. Addressing Modes 
AC ¬ M[R1], R1¬ R1+1 
ADR = Address part of Instruction 
AC ¬ M[ADR] 
AC ¬ M[M[ADR]] 
AC ¬ M[PC + ADR] 
AC ¬ M[ADR + XR] 
Computer System Architecture Chap. 8 Central PPrroocceessssiinngg UUnniitt 
7 / 22 
l Example (Autoincrement) : LD (R1)+ 
 Direct Addressing Mode 
l Effective address is equal to the address field of the instruction (Operand) 
l Address field specifies the actual branch address in a branch-type instruction 
l Example : LD ADR 
 Indirect Addressing Mode 
l Address field of instruction gives the address where the effective address is 
stored in memory 
l Example : LD @ADR 
 Relative Addressing Mode 
l PC is added to the address part of the instruction to obtain the effective address 
l Example : LD $ADR 
 Indexed Addressing Mode 
l XR (Index register) is added to the address part of the instruction to obtain the 
effective address 
l Example : LD ADR(XR) 
 Base Register Addressing Mode 
l the content of a base register is added to the address part of the instruction to 
obtain the effective address 
AC ¬ M[BR + ADR]
Numerical Example 
A d d r e s s M e m o r y 
4 5 0 
2 0 1 
2 0 2 
3 9 9 
4 0 0 
5 0 0 
6 0 0 
Computer System Architecture Chap. 8 Central PPrroocceessssiinngg UUnniitt 
8 / 22 
L o a d t o A C M o d e 
A d d r e s s = 5 0 0 
N e x t in s t r u c t i o n 
7 0 0 
8 0 0 
9 0 0 
3 2 5 
3 0 0 
P C = 2 0 0 
R 1 = 4 0 0 
X R = 1 0 0 
A C 
2 0 0 
7 0 2 
8 0 0
8-5. Addressing Modes 
Computer System Architecture Chap. 8 Central PPrroocceessssiinngg UUnniitt 
9 / 22 
Addressing Mode Effective Address Content of AC 
Immediate Address Mode 201 500 
Direct Address Mode 500 800 
Indirect Address Mode 800 300 
Register Mode 400 
Register Indirect Mode 400 700 
Relative Address Mode 702 325 
Indexed Address Mode 600 900 
Autoincrement Mode 400 700 
Autodecrement Mode 399 450 
A d d r e s s M e m o r y 
L o a d t o A C M o d e 
A d d r e s s = 5 0 0 
N e x t in s t r u c t io n 
4 5 0 
7 0 0 
8 0 0 
9 0 0 
3 2 5 
3 0 0 
P C = 2 0 0 
R 1 = 4 0 0 
X R = 1 0 0 
A C 
2 0 0 
2 0 1 
2 0 2 
3 9 9 
4 0 0 
5 0 0 
6 0 0 
7 0 2 
8 0 0

Weitere ähnliche Inhalte

Was ist angesagt?

central processing unit and pipeline
central processing unit and pipelinecentral processing unit and pipeline
central processing unit and pipelineRai University
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference InstructionsRabin BK
 
Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registersmahesh kumar prajapat
 
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...Rai University
 
COMPUTER ORGANIZATION NOTES Unit 2
COMPUTER ORGANIZATION NOTES  Unit 2COMPUTER ORGANIZATION NOTES  Unit 2
COMPUTER ORGANIZATION NOTES Unit 2Dr.MAYA NAYAK
 
Computer arithmetics (computer organisation & arithmetics) ppt
Computer arithmetics (computer organisation & arithmetics) pptComputer arithmetics (computer organisation & arithmetics) ppt
Computer arithmetics (computer organisation & arithmetics) pptSuryaKumarSahani
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operationNikhil Pandit
 
Computer organization and architecture
Computer organization and architectureComputer organization and architecture
Computer organization and architectureSubesh Kumar Yadav
 
Addressing modes (detailed data path)
Addressing modes (detailed data path)Addressing modes (detailed data path)
Addressing modes (detailed data path)Mahesh Kumar Attri
 
09 chapter04 timers_fa14
09 chapter04 timers_fa1409 chapter04 timers_fa14
09 chapter04 timers_fa14John Todora
 
Lec18 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- In...
Lec18 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- In...Lec18 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- In...
Lec18 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- In...Hsien-Hsin Sean Lee, Ph.D.
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Gaditek
 

Was ist angesagt? (19)

central processing unit and pipeline
central processing unit and pipelinecentral processing unit and pipeline
central processing unit and pipeline
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference Instructions
 
Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registers
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
 
Cpu unit
Cpu unitCpu unit
Cpu unit
 
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
 
Memory Reference Instructions
Memory Reference InstructionsMemory Reference Instructions
Memory Reference Instructions
 
COMPUTER ORGANIZATION NOTES Unit 2
COMPUTER ORGANIZATION NOTES  Unit 2COMPUTER ORGANIZATION NOTES  Unit 2
COMPUTER ORGANIZATION NOTES Unit 2
 
Computer arithmetics (computer organisation & arithmetics) ppt
Computer arithmetics (computer organisation & arithmetics) pptComputer arithmetics (computer organisation & arithmetics) ppt
Computer arithmetics (computer organisation & arithmetics) ppt
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operation
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
 
Computer organization and architecture
Computer organization and architectureComputer organization and architecture
Computer organization and architecture
 
Memory Reference instruction
Memory Reference instructionMemory Reference instruction
Memory Reference instruction
 
Addressing modes (detailed data path)
Addressing modes (detailed data path)Addressing modes (detailed data path)
Addressing modes (detailed data path)
 
09 chapter04 timers_fa14
09 chapter04 timers_fa1409 chapter04 timers_fa14
09 chapter04 timers_fa14
 
Pipeline r014
Pipeline   r014Pipeline   r014
Pipeline r014
 
Lec18 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- In...
Lec18 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- In...Lec18 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- In...
Lec18 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- In...
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
 
Various type of register
Various type of registerVarious type of register
Various type of register
 

Ähnlich wie Ch 8

Chapter8.ppt
Chapter8.pptChapter8.ppt
Chapter8.pptAllwin19
 
Ch8_CENTRAL PROCESSING UNIT Registers ALU
Ch8_CENTRAL PROCESSING UNIT Registers ALUCh8_CENTRAL PROCESSING UNIT Registers ALU
Ch8_CENTRAL PROCESSING UNIT Registers ALURNShukla7
 
Computer Organisation and Architecture
Computer Organisation and ArchitectureComputer Organisation and Architecture
Computer Organisation and ArchitectureSubhasis Dash
 
Mca i-u-4 central processing unit and pipeline
Mca i-u-4 central processing unit and pipelineMca i-u-4 central processing unit and pipeline
Mca i-u-4 central processing unit and pipelineRai University
 
central processing unit.ppt
central processing unit.pptcentral processing unit.ppt
central processing unit.pptssuserd27779
 
Bca 2nd sem-u-4 central processing unit and pipeline
Bca 2nd sem-u-4 central processing unit and pipelineBca 2nd sem-u-4 central processing unit and pipeline
Bca 2nd sem-u-4 central processing unit and pipelineRai University
 
B.sc cs-ii-u-4 central processing unit and pipeline
B.sc cs-ii-u-4 central processing unit and pipelineB.sc cs-ii-u-4 central processing unit and pipeline
B.sc cs-ii-u-4 central processing unit and pipelineRai University
 
pdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.pptpdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.pptSaurabhPorwal14
 
CPU Register Organization.ppt
CPU Register Organization.pptCPU Register Organization.ppt
CPU Register Organization.pptprathamgunj
 
Types of Instruction Format
Types of Instruction FormatTypes of Instruction Format
Types of Instruction FormatDhrumil Panchal
 

Ähnlich wie Ch 8 (20)

Unit iii mca 1st year
Unit iii mca 1st yearUnit iii mca 1st year
Unit iii mca 1st year
 
Chapter8.ppt
Chapter8.pptChapter8.ppt
Chapter8.ppt
 
UNIT-3.pptx
UNIT-3.pptxUNIT-3.pptx
UNIT-3.pptx
 
COA_mod2.ppt
COA_mod2.pptCOA_mod2.ppt
COA_mod2.ppt
 
7. CPU_Unit3 (1).pdf
7. CPU_Unit3 (1).pdf7. CPU_Unit3 (1).pdf
7. CPU_Unit3 (1).pdf
 
Chapter3.ppt
Chapter3.pptChapter3.ppt
Chapter3.ppt
 
Ch8_CENTRAL PROCESSING UNIT Registers ALU
Ch8_CENTRAL PROCESSING UNIT Registers ALUCh8_CENTRAL PROCESSING UNIT Registers ALU
Ch8_CENTRAL PROCESSING UNIT Registers ALU
 
Computer Organisation and Architecture
Computer Organisation and ArchitectureComputer Organisation and Architecture
Computer Organisation and Architecture
 
Mca i-u-4 central processing unit and pipeline
Mca i-u-4 central processing unit and pipelineMca i-u-4 central processing unit and pipeline
Mca i-u-4 central processing unit and pipeline
 
central processing unit.ppt
central processing unit.pptcentral processing unit.ppt
central processing unit.ppt
 
Bca 2nd sem-u-4 central processing unit and pipeline
Bca 2nd sem-u-4 central processing unit and pipelineBca 2nd sem-u-4 central processing unit and pipeline
Bca 2nd sem-u-4 central processing unit and pipeline
 
B.sc cs-ii-u-4 central processing unit and pipeline
B.sc cs-ii-u-4 central processing unit and pipelineB.sc cs-ii-u-4 central processing unit and pipeline
B.sc cs-ii-u-4 central processing unit and pipeline
 
CAO_Unit-3.ppt
CAO_Unit-3.pptCAO_Unit-3.ppt
CAO_Unit-3.ppt
 
Chapter8.ppt
Chapter8.pptChapter8.ppt
Chapter8.ppt
 
Central processor organization
Central processor organizationCentral processor organization
Central processor organization
 
Central processor organization
Central processor organizationCentral processor organization
Central processor organization
 
pdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.pptpdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.ppt
 
CPU Register Organization.ppt
CPU Register Organization.pptCPU Register Organization.ppt
CPU Register Organization.ppt
 
Instruction format
Instruction formatInstruction format
Instruction format
 
Types of Instruction Format
Types of Instruction FormatTypes of Instruction Format
Types of Instruction Format
 

Mehr von Nitesh Singh

Mehr von Nitesh Singh (20)

Risk taking and emotions
Risk taking and emotionsRisk taking and emotions
Risk taking and emotions
 
Project report RAILWAY TICKET RESERVATION SYSTEM SAD
Project report RAILWAY TICKET RESERVATION SYSTEM SADProject report RAILWAY TICKET RESERVATION SYSTEM SAD
Project report RAILWAY TICKET RESERVATION SYSTEM SAD
 
The real comedy behind comedy
The real comedy behind comedyThe real comedy behind comedy
The real comedy behind comedy
 
Project report Rs Dry celaners
Project report Rs Dry celaners Project report Rs Dry celaners
Project report Rs Dry celaners
 
BIG DATA ANALYSIS
BIG DATA ANALYSISBIG DATA ANALYSIS
BIG DATA ANALYSIS
 
Udp vs-tcp
Udp vs-tcpUdp vs-tcp
Udp vs-tcp
 
Routing protocols-network-layer
Routing protocols-network-layerRouting protocols-network-layer
Routing protocols-network-layer
 
Routers vs-switch
Routers vs-switchRouters vs-switch
Routers vs-switch
 
New udp
New udpNew udp
New udp
 
I pv4 format
I pv4 formatI pv4 format
I pv4 format
 
I pv4 addressing
I pv4 addressingI pv4 addressing
I pv4 addressing
 
Hub vs-switch
Hub vs-switchHub vs-switch
Hub vs-switch
 
Ftp
FtpFtp
Ftp
 
Email ftp
Email ftpEmail ftp
Email ftp
 
Www and http
Www and httpWww and http
Www and http
 
Transmission main
Transmission mainTransmission main
Transmission main
 
Ta 104-topology
Ta 104-topologyTa 104-topology
Ta 104-topology
 
Ta 104-topology (1)
Ta 104-topology (1)Ta 104-topology (1)
Ta 104-topology (1)
 
Ta 104-tcp
Ta 104-tcpTa 104-tcp
Ta 104-tcp
 
Ta 104-media-3
Ta 104-media-3Ta 104-media-3
Ta 104-media-3
 

Kürzlich hochgeladen

data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spaintimesproduction05
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLManishPatel169454
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Christo Ananth
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSrknatarajan
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 

Kürzlich hochgeladen (20)

data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 

Ch 8

  • 1. AC ¬ AC + M[X ] X = Operand Address R1¬ R2 + R3 TOS ¬ M[X ] R ¬ M A + M B 1 [ ] [ ] ADD R1, A, B ADD R2, C, D MUL X, R1, R2 [ ] 1 2 R ¬ M C + M D 2 [ ] [ ] M X ¬ R * R Computer System Architecture Chap. 8 Central PPrroocceessssiinngg UUnniitt 1 / 22  3 types of CPU organizations l 1) Single AC Org. : ADD X l 2) General Register Org. : ADD R1, R2, R3 l 3) Stack Org. : PUSH X  The influence of the number of addresses on computer instruction X = (A + B)*(C + D) - 4 arithmetic operations : ADD, SUB, MUL, DIV - 1 transfer operation to and from memory and general register : MOV - 2 transfer operation to and from memory and AC register : STORE, LOAD - Operand memory addresses : A, B, C, D - Result memory address : X l 1) Three-Address Instruction » Each address fields specify either a processor register or a memory operand » : Short program » Require too many bit to specify 3 address y 8-4. Instruction Formats
  • 2. 8-4. Instruction Formats R ¬ M A 1 [ ] MOV R1, A ADD R1, B MOV R2, C ADD R2, D MUL R1, R2 MOV X, R1 [ ] 1 R ¬ R + M B 1 1 [ ] R ¬ M C 2 [ ] R ¬ R + M D 2 2 [ ] R ¬ R * R 1 1 2 M X ¬ R AC ¬ M A [ ] LOAD A ADD B STORE T LOAD C ADD D MUL T STORE X M X AC AC ¬ AC + M B M [ T ] ¬ AC AC ¬ M C [ ] [ ] AC ¬ AC + M D [ ] AC ¬ AC * M T ¬ [ ] [ ] Computer System Architecture Chap. 8 Central PPrroocceessssiinngg UUnniitt 2 / 22 l 2) Two-Address Instruction » The most common in commercial computers » Each address fields specify either a processor register or a memory operand l 3) One-Address Instruction » All operations are done between the AC register and memory operand
  • 3. 8-4. Instruction Formats TOS ¬ A PUSH A PUSH B TOS ¬ B ADD PUSH C PUSH D ADD MUL POP X M X TOS TOS ¬ A + B ( ) TOS ¬ C TOS ¬ D TOS ¬ C + D ( ) TOS ¬ C + D * A + B ( ) ( ) ¬ [ ] Computer System Architecture Chap. 8 Central PPrroocceessssiinngg UUnniitt 3 / 22 l 4) Zero-Address Instruction » Stack-organized computer does not use an address field for the instructions ADD, and MUL » PUSH, and POP instructions need an address field to specify the operand » Zero-Address : absence of address ( ADD, MUL )
  • 4. 8-5. Addressing Modes Computer System Architecture Chap. 8 Central PPrroocceessssiinngg UUnniitt 4 / 22  Addressing Mode l 1) To give programming versatility to the user » pointers to memory, counters for loop control, indexing of data, …. l 2) To reduce the number of bits in the addressing field of the instruction  Instruction Cycle l 1) Fetch the instruction from memory and PC + 1 l 2) Decode the instruction l 3) Execute the instruction
  • 5. 8-5. Addressing Modes Opcode Mode Address Computer System Architecture Chap. 8 Central PPrroocceessssiinngg UUnniitt 5 / 22  Program Counter (PC) l PC keeps track of the instructions in the program stored in memory l PC holds the address of the instruction to be executed next l PC is incremented each time an instruction is fetched from memory  Addressing Mode of the Instruction 1) Distinct Binary Code 2) Single Binary Code  Implied Mode l Operands are specified implicitly in definition of the instruction l Examples » CMA : Complement Accumulator n Operand in AC is implied in the definition of the instruction » PUSH : Stack push n Operand is implied to be on top of the stack
  • 6. 8-5. Addressing Modes AC ¬ R1 Implied Mode AC ¬ M[R1] Computer System Architecture Chap. 8 Central PPrroocceessssiinngg UUnniitt 6 / 22  Immediate Mode l Operand field contains the actual operand l Useful for initializing registers to a constant value l Example : LDA #NBR  Register Mode l Operands are in registers l Register is selected from a register field in the instruction » k-bit register field can specify any one of 2k registers l Example : LDA R1  Register Indirect Mode l Selected register contains the address of the operand rather than the operand itself l Address field of the instruction uses fewer bits to select a memory address l Example : LDA (R1)  Autoincrement or Autodecrement Mode l Similar to the register indirect mode except that » the register is incremented after its value is used to access memory » the register is decrement before its value is used to access memory
  • 7. 8-5. Addressing Modes AC ¬ M[R1], R1¬ R1+1 ADR = Address part of Instruction AC ¬ M[ADR] AC ¬ M[M[ADR]] AC ¬ M[PC + ADR] AC ¬ M[ADR + XR] Computer System Architecture Chap. 8 Central PPrroocceessssiinngg UUnniitt 7 / 22 l Example (Autoincrement) : LD (R1)+  Direct Addressing Mode l Effective address is equal to the address field of the instruction (Operand) l Address field specifies the actual branch address in a branch-type instruction l Example : LD ADR  Indirect Addressing Mode l Address field of instruction gives the address where the effective address is stored in memory l Example : LD @ADR  Relative Addressing Mode l PC is added to the address part of the instruction to obtain the effective address l Example : LD $ADR  Indexed Addressing Mode l XR (Index register) is added to the address part of the instruction to obtain the effective address l Example : LD ADR(XR)  Base Register Addressing Mode l the content of a base register is added to the address part of the instruction to obtain the effective address AC ¬ M[BR + ADR]
  • 8. Numerical Example A d d r e s s M e m o r y 4 5 0 2 0 1 2 0 2 3 9 9 4 0 0 5 0 0 6 0 0 Computer System Architecture Chap. 8 Central PPrroocceessssiinngg UUnniitt 8 / 22 L o a d t o A C M o d e A d d r e s s = 5 0 0 N e x t in s t r u c t i o n 7 0 0 8 0 0 9 0 0 3 2 5 3 0 0 P C = 2 0 0 R 1 = 4 0 0 X R = 1 0 0 A C 2 0 0 7 0 2 8 0 0
  • 9. 8-5. Addressing Modes Computer System Architecture Chap. 8 Central PPrroocceessssiinngg UUnniitt 9 / 22 Addressing Mode Effective Address Content of AC Immediate Address Mode 201 500 Direct Address Mode 500 800 Indirect Address Mode 800 300 Register Mode 400 Register Indirect Mode 400 700 Relative Address Mode 702 325 Indexed Address Mode 600 900 Autoincrement Mode 400 700 Autodecrement Mode 399 450 A d d r e s s M e m o r y L o a d t o A C M o d e A d d r e s s = 5 0 0 N e x t in s t r u c t io n 4 5 0 7 0 0 8 0 0 9 0 0 3 2 5 3 0 0 P C = 2 0 0 R 1 = 4 0 0 X R = 1 0 0 A C 2 0 0 2 0 1 2 0 2 3 9 9 4 0 0 5 0 0 6 0 0 7 0 2 8 0 0