Given a byte in 2’s complement What is 0x56 in decimal? [closed]

$\begingroup$

a) -13 b) -110 c) 38 d) none of the above

Im not sure on how to do this question. What I have done so far is convert the hexadecimal number into a decimal, but since it's already in 2's complement, how do I know the sign?

$\endgroup$ 3

1 Answer

$\begingroup$

Since the leading bit is $0$ the number is positive. You don't have to worry about the $2$s complement, just convert it to decimal. $5\cdot 16+6=86$

$\endgroup$

You Might Also Like