Convert hexadecimal number to bit?
Hi guys, I've been given this assignment and I'm just not sure what to do next. How do I convert it?
The hexadecimal number 0xA1 has the decimal value as
a) 8-bit unsigned:
b) 8-bit signed (2's complement):
c) 16-bit signed (2's complement):
d) 32-bit signed (2's complement):
A1 = 1010 0001
Hi, it's really nice of you to give me the answer. However, it's more important for me to understand the concept of conversion. How did you do it? A1 = 1010 0001, I understand that.
In a) I added it anyway.
And for b) to d): Forming a two's complement means inverting all bits and then adding 1. The result can then be converted to the decimal system as usual (ie, adding all place values containing a 1).
Oh right, I missed that. Thanks so much!
Yes, that's right.
And since the problem says "decimal," you have to convert it.
I think I understand now. I used a different number just to check. Would that be correct?
1D = 0001 1101
b)1110 0011
c) 11111111 11100011
d)11111111 11111111 11111111 11100011
Do I actually have to convert this to decimal notation?