azhar baloch
azhar baloch

Reputation: 548

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

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?

Upvotes: 4

Views: 8823

Answers (1)

mrhallak
mrhallak

Reputation: 1178

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

Upvotes: 5

Related Questions