SlideShare a Scribd company logo
MIPS Instruction Types
Type
R
I
J

-31format (bits)
-0opcode (6) rs (5) rt (5) rd (5) shamt (5) funct (6)
opcode (6) rs (5) rt (5)
immediate (16)
opcode (6)
address (26)

I-Type Instructions (All opcodes except
000000, 00001x, and 0100xx)

I-type instructions have a 16-bit immediate field that codes an immediate operand, a branch target offset, or a
displacement for a memory operand. For a branch target
offset, the immediate field contains the signed difference
between the address of the following instruction and the
R-Type Instructions (Opcode 000000)
target label, with the two low order bits dropped. The
Main processor instructions that do not require a target dropped bits are always 0 since instructions are wordaddress, immediate value, or branch displacement use an aligned.
R-type coding format. This format has fields for specify- For the bgez, bgtz, blez, and bltz instructions, the
ing of up to three registers and a shift amount.
rt field is used as an extension of the opcode field.
For instructions that do not use all of these fields, the unrt
used fields are coded with all 0 bits. All R-type instruc- opcode rs
(6)
(5)
(5)
tions use a 000000 opcode. The operation is specified by
Instruction
the function field.
addi rt, rs, immediate
opcode
rs
rt
rd
sa
function
addiu rt, rs, immediate
(6)
(5)
(5)
(5)
(5)
(6)
andi rt, rs, immediate
Instruction
Function
beq
rs, rt, label
add
rd, rs, rt 100000
bgez rs, label
addu
rd, rs, rt 100001
bgtz rs, label
and
rd, rs, rt 100100
blez rs, label
break
001101
bltz rs, label
div
rs, rt
011010
bne
rs, rt, label
divu
rs, rt
011011
lb
rt, immediate(rs)
jalr
rd, rs
001001
lbu
rt, immediate(rs)
jr
rs
001000
lh
rt, immediate(rs)
mfhi
rd
010000
lhu
rt, immediate(rs)
mflo
rd
010010
lui
rt, immediate
mthi
rs
010001
lw
rt, immediate(rs)
mtlo
rs
010011
lwc1 rt, immediate(rs)
mult
rs, rt
011000
ori
rt, rs, immediate
multu rs, rt
011001
sb
rt, immediate(rs)
nor
rd, rs, rt 100111
slti
rt, rs, immediate
or
rd, rs, rt 100101
sltiu rt, rs, immediate
sll
rd, rt, sa 000000
sh
rt, immediate(rs)
sllv
rd, rt, rs 000100
sw
rt, immediate(rs)
slt
rd, rs, rt 101010
swc1 rt, immediate(rs)
sltu
rd, rs, rt 101011
xori rt, rs, immediate
sra
rd, rt, sa 000011
srav
srl
srlv
sub
subu
syscall
xor

rd, rt, rs
rd, rt, sa
rd, rt, rs
rd, rs, rt
rd, rs, rt

000111
000010
000110
100010
100011
001100
rd, rs, rt 100110

immediate
(16)
Opcode Notes
001000
001001
001100
000100
000001 rt = 00001
000111 rt = 00000
000110 rt = 00000
000001 rt = 00000
000101
100000
100100
100001
100101
001111
100011
110001
001101
101000
001010
001011
101001
101011
111001
001110
J-Type Instructions (Opcode 00001x)

OPCODE map

The only J-type instructions are the jump instructions j Table of opcodes for all instructions:
and jal. These intructions require a 26-bit coded address
000 001 010 011 100 101 110 111
field to specify the target of the jump. The coded address
is formed from the bits at positions 27 to 2 in the binary 000 R-type
j
jal
beq bne blez bgtz
representation of the address. The bits at positions 1 and 0
001 addi addiu slti sltiu andi ori xori
are always 0 since instructions are word-aligned.
010
When a J-type instruction is executed, a full 32-bit jump
lhi
trap
target address is formed by concatenating the high order 011 llo
four bits of the PC (the address of the instruction 100 lb
lh
lw
lbu lhu
following the jump), the 26 bits of the target field, and
101 sb
sh
sw
two 0 bits.
110
opcode
target
111
(6)
(26)
Instruction Opcode Target
FUNC map of R-type instructions
j
label 000010 coded address of label
Table of function codes for register-format instructions:
jal label 000011 coded address of label
000 001 010 011 100 101 110 111

Coprocessor Instructions (Opcode 0100xx)

The only instructions that are described here are the floating point instructions that are common to all processors
in the MIPS family. All coprocessor instructions instructions use opcode 0100xx. The last two bits specify the coprocessor number. Thus all floating point instructions use
opcode 010001.

000 sll
001 jr

srl

sra

sllv

srlv

srav

xor

nor

jalr

010 mfhi mthi mflo mtlo
011 mult multu div

divu

100 add

subu and

addu sub

or

slt
sltu
The instruction is broken up into fields of the same sizes 101
as in the R-type instruction format. However, the fields 110
are used in different ways.
111
Most floating point intructions use the format field to specify a numerical coding format: single precision (.s), douSome R-type instructions grouped by their familiarity:
ble precision (.d), or fixed point (.w). The mfc1 and
Function
mtc1 instructions uses the format field as an extension of Instruction
add
rd, rs, rt
100000
the function field.
opcode format
(6)
(5)
Instruction
add.s
fd, fs, ft
cvt.s.w fd, fs, ft
cvt.w.s fd, fs, ft
div.s
fd, fs, ft
mfc1
ft, fs
mov.s fd, fs
mtc1
ft, fs
mul.s fd, fs, ft
sub.s
fd, fs, ft

ft
(5)
Function
000000
100000
100100
000011
000000
000110
000000
000010
000001

fs
(5)
Format
10000
10100
10000
10000
00000
10000
00100
10000
10000

fd
(5)

function
(6)

addu
sub
subu

rd, rs, rt
rd, rs, rt
rd, rs, rt

100001
100010
100011

and
or
xor
nor

rd, rs, rt
rd, rs, rt
rd, rs, rt
rd, rs, rt

100100
100101
100110
100111

slt
sltu

rd, rs, rt
rd, rs, rt

101010
101011

sll
srl
sllv
srlv
sra
srav

rd, rt, sa
rd, rt, sa
rd, rt, rs
rd, rt, rs
rd, rt, sa
rd, rt, rs

000000
000010
000100
000110
000011
000111

More Related Content

What's hot

Parallel Adder
Parallel Adder Parallel Adder
Parallel Adder
Soudip Sinha Roy
 
Floating point presentation
Floating point presentationFloating point presentation
Floating point presentation
SnehalataAgasti
 
29. 8086 microprocessor pin diagram
29. 8086 microprocessor pin diagram29. 8086 microprocessor pin diagram
29. 8086 microprocessor pin diagram
sandip das
 
Logical and shift micro operations
Logical and shift micro operationsLogical and shift micro operations
Logical and shift micro operations
Sanjeev Patel
 
Booths Multiplication Algorithm
Booths Multiplication AlgorithmBooths Multiplication Algorithm
Booths Multiplication Algorithm
knightnick
 
Booth’s algorithm.(a014& a015)
Booth’s algorithm.(a014& a015)Booth’s algorithm.(a014& a015)
Booth’s algorithm.(a014& a015)Piyush Rochwani
 
system software 16 marks
system software 16 markssystem software 16 marks
system software 16 marks
vvcetit
 
Lec 2 digital electronics - random access memory
Lec 2  digital electronics - random access memoryLec 2  digital electronics - random access memory
Lec 2 digital electronics - random access memory
priyankatabhane
 
8085 branching instruction
8085 branching instruction8085 branching instruction
8085 branching instruction
prashant1271
 
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECEDigital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
SeshaVidhyaS
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
missstevenson01
 
adder and subtractor
 adder and subtractor adder and subtractor
adder and subtractor
Unsa Shakir
 
Register transfer language & its micro operations
Register transfer language & its micro operationsRegister transfer language & its micro operations
Register transfer language & its micro operations
Lakshya Sharma
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-pptjemimajerome
 
Unit 4-booth algorithm
Unit 4-booth algorithmUnit 4-booth algorithm
Unit 4-booth algorithm
vishal choudhary
 
Logic microoperations
Logic microoperationsLogic microoperations
Logic microoperationsNitesh Singh
 
CS304PC:Computer Organization and Architecture Session 8 Address Sequencing.pptx
CS304PC:Computer Organization and Architecture Session 8 Address Sequencing.pptxCS304PC:Computer Organization and Architecture Session 8 Address Sequencing.pptx
CS304PC:Computer Organization and Architecture Session 8 Address Sequencing.pptx
Asst.prof M.Gokilavani
 
D Flip Flop
D Flip Flop D Flip Flop
D Flip Flop
Pradhan Rishi Sharma
 

What's hot (20)

Parallel Adder
Parallel Adder Parallel Adder
Parallel Adder
 
Floating point presentation
Floating point presentationFloating point presentation
Floating point presentation
 
29. 8086 microprocessor pin diagram
29. 8086 microprocessor pin diagram29. 8086 microprocessor pin diagram
29. 8086 microprocessor pin diagram
 
Logical and shift micro operations
Logical and shift micro operationsLogical and shift micro operations
Logical and shift micro operations
 
Booths Multiplication Algorithm
Booths Multiplication AlgorithmBooths Multiplication Algorithm
Booths Multiplication Algorithm
 
Hdlc
HdlcHdlc
Hdlc
 
Booth’s algorithm.(a014& a015)
Booth’s algorithm.(a014& a015)Booth’s algorithm.(a014& a015)
Booth’s algorithm.(a014& a015)
 
system software 16 marks
system software 16 markssystem software 16 marks
system software 16 marks
 
Lec 2 digital electronics - random access memory
Lec 2  digital electronics - random access memoryLec 2  digital electronics - random access memory
Lec 2 digital electronics - random access memory
 
8085 branching instruction
8085 branching instruction8085 branching instruction
8085 branching instruction
 
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECEDigital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
 
Booth Multiplier
Booth MultiplierBooth Multiplier
Booth Multiplier
 
adder and subtractor
 adder and subtractor adder and subtractor
adder and subtractor
 
Register transfer language & its micro operations
Register transfer language & its micro operationsRegister transfer language & its micro operations
Register transfer language & its micro operations
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-ppt
 
Unit 4-booth algorithm
Unit 4-booth algorithmUnit 4-booth algorithm
Unit 4-booth algorithm
 
Logic microoperations
Logic microoperationsLogic microoperations
Logic microoperations
 
CS304PC:Computer Organization and Architecture Session 8 Address Sequencing.pptx
CS304PC:Computer Organization and Architecture Session 8 Address Sequencing.pptxCS304PC:Computer Organization and Architecture Session 8 Address Sequencing.pptx
CS304PC:Computer Organization and Architecture Session 8 Address Sequencing.pptx
 
D Flip Flop
D Flip Flop D Flip Flop
D Flip Flop
 

Viewers also liked

03 mips assembly language
03 mips assembly language03 mips assembly language
03 mips assembly language
Muberra Duman
 
Chapter 02 instructions language of the computer
Chapter 02   instructions language of the computerChapter 02   instructions language of the computer
Chapter 02 instructions language of the computerBảo Hoang
 
8085 microproceesor ppt
8085 microproceesor ppt8085 microproceesor ppt
8085 microproceesor ppt
RJ Aniket
 
MARS MIPS (Assembly language)
MARS MIPS (Assembly language)MARS MIPS (Assembly language)
MARS MIPS (Assembly language)Bat Suuri
 
Interrupt
InterruptInterrupt
Interrupt
Siddique Ibrahim
 
COMPUTER ORGANIZATION -Multiplexer,Demultiplexer, Encoder
COMPUTER ORGANIZATION -Multiplexer,Demultiplexer, EncoderCOMPUTER ORGANIZATION -Multiplexer,Demultiplexer, Encoder
COMPUTER ORGANIZATION -Multiplexer,Demultiplexer, EncoderVanitha Chandru
 
8085 MICROPROCESSOR
8085 MICROPROCESSOR 8085 MICROPROCESSOR
8085 MICROPROCESSOR
THANDAIAH PRABU
 
Asynchronous and synchronous
Asynchronous and synchronousAsynchronous and synchronous
Asynchronous and synchronous
Akhil .B
 
Synchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transferSynchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transferAnuj Modi
 

Viewers also liked (12)

03 mips assembly language
03 mips assembly language03 mips assembly language
03 mips assembly language
 
Chapter 02 instructions language of the computer
Chapter 02   instructions language of the computerChapter 02   instructions language of the computer
Chapter 02 instructions language of the computer
 
Mips1
Mips1Mips1
Mips1
 
MIPS Merge Sort
MIPS Merge SortMIPS Merge Sort
MIPS Merge Sort
 
8085 microproceesor ppt
8085 microproceesor ppt8085 microproceesor ppt
8085 microproceesor ppt
 
MARS MIPS (Assembly language)
MARS MIPS (Assembly language)MARS MIPS (Assembly language)
MARS MIPS (Assembly language)
 
Synchronous and asynchronous (1)
Synchronous and asynchronous (1)Synchronous and asynchronous (1)
Synchronous and asynchronous (1)
 
Interrupt
InterruptInterrupt
Interrupt
 
COMPUTER ORGANIZATION -Multiplexer,Demultiplexer, Encoder
COMPUTER ORGANIZATION -Multiplexer,Demultiplexer, EncoderCOMPUTER ORGANIZATION -Multiplexer,Demultiplexer, Encoder
COMPUTER ORGANIZATION -Multiplexer,Demultiplexer, Encoder
 
8085 MICROPROCESSOR
8085 MICROPROCESSOR 8085 MICROPROCESSOR
8085 MICROPROCESSOR
 
Asynchronous and synchronous
Asynchronous and synchronousAsynchronous and synchronous
Asynchronous and synchronous
 
Synchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transferSynchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transfer
 

Similar to Mips opcodes

ARM AAE - Intrustion Sets
ARM AAE - Intrustion SetsARM AAE - Intrustion Sets
ARM AAE - Intrustion Sets
Anh Dung NGUYEN
 
Arm teaching material
Arm teaching materialArm teaching material
Arm teaching materialJohn Williams
 
ARM Architecture Instruction Set
ARM Architecture Instruction SetARM Architecture Instruction Set
ARM Architecture Instruction Set
Dwight Sabio
 
arm-intro.ppt
arm-intro.pptarm-intro.ppt
arm-intro.ppt
MostafaParvin1
 
Instruction set summary
Instruction set summary Instruction set summary
Instruction set summary janicetiong
 
Lec20 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Da...
Lec20 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Da...Lec20 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Da...
Lec20 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Da...
Hsien-Hsin Sean Lee, Ph.D.
 
ARM Introduction
ARM IntroductionARM Introduction
ARM Introduction
Ramasubbu .P
 
Arm Cortex material Arm Cortex material3222886.ppt
Arm Cortex material Arm Cortex material3222886.pptArm Cortex material Arm Cortex material3222886.ppt
Arm Cortex material Arm Cortex material3222886.ppt
Manju Badiger
 
Assembly code
Assembly codeAssembly code
Assembly code
SharmilaChidaravalli
 
14941634.ppt
14941634.ppt14941634.ppt
14941634.ppt
MonirJihad1
 
ESD_05_ARM_Instructions set for preparation
ESD_05_ARM_Instructions set for preparationESD_05_ARM_Instructions set for preparation
ESD_05_ARM_Instructions set for preparation
ssuser026e94
 
07-arm_overview.ppt
07-arm_overview.ppt07-arm_overview.ppt
07-arm_overview.ppt
meenakshi_l
 
Instruction formats-in-8086
Instruction formats-in-8086Instruction formats-in-8086
Instruction formats-in-8086
MNM Jain Engineering College
 
07-arm_overview.ppt
07-arm_overview.ppt07-arm_overview.ppt
07-arm_overview.ppt
AswathRangaraj1
 
ARMInst.ppt
ARMInst.pptARMInst.ppt
ARMInst.ppt
MostafaParvin1
 
ARMInst.ppt
ARMInst.pptARMInst.ppt
ARMInst.ppt
baskarA13
 
ARMbuilt-inshift_2a6f2cdd75038e8c46c6d481aac833ec.pdf
ARMbuilt-inshift_2a6f2cdd75038e8c46c6d481aac833ec.pdfARMbuilt-inshift_2a6f2cdd75038e8c46c6d481aac833ec.pdf
ARMbuilt-inshift_2a6f2cdd75038e8c46c6d481aac833ec.pdf
eklavya0304
 
Lathe Spindle Sensor
Lathe Spindle SensorLathe Spindle Sensor
Lathe Spindle Sensor
JoeCritt
 
Attachment_ VHDL datasheet
Attachment_ VHDL datasheetAttachment_ VHDL datasheet
Attachment_ VHDL datasheet
jethro kimande
 

Similar to Mips opcodes (20)

ARM AAE - Intrustion Sets
ARM AAE - Intrustion SetsARM AAE - Intrustion Sets
ARM AAE - Intrustion Sets
 
Arm teaching material
Arm teaching materialArm teaching material
Arm teaching material
 
Arm teaching material
Arm teaching materialArm teaching material
Arm teaching material
 
ARM Architecture Instruction Set
ARM Architecture Instruction SetARM Architecture Instruction Set
ARM Architecture Instruction Set
 
arm-intro.ppt
arm-intro.pptarm-intro.ppt
arm-intro.ppt
 
Instruction set summary
Instruction set summary Instruction set summary
Instruction set summary
 
Lec20 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Da...
Lec20 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Da...Lec20 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Da...
Lec20 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Da...
 
ARM Introduction
ARM IntroductionARM Introduction
ARM Introduction
 
Arm Cortex material Arm Cortex material3222886.ppt
Arm Cortex material Arm Cortex material3222886.pptArm Cortex material Arm Cortex material3222886.ppt
Arm Cortex material Arm Cortex material3222886.ppt
 
Assembly code
Assembly codeAssembly code
Assembly code
 
14941634.ppt
14941634.ppt14941634.ppt
14941634.ppt
 
ESD_05_ARM_Instructions set for preparation
ESD_05_ARM_Instructions set for preparationESD_05_ARM_Instructions set for preparation
ESD_05_ARM_Instructions set for preparation
 
07-arm_overview.ppt
07-arm_overview.ppt07-arm_overview.ppt
07-arm_overview.ppt
 
Instruction formats-in-8086
Instruction formats-in-8086Instruction formats-in-8086
Instruction formats-in-8086
 
07-arm_overview.ppt
07-arm_overview.ppt07-arm_overview.ppt
07-arm_overview.ppt
 
ARMInst.ppt
ARMInst.pptARMInst.ppt
ARMInst.ppt
 
ARMInst.ppt
ARMInst.pptARMInst.ppt
ARMInst.ppt
 
ARMbuilt-inshift_2a6f2cdd75038e8c46c6d481aac833ec.pdf
ARMbuilt-inshift_2a6f2cdd75038e8c46c6d481aac833ec.pdfARMbuilt-inshift_2a6f2cdd75038e8c46c6d481aac833ec.pdf
ARMbuilt-inshift_2a6f2cdd75038e8c46c6d481aac833ec.pdf
 
Lathe Spindle Sensor
Lathe Spindle SensorLathe Spindle Sensor
Lathe Spindle Sensor
 
Attachment_ VHDL datasheet
Attachment_ VHDL datasheetAttachment_ VHDL datasheet
Attachment_ VHDL datasheet
 

Recently uploaded

How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
goswamiyash170123
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 

Recently uploaded (20)

How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 

Mips opcodes

  • 1. MIPS Instruction Types Type R I J -31format (bits) -0opcode (6) rs (5) rt (5) rd (5) shamt (5) funct (6) opcode (6) rs (5) rt (5) immediate (16) opcode (6) address (26) I-Type Instructions (All opcodes except 000000, 00001x, and 0100xx) I-type instructions have a 16-bit immediate field that codes an immediate operand, a branch target offset, or a displacement for a memory operand. For a branch target offset, the immediate field contains the signed difference between the address of the following instruction and the R-Type Instructions (Opcode 000000) target label, with the two low order bits dropped. The Main processor instructions that do not require a target dropped bits are always 0 since instructions are wordaddress, immediate value, or branch displacement use an aligned. R-type coding format. This format has fields for specify- For the bgez, bgtz, blez, and bltz instructions, the ing of up to three registers and a shift amount. rt field is used as an extension of the opcode field. For instructions that do not use all of these fields, the unrt used fields are coded with all 0 bits. All R-type instruc- opcode rs (6) (5) (5) tions use a 000000 opcode. The operation is specified by Instruction the function field. addi rt, rs, immediate opcode rs rt rd sa function addiu rt, rs, immediate (6) (5) (5) (5) (5) (6) andi rt, rs, immediate Instruction Function beq rs, rt, label add rd, rs, rt 100000 bgez rs, label addu rd, rs, rt 100001 bgtz rs, label and rd, rs, rt 100100 blez rs, label break 001101 bltz rs, label div rs, rt 011010 bne rs, rt, label divu rs, rt 011011 lb rt, immediate(rs) jalr rd, rs 001001 lbu rt, immediate(rs) jr rs 001000 lh rt, immediate(rs) mfhi rd 010000 lhu rt, immediate(rs) mflo rd 010010 lui rt, immediate mthi rs 010001 lw rt, immediate(rs) mtlo rs 010011 lwc1 rt, immediate(rs) mult rs, rt 011000 ori rt, rs, immediate multu rs, rt 011001 sb rt, immediate(rs) nor rd, rs, rt 100111 slti rt, rs, immediate or rd, rs, rt 100101 sltiu rt, rs, immediate sll rd, rt, sa 000000 sh rt, immediate(rs) sllv rd, rt, rs 000100 sw rt, immediate(rs) slt rd, rs, rt 101010 swc1 rt, immediate(rs) sltu rd, rs, rt 101011 xori rt, rs, immediate sra rd, rt, sa 000011 srav srl srlv sub subu syscall xor rd, rt, rs rd, rt, sa rd, rt, rs rd, rs, rt rd, rs, rt 000111 000010 000110 100010 100011 001100 rd, rs, rt 100110 immediate (16) Opcode Notes 001000 001001 001100 000100 000001 rt = 00001 000111 rt = 00000 000110 rt = 00000 000001 rt = 00000 000101 100000 100100 100001 100101 001111 100011 110001 001101 101000 001010 001011 101001 101011 111001 001110
  • 2. J-Type Instructions (Opcode 00001x) OPCODE map The only J-type instructions are the jump instructions j Table of opcodes for all instructions: and jal. These intructions require a 26-bit coded address 000 001 010 011 100 101 110 111 field to specify the target of the jump. The coded address is formed from the bits at positions 27 to 2 in the binary 000 R-type j jal beq bne blez bgtz representation of the address. The bits at positions 1 and 0 001 addi addiu slti sltiu andi ori xori are always 0 since instructions are word-aligned. 010 When a J-type instruction is executed, a full 32-bit jump lhi trap target address is formed by concatenating the high order 011 llo four bits of the PC (the address of the instruction 100 lb lh lw lbu lhu following the jump), the 26 bits of the target field, and 101 sb sh sw two 0 bits. 110 opcode target 111 (6) (26) Instruction Opcode Target FUNC map of R-type instructions j label 000010 coded address of label Table of function codes for register-format instructions: jal label 000011 coded address of label 000 001 010 011 100 101 110 111 Coprocessor Instructions (Opcode 0100xx) The only instructions that are described here are the floating point instructions that are common to all processors in the MIPS family. All coprocessor instructions instructions use opcode 0100xx. The last two bits specify the coprocessor number. Thus all floating point instructions use opcode 010001. 000 sll 001 jr srl sra sllv srlv srav xor nor jalr 010 mfhi mthi mflo mtlo 011 mult multu div divu 100 add subu and addu sub or slt sltu The instruction is broken up into fields of the same sizes 101 as in the R-type instruction format. However, the fields 110 are used in different ways. 111 Most floating point intructions use the format field to specify a numerical coding format: single precision (.s), douSome R-type instructions grouped by their familiarity: ble precision (.d), or fixed point (.w). The mfc1 and Function mtc1 instructions uses the format field as an extension of Instruction add rd, rs, rt 100000 the function field. opcode format (6) (5) Instruction add.s fd, fs, ft cvt.s.w fd, fs, ft cvt.w.s fd, fs, ft div.s fd, fs, ft mfc1 ft, fs mov.s fd, fs mtc1 ft, fs mul.s fd, fs, ft sub.s fd, fs, ft ft (5) Function 000000 100000 100100 000011 000000 000110 000000 000010 000001 fs (5) Format 10000 10100 10000 10000 00000 10000 00100 10000 10000 fd (5) function (6) addu sub subu rd, rs, rt rd, rs, rt rd, rs, rt 100001 100010 100011 and or xor nor rd, rs, rt rd, rs, rt rd, rs, rt rd, rs, rt 100100 100101 100110 100111 slt sltu rd, rs, rt rd, rs, rt 101010 101011 sll srl sllv srlv sra srav rd, rt, sa rd, rt, sa rd, rt, rs rd, rt, rs rd, rt, sa rd, rt, rs 000000 000010 000100 000110 000011 000111