Daniel B. answered 12/06/22
PhD in Computer Science with 42 years in Computer Research
The signed 8-bit interpretation of 0xca is the number -54 in decimal.
If you do not know why, but you do understand unsigned interpretation, then you can reason this way.
The hex number 0xca is 11001010 in binary.
Its unsigned interpretation is 202.
Since the leading digit is 1, the signed 8-bit interpretation is obtained as
202 - 28, which is -54.
Now to get the 16 bit sign-magnitude representation.
Binary representation of +54 in 16 bits is 0000000000110110.
The problem asks for 16-bit sign-magnitude representation of -54.
While sign-magnitude representation is normal for floating point numbers, it is unsusual for integers.
But given that you are supposed to produce a sign-magnitude representation,
you just need to know that it uses a 1 in leading bit position to indicate negative numbers.
So the binary sign-magnitude representation of -54 is 1000000000110110.
In hex that is 0x8036.
If you were asked for 16-bit signed representation of -54 then you do the following:
-54 + 216 = 65482
16-bit representation of -54 is the same as 65482, which in hex is 0xffca.
Did you notice the relationship to the original 8-bit representation 0xca?
Computers take advantage of this relationship when converting from 8-bit to 16-bit.
Simply fill the high order two bytes with the leading bit of the given 8-bit number,
whether it is 0 or 1.

Daniel B.
12/07/22
Ej N.
if it was ones complement would we do 202 + 2^8?12/07/22