SlideShare a Scribd company logo
1 of 8
MIPS ADDRESSING MODES
Immediate Addressing Mode
Register Addressing Mode
Base or Displacement Addressing Mode
PC-Relative Addressing Mode
Pseudo Direct Addressing Mode
Immediate Addressing Mode
Eg:1. addi $s0, $zero,7
Eg:4. ori $t0,$t1,8
$s0 = 0 + 7
$t0 = $t1 | 8
Register Addressing Mode
Eg:1. add $s1,$s2,$s3
Eg:2. or $t0,$t1,$t2
Eg:3. srl $s7,$s0,4
$s1 = $s2 + $s3
$t0 = $t1 + $t2
$s7 = $s0 >> 4
Base / Displacement Addressing Mode
Eg:1. lw $s1, 4($s2)
Eg:2. sw $s0, 8($s4)
$s1 = Mem [$s2+4]
Mem [$s4+8] = $s0
PC – Relative Addressing Mode
Eg:1. beq $s1, $s2, 25
Eg:2. bne $s0, $s1, 20
if($s1==$s2) goto PC+4+100
if($s0!=$s1) goto PC+4+80
Pseudo Direct Addressing Mode
Eg:1. j 2500
Eg:2. jr $ra
Eg:3. jal 2500
go to 10000
goto $ra
$ra=PC+4 goto 10000
EXAMPLE
Loop: add $t1,$s3,$s3
add $t1,$t1,$t1
add $t1,$t1,$s6
lw $t0,0($t1)
bne $t0,$s5,Exit
add $s3,$s3,$s4
j loop
Exit:
35 9 8 0
0 19 19 9 0 32
5 8 21 2
2 2000
8000
8004
8008
0 9 9 9 0 32
0 9 22 9 0 32
0 19 20 19 0 32
8012
8016
8020
8024
8028
Starting address 8000
0000 0000 0001 0000 0101 0001 0000 0000
0000 0000 0001 0000 0101 0001 0000 000000000000000100000101000100000000
000000 00000100000101000100000000
R - Type
000000 00000100000101000100 000000
sll
000000 00000 10000 01010 00100 000000
sll $t2,
op rs rt rd Shift amt fn
$s0, 4
0x00105100 00105100 hex

More Related Content

What's hot

Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Gaditek
 
Pipeline hazard
Pipeline hazardPipeline hazard
Pipeline hazardAJAL A J
 
Types of Addressing modes- COA
Types of Addressing modes- COATypes of Addressing modes- COA
Types of Addressing modes- COARuchi Maurya
 
Instruction format
Instruction formatInstruction format
Instruction formatchauhankapil
 
SHIFT REGISTERS
SHIFT REGISTERSSHIFT REGISTERS
SHIFT REGISTERSkumari36
 
Addressing modes
Addressing modesAddressing modes
Addressing modesAJAL A J
 
Floating point representation
Floating point representationFloating point representation
Floating point representationmissstevenson01
 
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGChapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGFrankie Jones
 
8086 instructions
8086 instructions8086 instructions
8086 instructionsRavi Anand
 
Virtual memory
Virtual memoryVirtual memory
Virtual memoryAnuj Modi
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA ControllerShivamSood22
 
RISC and CISC Processors
RISC and CISC ProcessorsRISC and CISC Processors
RISC and CISC ProcessorsAdeel Rasheed
 
Register transfer language & its micro operations
Register transfer language & its micro operationsRegister transfer language & its micro operations
Register transfer language & its micro operationsLakshya Sharma
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O portsanishgoel
 
Interfacing with peripherals: analog to digital converters and digital to ana...
Interfacing with peripherals: analog to digital converters and digital to ana...Interfacing with peripherals: analog to digital converters and digital to ana...
Interfacing with peripherals: analog to digital converters and digital to ana...NimeshSingh27
 

What's hot (20)

Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
 
Pipeline hazard
Pipeline hazardPipeline hazard
Pipeline hazard
 
Types of Addressing modes- COA
Types of Addressing modes- COATypes of Addressing modes- COA
Types of Addressing modes- COA
 
Instruction format
Instruction formatInstruction format
Instruction format
 
SHIFT REGISTERS
SHIFT REGISTERSSHIFT REGISTERS
SHIFT REGISTERS
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Instruction format
Instruction formatInstruction format
Instruction format
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
 
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGChapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
 
8086 instructions
8086 instructions8086 instructions
8086 instructions
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA Controller
 
RISC and CISC Processors
RISC and CISC ProcessorsRISC and CISC Processors
RISC and CISC Processors
 
Register transfer language & its micro operations
Register transfer language & its micro operationsRegister transfer language & its micro operations
Register transfer language & its micro operations
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O ports
 
CO by Rakesh Roshan
CO by Rakesh RoshanCO by Rakesh Roshan
CO by Rakesh Roshan
 
Queue
QueueQueue
Queue
 
CISC & RISC Architecture
CISC & RISC Architecture CISC & RISC Architecture
CISC & RISC Architecture
 
Interfacing with peripherals: analog to digital converters and digital to ana...
Interfacing with peripherals: analog to digital converters and digital to ana...Interfacing with peripherals: analog to digital converters and digital to ana...
Interfacing with peripherals: analog to digital converters and digital to ana...
 

More from babuece

Hardware Multi-Threading
Hardware Multi-ThreadingHardware Multi-Threading
Hardware Multi-Threadingbabuece
 
Introduction to Advance Computer Architecture
Introduction to Advance Computer ArchitectureIntroduction to Advance Computer Architecture
Introduction to Advance Computer Architecturebabuece
 
Clusters and Wharehouse Scale Computers
Clusters and Wharehouse Scale ComputersClusters and Wharehouse Scale Computers
Clusters and Wharehouse Scale Computersbabuece
 
Introduction to GPU
Introduction to GPUIntroduction to GPU
Introduction to GPUbabuece
 
Shared Memory Multi Processor
Shared Memory Multi ProcessorShared Memory Multi Processor
Shared Memory Multi Processorbabuece
 
Instruction Level Parallelism | Static Multiple Issue & Dynamic Multiple Issu...
Instruction Level Parallelism | Static Multiple Issue & Dynamic Multiple Issu...Instruction Level Parallelism | Static Multiple Issue & Dynamic Multiple Issu...
Instruction Level Parallelism | Static Multiple Issue & Dynamic Multiple Issu...babuece
 
Exception | How Exceptions are Handled in MIPS architecture
Exception | How Exceptions are Handled in MIPS architectureException | How Exceptions are Handled in MIPS architecture
Exception | How Exceptions are Handled in MIPS architecturebabuece
 
Introduction to Embedded Laboratory EC 8711
Introduction to Embedded Laboratory EC 8711 Introduction to Embedded Laboratory EC 8711
Introduction to Embedded Laboratory EC 8711 babuece
 
Pipeline hazards | Structural Hazard, Data Hazard & Control Hazard
Pipeline hazards | Structural Hazard, Data Hazard & Control HazardPipeline hazards | Structural Hazard, Data Hazard & Control Hazard
Pipeline hazards | Structural Hazard, Data Hazard & Control Hazardbabuece
 
Implementation of pipelining in datapath
Implementation of pipelining in datapathImplementation of pipelining in datapath
Implementation of pipelining in datapathbabuece
 
Datapath design with control unit
Datapath design with control unitDatapath design with control unit
Datapath design with control unitbabuece
 
Introduction to datapath design
Introduction to datapath designIntroduction to datapath design
Introduction to datapath designbabuece
 
Floating point Binary Represenataion
Floating point Binary RepresenataionFloating point Binary Represenataion
Floating point Binary Represenataionbabuece
 
Introduction to floating point Arithmetic
Introduction to floating point ArithmeticIntroduction to floating point Arithmetic
Introduction to floating point Arithmeticbabuece
 
Improved version of division
Improved version of divisionImproved version of division
Improved version of divisionbabuece
 
Booth's algorithm part 3
Booth's algorithm part 3Booth's algorithm part 3
Booth's algorithm part 3babuece
 
Booth's algorithm part 1
Booth's algorithm part 1Booth's algorithm part 1
Booth's algorithm part 1babuece
 
Modified booths algorithm part 1
Modified booths algorithm part 1Modified booths algorithm part 1
Modified booths algorithm part 1babuece
 
Booth's algorithm part 2
Booth's algorithm part 2Booth's algorithm part 2
Booth's algorithm part 2babuece
 
Booth's algorithm part 4
Booth's algorithm part 4Booth's algorithm part 4
Booth's algorithm part 4babuece
 

More from babuece (20)

Hardware Multi-Threading
Hardware Multi-ThreadingHardware Multi-Threading
Hardware Multi-Threading
 
Introduction to Advance Computer Architecture
Introduction to Advance Computer ArchitectureIntroduction to Advance Computer Architecture
Introduction to Advance Computer Architecture
 
Clusters and Wharehouse Scale Computers
Clusters and Wharehouse Scale ComputersClusters and Wharehouse Scale Computers
Clusters and Wharehouse Scale Computers
 
Introduction to GPU
Introduction to GPUIntroduction to GPU
Introduction to GPU
 
Shared Memory Multi Processor
Shared Memory Multi ProcessorShared Memory Multi Processor
Shared Memory Multi Processor
 
Instruction Level Parallelism | Static Multiple Issue & Dynamic Multiple Issu...
Instruction Level Parallelism | Static Multiple Issue & Dynamic Multiple Issu...Instruction Level Parallelism | Static Multiple Issue & Dynamic Multiple Issu...
Instruction Level Parallelism | Static Multiple Issue & Dynamic Multiple Issu...
 
Exception | How Exceptions are Handled in MIPS architecture
Exception | How Exceptions are Handled in MIPS architectureException | How Exceptions are Handled in MIPS architecture
Exception | How Exceptions are Handled in MIPS architecture
 
Introduction to Embedded Laboratory EC 8711
Introduction to Embedded Laboratory EC 8711 Introduction to Embedded Laboratory EC 8711
Introduction to Embedded Laboratory EC 8711
 
Pipeline hazards | Structural Hazard, Data Hazard & Control Hazard
Pipeline hazards | Structural Hazard, Data Hazard & Control HazardPipeline hazards | Structural Hazard, Data Hazard & Control Hazard
Pipeline hazards | Structural Hazard, Data Hazard & Control Hazard
 
Implementation of pipelining in datapath
Implementation of pipelining in datapathImplementation of pipelining in datapath
Implementation of pipelining in datapath
 
Datapath design with control unit
Datapath design with control unitDatapath design with control unit
Datapath design with control unit
 
Introduction to datapath design
Introduction to datapath designIntroduction to datapath design
Introduction to datapath design
 
Floating point Binary Represenataion
Floating point Binary RepresenataionFloating point Binary Represenataion
Floating point Binary Represenataion
 
Introduction to floating point Arithmetic
Introduction to floating point ArithmeticIntroduction to floating point Arithmetic
Introduction to floating point Arithmetic
 
Improved version of division
Improved version of divisionImproved version of division
Improved version of division
 
Booth's algorithm part 3
Booth's algorithm part 3Booth's algorithm part 3
Booth's algorithm part 3
 
Booth's algorithm part 1
Booth's algorithm part 1Booth's algorithm part 1
Booth's algorithm part 1
 
Modified booths algorithm part 1
Modified booths algorithm part 1Modified booths algorithm part 1
Modified booths algorithm part 1
 
Booth's algorithm part 2
Booth's algorithm part 2Booth's algorithm part 2
Booth's algorithm part 2
 
Booth's algorithm part 4
Booth's algorithm part 4Booth's algorithm part 4
Booth's algorithm part 4
 

Recently uploaded

Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 

Recently uploaded (20)

Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
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
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 

MIPS Addressing Modes Summary

  • 1. MIPS ADDRESSING MODES Immediate Addressing Mode Register Addressing Mode Base or Displacement Addressing Mode PC-Relative Addressing Mode Pseudo Direct Addressing Mode
  • 2. Immediate Addressing Mode Eg:1. addi $s0, $zero,7 Eg:4. ori $t0,$t1,8 $s0 = 0 + 7 $t0 = $t1 | 8
  • 3. Register Addressing Mode Eg:1. add $s1,$s2,$s3 Eg:2. or $t0,$t1,$t2 Eg:3. srl $s7,$s0,4 $s1 = $s2 + $s3 $t0 = $t1 + $t2 $s7 = $s0 >> 4
  • 4. Base / Displacement Addressing Mode Eg:1. lw $s1, 4($s2) Eg:2. sw $s0, 8($s4) $s1 = Mem [$s2+4] Mem [$s4+8] = $s0
  • 5. PC – Relative Addressing Mode Eg:1. beq $s1, $s2, 25 Eg:2. bne $s0, $s1, 20 if($s1==$s2) goto PC+4+100 if($s0!=$s1) goto PC+4+80
  • 6. Pseudo Direct Addressing Mode Eg:1. j 2500 Eg:2. jr $ra Eg:3. jal 2500 go to 10000 goto $ra $ra=PC+4 goto 10000
  • 7. EXAMPLE Loop: add $t1,$s3,$s3 add $t1,$t1,$t1 add $t1,$t1,$s6 lw $t0,0($t1) bne $t0,$s5,Exit add $s3,$s3,$s4 j loop Exit: 35 9 8 0 0 19 19 9 0 32 5 8 21 2 2 2000 8000 8004 8008 0 9 9 9 0 32 0 9 22 9 0 32 0 19 20 19 0 32 8012 8016 8020 8024 8028 Starting address 8000
  • 8. 0000 0000 0001 0000 0101 0001 0000 0000 0000 0000 0001 0000 0101 0001 0000 000000000000000100000101000100000000 000000 00000100000101000100000000 R - Type 000000 00000100000101000100 000000 sll 000000 00000 10000 01010 00100 000000 sll $t2, op rs rt rd Shift amt fn $s0, 4 0x00105100 00105100 hex

Editor's Notes

  1. Notes to presenter: Description of what you learned in your own words on one side. Include information about the topic Details about the topic will also be helpful here. Tell the story of your learning experience. Just like a story there should always be a beginning, middle and an end. On the other side, you can add a graphic that provides evidence of what you learned. Feel free to use more than one slide to reflect upon your process. It also helps to add some video of your process.
  2. Notes to presenter: Description of what you learned in your own words on one side. Include information about the topic Details about the topic will also be helpful here. Tell the story of your learning experience. Just like a story there should always be a beginning, middle and an end. On the other side, you can add a graphic that provides evidence of what you learned. Feel free to use more than one slide to reflect upon your process. It also helps to add some video of your process.
  3. Notes to presenter: Description of what you learned in your own words on one side. Include information about the topic Details about the topic will also be helpful here. Tell the story of your learning experience. Just like a story there should always be a beginning, middle and an end. On the other side, you can add a graphic that provides evidence of what you learned. Feel free to use more than one slide to reflect upon your process. It also helps to add some video of your process.
  4. Notes to presenter: Description of what you learned in your own words on one side. Include information about the topic Details about the topic will also be helpful here. Tell the story of your learning experience. Just like a story there should always be a beginning, middle and an end. On the other side, you can add a graphic that provides evidence of what you learned. Feel free to use more than one slide to reflect upon your process. It also helps to add some video of your process.
  5. Notes to presenter: Description of what you learned in your own words on one side. Include information about the topic Details about the topic will also be helpful here. Tell the story of your learning experience. Just like a story there should always be a beginning, middle and an end. On the other side, you can add a graphic that provides evidence of what you learned. Feel free to use more than one slide to reflect upon your process. It also helps to add some video of your process.