Reputation: 1810
When does overflow occurs in MIPS for subtraction of Unsigned numbers?
I couldn't find the answer on Google. I have design algo for overflow of addition of unsigned numbers but couldn't figure out about unsigned subtraction..
Can anybody tell me?
Regards
Upvotes: 0
Views: 1289
Reputation: 21086
When the subtrahend is greater than the minuend you'll get an overflow.
a - b, if b > a then set overflow
Upvotes: 1