Diminished Radix Complement Arithmetic (1)
Operands are represented using diminished radix complement number system.
The carry, if any, is added to the result (end-around carry).
Example: Add +(1001)2 and -(0100)2 .
One’s complement of +(1001) = 01001
One’s complement of -(0100) = 11011
01001 + 11011 = 100100 (carry)
Add the carry to the result: correct result is 00101.
Example: Add +(1001)2 and -(1111)2 .
One’s complement of +(1001) = 01001
One’s complement of -(1111) = 10000
01001 + 10000 = 11001 (no carry, so this is the correct result).