101 -> 010 + 1 = 011
11010 -> 00101 + 1 = 00110
0 - 0 = 0
1 - 0 = 1
1 - 1 = 0
0 - 1 = 1 with a borrow of 1
111
- 10
-----
=101
1001
- 101
-----
=0100
111
- 10
-----
111
+110 (2's complement of 010 -> 101 + 1 = 110)
-----
1101
dropping carry-over
=101
If there is a carry-over it is dropped.
Without carry-over the 2's complement is built from the resulting value. This resultis negative then.
10110
–11010
-----
10110
–00110 (2's complement of 11010 -> 00101 + 1 = 00110)
-----
11100
no carry-over, build 2's complement (is negative result value)
11100 -> 00011 + 1 = 00100
= -100
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0 with a carry-over of 1
10
+ 11
-----
=101