Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is stored in the shift amount field of R type instructions

Tags:

mips

mips32

An R-type instruction has the format: opcode rs rt rd shamt func.

For example, I have an R-type instruction sll $s0,$so,2, what is stored in shamt (shift amount) field of the above format?

like image 636
azhar baloch Avatar asked Oct 19 '25 03:10

azhar baloch


1 Answers

Shamt stands for shift amount which will contain the number by which you want you shift, in this case 2, so the shamt will be 2 in binary: 00010

like image 174
mrhallak Avatar answered Oct 21 '25 18:10

mrhallak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!