go to previous page   go to home page   go to next page hear noise highlighting

Answer:

negu $v2,$s3

Translates into:

sub  $v2,$0,$s3

Multiplication

The mult and the multu instructions (which you have seen before) put the result into MIPS registers hi and lo. The results may be moved out of these registers using mfhi and mflo.

The three operand pseudoinstruction mul d,s,t uses those basic instructions. It is used when the product of registers $s and $t is a value that fits into the 32 bits of lo.

mul d,s,t  # d = s*t         

QUESTION 6:

Finish the translation:

mul $v2,$s3,$t0

Translates into:

mult   , 

mflo    

(Use mnemonic register names.)


go to previous page   go to home page   go to next page