Click here for a general overview of Number System.
1’s complement of a binary number is obtained by subtracting each bit by 1. We can get 1’s complement by simply replacing 1 by 0 and 0 by 1. For example: 1's complement of 101 is 010.
Binary subtraction using 1’s complement:
1. Make the both given numbers having same number of digits.
i.e. If 1111001 and 10101 are given,
make 111100 and 0010101 (same number of digits)
2. Determine the 1’s complement of the number to be subtracted.(Subtrahend)
3. Add the 1’s compliment to the given number from which we subtract (Minuend).
4. If there exists’ any addition bit (carry) in the result after addition, remove and add it to the result else (i.e. if there is NO carry), determine the 1’s compliment of the result and prefix it by a ( - ) minus sign to get final answer.