My professor asked this question to us:
What is the (base 10) signed integer value of 11101101 ?
Does the answer to a question like this come down to the interpretation of the question, or is there a set in stone answer?
To me it seems to come down to interpretation, and that's why I'm asking this question to see if I am right or wrong in those regards.
Here's my thought on it:
The answer is positive 237 (if 2's complement was performed prior, and 11101101 is the signed representation)
OR
The answer is negative 19 (if assuming that 11101101 is unsigned, and we need to perform 2's complement to get 00010011)
So am I right to state that a question like this can come down to the interpretation of it? Or should the person answering this question just assume that 2's complement has already been performed? (And thus give the answer of positive 237)
Consider 4 bits;
0 0000 0
1 0001 1
2 0010 2
3 0011 3
4 0100 4
5 0101 5
6 0110 6
7 0111 7
8 1000 -8
9 1001 -7
A 1010 -6
B 1011 -5
C 1100 -4
D 1101 -3
E 1110 -2
F 1111 -1
If the number is unsigned humans understand the bit pattern as the left column.
If the number is signed humans understand the bit pattern as the right column.
take decimal 10 - A 1010 -6
for example;
if signed 3 - 6 = -3
will look like this:
(3) 0011 +
(-6) 1010
---- ----
(-3) 1101
if the number is unsigned the exact same operation looks like this 3 + 10 = 13
:
(3) 0011 +
(A) 1010
---- ----
(D) 1101
Notice the bit patterns stay the same, the only thing i'm changing is the human readable representation depending if the number is signed or unsigned, even the operation is the same internally (i.e addition).