Radix Complement Arithmetic (2)
Case 1: A = B + C
- (A)2 = (B)2 + (C)2
- If A > 2n-1 -1 (overflow), it is detected by the nth bit, which is set to 1.
- Example: (7)10 + (4)10 = ? using 5-bit two’s complement arithmetic.
- + (7)10 = +(0111)2 = (0, 0111)2cns
- + (4)10 = +(0100)2 = (0, 0100)2cns
- (0, 0111)2cns + (0, 0100)2cns = (0, 1011)2cns = +(1011)2 = +(11)10
- No overflow.
- Example: (9)10 + (8)10 = ?
- + (9)10 = +(1001)2 = (0, 1001)2cns
- + (8)10 = +(1000)2 = (0, 1000)2cns
- (0, 1001)2cns + (0, 1000)2cns = (1, 0001)2cns (overflow)