2's complement representations of decimal and hexadecimal values

1000 Views Asked by At

Given the following signed integer values, write their corresponding 16-bit 2's complement representations and decimal/hexadecimal values.

So I'm given the hexadecimal number E0B7, converting that to binary gives me 1110 0000 1011 0111. Not sure if this question wants me to find the 2's complement of this number (I know that I have to invert digits and add 1 to get that) or just give this binary number. It's mostly "signed integer values" and "2's complement representations" throwing me off. Converting E0B7 to decimal is just gives me 57527 so that's easy.

Question 2 gives me the decimal number 146, which converts to 92 in hexadecimal. Same deal though, not sure how to convert to 2's complement.

Then there's also the same question but 32-bit. The numbers for that question are F0D1 and -2450.

Edit: I think my main confusion is this. When I'm given a signed integer value in hex/dec, and I convert to binary, do I interpret this in 2's complement or not? So for my example, E0B7 to 1110 0000 1011 0111, is this a negative number or am I supposed to find the 2's complement, which then starts with 0, so it's a positive number?