Diminished Radix Complement Number systems (2)
Example: Nine’s complement of (40960)
[N]2-1 = 105 - (40960)10 - 1
= (100000)10 - (40960)10 - (00001)10
= (59040)10 - (00001)10
= (59039)10
Algorithm 1.6 Find [N]r-1 given (N)r .
Replace each digit ai of (N)r by r - 1 - a. Note that when r = 2, this simplifies
to complementing each individual bit of (N)r .
Radix complement and diminished radix complement of a number (N):