Binary Numbers – Subtracting Using 2’s Complement

binary

Is it usually to not have a carry in the two's complement method for subtracting two binary numbers when we subtract a large number from small one ?

Best Answer

Carry behaves as if all numbers are unsigned. Just subtract as you were taught in school, i.e. going from right to left with 'borrow':

 4 = 0100
 7 = 0111
     ---- -
     1101 with a borrow remaining

 7 = 0111
 4 = 0100
     ---- -
     0011 with no borrow remaining

Whenever a borrow remains, a binary adder-subtractor will set carry out. It is fairly obvious this will happen if and only if the first operand is less than the second. So far for positive numbers.

So what about negative numbers? As I already pointed out, carry behaves as if all numbers are unsigned. For a negative number, you first need to look up which unsigned number has the same binary representation as the negative number. For example, -3 is represented by 1101 in (4-bit) two's complement. 1101 represents 13 when considered an unsigned number. That means:

  • (-3) - 4 gives no carry, even though the first operand is smallest
  • 4 - (-3) gives carry, even though the first operand is greatest

In binary:

-3 = 1101
 4 = 0100
     ---- -
     1001 with no borrow remaining

 4 = 0100
-3 = 1101
     ---- -
     0111 with a borrow remaining

In general, the unsigned equivalent of a negative number in two's complement is always greater than the unsigned equivalent of a positive number in two's complement. So as far as carry is concerned, a negative number is always greater than a positive number. If you keep that in mind, then the answer to your question should be: yes.