Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have to explain how to convert 2 mips psuedo instructions to realmips instruct

ID: 3609551 • Letter: I

Question

I have to explain how to convert 2 mips psuedo instructions to realmips instructions in front of my class. Conveniently, I didn't knowhow to do this on the homework, and now I have to explain it forthe midterm review . Any help explaining how to do this would bemuch appreciated. Thanks in advance. a. andn $t1, $t2, $t3 // bit - wise AND of $t2,!$t3 b. xnor $t1, $t2, $t3 //bit - wiseexclusive NOR Instructions a and b above are not included in MIPS, but can besynthesized using one or more MIPS assembly instructions. Provide aminimal set of MIPS instructioons that may be used in place of aand b. Then, show the bit - level representation of each instruction.

Explanation / Answer

please rate - thanks I hope this will help you a.           andn $t1, $t2, $t3 // bit-wise AND of $t2,!$t3 here you are given that you need $t2 as is, but you have to reversethe bits in $t3 to make it $t3. to reverse the bits in $t3 you must exclusive or the entireregister with 1's   that way the 1's will become 0 andthe 0 will become 1's. you can then and the two registers. (The number -1 is all 1's in binary)     assuming $t2 and $t3 cannot be changed, but $t0 is empty lui $t0,-1       load upper 16 bitswith1                  001111 00000 01000 1111111111111111 ori $t0,$t0,-1      load lower 16 bitswith1            001101 00000 00000 1111111111111111    not $t3 is now in $t0                               and $t1,$t2,$t0    now you can do thenot              000000 01010 01000 01001 00000 100101 b.           xnor $t1, $t2, $t3       //bit-wiseexclusive NOR in this case you want to do an exclusive or and then negate it. Tonegate again you would do an exclusive or as above. again assuming $t0 is unused              xor $t1,$t2,$t3     t1=t2 xor t3          000000 01010 01011 01001 00000 100110     lui$t0,-1       load upper 16 bits with1                001111 00000 01000 1111111111111111             ori $t0,$t0,-1      load lower 16 bitswith1            001101 00000 00000 1111111111111111     xor $t1,$t1,$t0      negate result         000000 01001 01000 01001 00000100110