Radix Complement Arithmetic (1)
Radix complement number systems are used to convert subtraction to addition, which reduces hardware requirements (only adders are needed).
A - B = A + (-B) (add r’s complement of B to A)
Range of numbers in two’s complement number system:
, where n is the number of bits.
2n-1 -1 = (0, 11 ... 1)2cns and -2n-1 = (1, 00 ... 0)2cns
If the result of an operation falls outside the range, an overflow condition is said to occur and the result is not valid.
Consider three cases:
- A = B + C,
- A = B - C,
- A = - B - C,