Signed hexadecimal value range
1 answer
This sounds like homework. If so, please mark your question as such.
One way to think about this:
- How many bytes are represented by six hexadecimal digits?
- How many bits are represented by these bytes?
- How many bits are you missing due to the sign?
- Given your total number of bits, what's the smallest value you can imagine?
- Given the total number of bits, what is the largest value you can imagine?
Think about the answer to the last question.
For example, the smallest signed 32-bit int is -2147483648. The largest signed 32-bit int is 2147483647.
+1
a source to share