Compute the value 110111001011102-111110000011012 using 10's complement
11 0111 0010 11102 in compliment to 2 code is 0011 0111 0010 1110
To get the compliment code of -11 1110 0000 11012 we first inverse all bits to get reverse code:
1100 0001 1111 0010 and then we add one to it. As a result, we get 1100 0001 1111 0011.
After that we perform ordinary bitwise addition (the dots indicate the carry to the most significant bit):
.... .... ..
0011 0111 0010 1110
+1100 0001 1111 0010
-------------------
1111 1001 0010 0000
Comments
Leave a comment