Finding the r's and (r-1)'s complement
Here we are going to learn how to convert a number to its r's and (r-1)'s complement.
Method:
Let 'N' is a number and r is its base where r>1 and in N, 'n' is the number of digits before its decimal point then we can write
r's complement of number = r^n-N
EX.
N = (23)10
here r = 10
n = 2 and N = 23
hence we can write the 10's complement of this number as 10^2 - 23 = 77.
hence we can say that 10's comp of 23 is 77.
Although...