I have read through a couple of posts here on overflow exception for MIPS signed and unsigned addition, but it is still not clear to me.
1) What is meant by an overflow exception and when does it occur? 2) When is the overflow ignored for an unsigned addition?
Suppose I have two numbers, lets start with 4 bit signed and then go to 4 bit unsigned
Signed negative addition
1010 -6
+ 1101 -3
------
1 0111 +7 with a carry(overflow) of 1, but result should have been -9.
Signed positive addition
0110 +6
+ 0011 +3
--------
1001 -7 with no carry(probably an overflow of 1), but actual result should have been +9.
Next is an unsigned addition
1111 +15
+ 1010 +10
---------
1 1001 +9 with an overflow/carry of 1, but actual result is +25.
Please let me know in which case, do we ignore overflow exception and in which case do we raise overflow exception and why. I read that for unsigned, we always ignore the overflow, but then if the result is incorrect(9 instead of 25), why do we ignore the overflow?