How To Find Complements of Number Systems


To Find r's complement:
Use this formula to find complement of any Number system: ( r^n- N )
Where n = No. of Integer
For Example: 
The 10's complement of  (23450)10 is 10^n – 23450 = 76550
Here n = no. of digits in the no. 23450 = 5
The 10's complement of (0.3245)10 is (10^0 – 0.3245) = 0.6755
Here no. of digits in the integer part of the no. 0.3245 is n = 0.
The 2's complement of (10110)2 is (2^5)10 – (10110)2 = 01010
Here n = no. of digits in the no. 10110 = 5

To Find (r - 1)'s Complement:
Use this formula to find complement of any Number system: (r^nr^-m – N)
Where n = no of integer 
m = no of fraction
Example:
9's complement of (23450)10 is (10^5 – 10^0 – 23450) = 76549
1's complement of (0.1011)2 is (2^0 – 2^-4)10 – (0.1011)2 = 0.0100

Note: 2's complement of (2's complement of x) = x

0 comments:

Post a Comment