Radix Complement Number Systems (2)
Algorithm 1.4 Find [N]r given (N)r .
- Copy the digits of N, beginning with the LSD and proceeding toward the MSD until the first nonzero digit, ai, has been reached
- Replace ai with r - ai .
- Replace each remaining digit aj , of N by (r - 1) - aj until the MSD has been replaced.
Example: 10's complement of (56700)10 is (43300)10
Example: 2's complement of (10100)2 is (01100)2.
Example: 2’s complement of N = (10110)2 for n = 8.
- Put three zeros in the MSB position and apply algorithm 1.4
- N = 00010110
- [N]2 = (11101010)2
The same rule applies to the case when N contains a radix point.