If the range of an int is -32768 to 32767, then what is this range in hex? Is it possible to represent negative values in hex?
If the range of an int is -32768 to 32767, then what is this range in hex? Is it possible to represent negative values in hex?
According to printf()'s %x conversion you can't. This is what I get:
-32768 = 8000
32767 = 7fff
I think the way it represents negative numbers also has to do with whether the system you're on uses two's complement, one's complement, or sign magnitude to indicate negative values.
If you understand what you're doing, you're not learning anything.
http://www.google.com/search?hl=en&i...=Google+Search
edit: beaten :P
hello, internet!
Oh, very helpful (re: compliments) - thanks!