SlideShare a Scribd company logo
ADDRESSING MODES
Mr. C.KARTHIKEYAN,
ASSISTANT PROFESSOR,
ECE , RMKCET
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 0000
00000000000100000101000100000000
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

More from KarthikeyanC53

1. Introduction to Datapath Design.pptx
1. Introduction to Datapath Design.pptx1. Introduction to Datapath Design.pptx
1. Introduction to Datapath Design.pptx
KarthikeyanC53
 
Floating Point Multiplication.pptx
Floating Point Multiplication.pptxFloating Point Multiplication.pptx
Floating Point Multiplication.pptx
KarthikeyanC53
 
Floating Point Addition.pptx
Floating Point Addition.pptxFloating Point Addition.pptx
Floating Point Addition.pptx
KarthikeyanC53
 
Floating Point Represenataion.pptx
Floating Point Represenataion.pptxFloating Point Represenataion.pptx
Floating Point Represenataion.pptx
KarthikeyanC53
 
Refined Version of Division.pptx
Refined Version of Division.pptxRefined Version of Division.pptx
Refined Version of Division.pptx
KarthikeyanC53
 
Version 1 Division.pptx
Version 1 Division.pptxVersion 1 Division.pptx
Version 1 Division.pptx
KarthikeyanC53
 
BOOTH’s ALGORITHM Part 1.pptx
BOOTH’s ALGORITHM Part 1.pptxBOOTH’s ALGORITHM Part 1.pptx
BOOTH’s ALGORITHM Part 1.pptx
KarthikeyanC53
 
2. Addition and Subtraction.pptx
2. Addition and Subtraction.pptx2. Addition and Subtraction.pptx
2. Addition and Subtraction.pptx
KarthikeyanC53
 
1. Introduction to Arithmetic.pptx
1. Introduction to Arithmetic.pptx1. Introduction to Arithmetic.pptx
1. Introduction to Arithmetic.pptx
KarthikeyanC53
 
6.Performance.pptx
6.Performance.pptx6.Performance.pptx
6.Performance.pptx
KarthikeyanC53
 
4.Instruction Formats.pptx
4.Instruction Formats.pptx4.Instruction Formats.pptx
4.Instruction Formats.pptx
KarthikeyanC53
 
3. Instruction Set.pptx
3. Instruction Set.pptx3. Instruction Set.pptx
3. Instruction Set.pptx
KarthikeyanC53
 
2. Eight Great Ideas.pptx
2. Eight Great Ideas.pptx2. Eight Great Ideas.pptx
2. Eight Great Ideas.pptx
KarthikeyanC53
 
1. Introduction to CAO.pptx
1. Introduction to CAO.pptx1. Introduction to CAO.pptx
1. Introduction to CAO.pptx
KarthikeyanC53
 

More from KarthikeyanC53 (14)

1. Introduction to Datapath Design.pptx
1. Introduction to Datapath Design.pptx1. Introduction to Datapath Design.pptx
1. Introduction to Datapath Design.pptx
 
Floating Point Multiplication.pptx
Floating Point Multiplication.pptxFloating Point Multiplication.pptx
Floating Point Multiplication.pptx
 
Floating Point Addition.pptx
Floating Point Addition.pptxFloating Point Addition.pptx
Floating Point Addition.pptx
 
Floating Point Represenataion.pptx
Floating Point Represenataion.pptxFloating Point Represenataion.pptx
Floating Point Represenataion.pptx
 
Refined Version of Division.pptx
Refined Version of Division.pptxRefined Version of Division.pptx
Refined Version of Division.pptx
 
Version 1 Division.pptx
Version 1 Division.pptxVersion 1 Division.pptx
Version 1 Division.pptx
 
BOOTH’s ALGORITHM Part 1.pptx
BOOTH’s ALGORITHM Part 1.pptxBOOTH’s ALGORITHM Part 1.pptx
BOOTH’s ALGORITHM Part 1.pptx
 
2. Addition and Subtraction.pptx
2. Addition and Subtraction.pptx2. Addition and Subtraction.pptx
2. Addition and Subtraction.pptx
 
1. Introduction to Arithmetic.pptx
1. Introduction to Arithmetic.pptx1. Introduction to Arithmetic.pptx
1. Introduction to Arithmetic.pptx
 
6.Performance.pptx
6.Performance.pptx6.Performance.pptx
6.Performance.pptx
 
4.Instruction Formats.pptx
4.Instruction Formats.pptx4.Instruction Formats.pptx
4.Instruction Formats.pptx
 
3. Instruction Set.pptx
3. Instruction Set.pptx3. Instruction Set.pptx
3. Instruction Set.pptx
 
2. Eight Great Ideas.pptx
2. Eight Great Ideas.pptx2. Eight Great Ideas.pptx
2. Eight Great Ideas.pptx
 
1. Introduction to CAO.pptx
1. Introduction to CAO.pptx1. Introduction to CAO.pptx
1. Introduction to CAO.pptx
 

Recently uploaded

Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
mamunhossenbd75
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
NazakatAliKhoso2
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
Aditya Rajan Patra
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
171ticu
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEMTIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
HODECEDSIET
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
insn4465
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 

Recently uploaded (20)

Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEMTIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
哪里办理(csu毕业证书)查尔斯特大学毕业证硕士学历原版一模一样
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 

5. Addressing Modes.pptx

  • 2. MIPS ADDRESSING MODES Immediate Addressing Mode Register Addressing Mode Base or Displacement Addressing Mode PC-Relative Addressing Mode Pseudo Direct Addressing Mode
  • 3. Immediate Addressing Mode Eg:1. addi $s0, $zero,7 Eg:4. ori $t0,$t1,8 $s0 = 0 + 7 $t0 = $t1 | 8
  • 4. 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
  • 5. Base / Displacement Addressing Mode Eg:1. lw $s1, 4($s2) Eg:2. sw $s0, 8($s4) $s1 = Mem [$s2+4] Mem [$s4+8] = $s0
  • 6. 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
  • 7. 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
  • 8. 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
  • 9. 0000 0000 0001 0000 0101 0001 0000 0000 0000 0000 0001 0000 0101 0001 0000 0000 00000000000100000101000100000000 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.