There is an 8-bit numerical value, where a negative number is represented in two’s complement. When this value is represented in decimal, it becomes -100. When this value is regarded as an unsigned number, which of the following is the correct value in decimal?
First, I have to calculate the decimal 100 in binary, and add the signed bit at the start :
1110 0100
Then, to get the non-negative decimal value of the object, I convert the two complement back to its original value :
0001 1100
which gives me the result is 28
But the correct answer is 156
, this is the value I will get if I did not replace the MSB (1) with (0) when converting the two complement back to the original value
1001 1100
What am I missing here?