9010 = 10110102
+ (for example: 5 or -5)
Most people know that there are microcircuits inside a computer, but not in a brain. It is a difficult engineering problem to consider carefully many trade-offs and assemble a microcircuit which will solve our problems. The fewer components engineers use, the simpler it is for them and cheaper for us. Does it really reduce material costs when designing a computer?
Two's complement format allows us to replace subtraction with addition, and as a result we get the same if it were subtraction.
The circle below will help to understand it. Note that the most significant bit of 1 tells us about a negative number, while 0 tells us about a positive number.
Pay attention that -1 + 1 = 0.
If you try to calculate something on paper there will be cases where you get one more leftmost bit. This is called an overflow.
In the case of 2's complement, the computer will crop this bit in order to provide a correct result.
Need the theory?
9010 = 10110102
+ (for example: 5 or -5)