I\'m in a computer systems course and have been struggling, in part, with Two\'s Complement. I want to understand it but everything I\'ve read hasn\'t brought the p
Lets get the answer 10 – 12 in binary form using 8 bits: What we will really do is 10 + (-12)
We need to get the compliment part of 12 to subtract it from 10. 12 in binary is 00001100. 10 in binary is 00001010.
To get the compliment part of 12 we just reverse all the bits then add 1. 12 in binary reversed is 11110011. This is also the Inverse code (one's complement). Now we need to add one, which is now 11110100.
So 11110100 is the compliment of 12! Easy when you think of it this way.
Now you can solve the above question of 10 - 12 in binary form.
00001010
11110100
-----------------
11111110