151k views
3 votes
Provide a minimal set of MIPS instructions that may be used to implement the following pseudoinstruction: not $t1, $t2 // bit-wise invert

User Landsteven
by
8.6k points

1 Answer

5 votes

Answer:

xori t1,t2,-1

Step-by-step explanation:

the not instruction is converted into xor immediate as not t1,t2 would mean that which is equal to xor

t1 t2 nott1 nott2 result

0 1 1 0 0

1 0 0 1 0

1 1 0 0 1

0 0 1 1 0

User Srini V
by
8.2k points