2’s compliment of any binary number is obtained by adding binary ‘1’ to the 1’s compliment of the number.
Binary subtraction using 2’s complement:
1. Make both the 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 2’s compliment of the number to be subtracted(Subtrahend).
3. Add the 2’s compliment to the given number from which we subtract. (Minuend)
4. If there exists any additional bit (carry) in the result after addition, neglect the carry and the remaining bits will be required answer else (i.e. if there is NO carry), determine the 2’s compliment of the result and prefix it by a ( - ) minus sign to get final answer.