In base 2, I want to subtract x-y using adder. Where, x = (1011)2 and y = (0101)2
[For verification, in decimal x=(11)10, y = (5)10. So, we are seeking (6)10 as the answer ]
In base 2 using adder we are looking for (1011)2-(0101)2 = (?)2
Or, actually we are looking for (1011)2+[-(0101)]2 = (?)2
Procedure: Step 1: Find 1's complement of y = (0101)2
(1111)2-(0101)2 = (1010)2
Step 2: I'll add 1 to get 2's complement
(1010)2 + (1)2 = (1011)2 --- result 1
Step 3: Now, I'll add x = (1011)2 to result 1 which is 2's complement of y = (0101)2
(1011)2 + (0101)2 = (10110)2 --- result 2
Here, in (10110)2 we get End Around Carry which happens to be 1 at most significant bit in (10110)2.
We remove End Around Carry from the result 2 and get the answer (0110)2 = (6)10
So, finally, my questions here is to know following:
- Even though, we want to carry subtraction using addition, we still have to carry subtraction to find 1's complement [as show in step 1]. So, we still require subtractor to carry 1' complement. If that is the case, then why we take pain to carry unnecessary procedure of subtracting numbers using adder (addition)?
- Or, please let me know, how actually, subtraction is carried using adder in absence of subtractor?