1/11
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Arithmetic overflow
In a signed number range any result outside of the range [-2^(n-1), 2^(n-1) - 1]
cn-1
Symbol that represents the carry-in input of the most significant bit of the adder.
cn
Symbol that represents carryout output of the most significant bit of the adder
Overflow = cn-1 ⊕ cn
Boolean equation for the overflow
If the two inputs have the same sign but the sum’s sign is different, then the overflow has occurred.
What is the concept of the sign test for overflow?
Sign test (positive case)
If both inputs are positive (sign bits 0) and the sum is negative (sign bit 1), that’s an overflow
Sign test (negative case)
If both inputs are negative (sign bits 1) and the sum is positive (sign bit 0) that’s an overflow
No. Adding a positive and a negative moves the result towards zero staying within the range.
Does adding opposite signs overflow?
unsigned
Carry-out (from MSB) matters for the ________ addition (detects wrap).
signed
Overflow (sign test or cn-1 ⊕ cn) matters for ______ addition (detects out-of-range results)
(xn-1 ⊕ yn-1)’ & (xn-1 ⊕ sn-1)
Compact Boolean form of the sign test