Let's assume we have the following binary numbers with their representation:
| bin | unsigned | signed |
|:---:|----------|----------|
| 110 | 6 | -2 |
| 111 | 7 | -1 |
Now regardless if signed or unsigned, 111 + 110 = 1101
,
Now I can interpret the result 1101
as signed or unsigned which is:
| bin | unsigned | signed |
|:----:|----------|----------|
| 1101 | 13 | -3 |
Which matches the decimal operation:
6+7 = 13
-1-2 = -3
There was no difference between doing a signed addition
or unsigned addition
. So why would CPUs have different circuits/instructions for such operation?