Radix Complement Arithmetic (6)
Example: A = (25)10 and B = -(46)10
- A = +(25)10 = (0, 0011001)2cns , -A = (1, 1100111)2cns
- B = -(46)10 = -(0, 0101110)2 = (1, 1010010)2cns , -B = (0, 0101110)2cns
- A + B = (0, 0011001)2cns + (1, 1010010)2cns = (1, 1101011)2cns = -(21)10
- A - B = A + (-B) = (0, 0011001)2cns + (0, 0101110)2cns
= (0, 1000111)2cns = +(71)10
- B - A = B + (-A) = (1, 1010010)2cns + (1, 1100111)2cns
= (1, 0111001)2cns + carry = -(0, 1000111)2cns = -(71)10
- -A - B = (-A) + (-B) = (1, 1100111)2cns + (0, 0101110)2cns
= (0, 0010101)2cns + carry = +(21)10
- Note: Carry bit is discarded.