0

I am studying for the MIPS instruction code conversion to binary. I noticed while doing some conversions that instructions are formatted differently depending on the mnemonics(since DIFFERENT OPERATIONS) even they are the same I-type.

sw $t7, 36($s7)          #MIPS instruction
|func|($s7)|($t7)|36|    #Basic Instruction format

beq $t5, $s0, Loop       #MIPS instruction
|func|($t5)|($s0)|Loop|  #Basic Instruction format

I would like to receive tips on how I will be able to convert instruction to binary quickly. If there is no trick on doing this easy, please let me know other formats like above.

Answers will be greatly appreciated.

Michael
  • 57,169
  • 9
  • 80
  • 125
user3754212
  • 31
  • 1
  • 9
  • Its for an exam. I cannot use anything other than the Green Sheet and notes. – user3754212 Jun 27 '14 at 19:53
  • What do you mean they are formatted differently if they are I-Type? All I-Type instructions have a very specific format – Konrad Lindenbach Jun 27 '14 at 20:17
  • Look at the sw and beq example I provided, from MIPS instruction to basic instruction format. The way they are converted into the format is different. $t7 on the first on goes into rt whereas the $t5 on the second one goes into rs. – user3754212 Jun 27 '14 at 20:29
  • I don't know what "the green sheet" is, but I'm assuming that you'll have access to an instruction set reference (having students memorizing the format of every single instruction would just be silly and doesn't belong on an exam). That, and a pen and paper, should be sufficient. – Michael Jun 27 '14 at 20:39

0 Answers0