Naruto
Naruto

Reputation: 1810

Overflow condition in MIPS for subtraction of Unsigned numbers

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

Answers (1)

Louis Ricci
Louis Ricci

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

Related Questions