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

i. andn $t1, $t2, $t3 #bit-wise AND of $t2,!$t3 ii. xnor $t1, t2, $t3 #bit-wisee

ID: 3608865 • Letter: I

Question

i. andn $t1, $t2, $t3 #bit-wise AND of $t2,!$t3 ii. xnor $t1, t2, $t3 #bit-wiseexclusive-NOR
$t2 = 0x00FFA5A5 $t3 = 0xFFFF003C
The logical instructions above are not included in the MIPSinstruction set, but can be synthesized using one or more MIPSassembly instructions. Provide a minimal set of MIPSinstructions that may be used in place of the instructions above. For your sequence of instructions, show the bit-levelrepresentation of each instruction. What is the result in$t1?
Thanks! ii. xnor $t1, t2, $t3 #bit-wiseexclusive-NOR
$t2 = 0x00FFA5A5 $t3 = 0xFFFF003C
The logical instructions above are not included in the MIPSinstruction set, but can be synthesized using one or more MIPSassembly instructions. Provide a minimal set of MIPSinstructions that may be used in place of the instructions above. For your sequence of instructions, show the bit-levelrepresentation of each instruction. What is the result in$t1?
Thanks!

Explanation / Answer

i.) The hint here is '!$t3'. MIPS has an AND command, so allyou need to do is NOT $t3 first. Since MIPS doesn't have aNOT command, you can NOR $t3 with $zero. nor $t3, $t3, $zero and $t1, $t2, $t3 ii.) This one is similar. An XNOR is equal to NOT(XOR). Although your textbook doesn't highlight this fact, MIPS doesindeed have an XOR command. So carry out an XOR, the invertthe outcome using the same method as part i. xor $t1, $t2, $t3 nor $t1, $t1, $zero I hope that helps.