Hex values are used because of the way they correlate with memory. As Fredrik pointed out, one hex digit is a nibble, and thus 2 hex digits occupy exactly one byte of memory. And so on. With decimal values, however, the value must be stored in a "rounded out" variable, meaning it must be converted to hex or binary. You can do it with a decimal value, as your compiler will quickly prove, but it''s less memory efficient though not significantly.
There are other reasons I can''t quite remember right now; someone will probably post to explain them as well.
Help with the & bit operator and hex
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement