Barney Chambers
Barney Chambers

Reputation: 2783

Expressing Maths Equation in MIPS

What is the most efficient way to represent the following expression in MIPS

$v0 = $a0 * $a1 / $a3;

Upvotes: 0

Views: 658

Answers (1)

Erik
Erik

Reputation: 898

Preserving operator precedence:

mult $t0,$a0,$a1
div $v0,$t0,$a3

Assuming of course that register $t0 is not already in use.

Upvotes: 2

Related Questions