Hexadecimal and Octal constants -- Help! I really don't
understand this concept. My book explains this in a confusing
fashion. How exactly does this system work? How does hex 0xff
equal 255? Or oct 011 equal 9?? Hexadecimal is a base 16 number
scheme and Octal is a base 8 scheme. Therefore, F in hexadecimal
is equal to 15 and 0xFF would be equal to 15 x 16 + 15 = 255.
The octal number of 011 would be calculated as 1 * 8 + 1 = 9. if
you had 16 fingers, you would probably count in base 16.. in
computers, we do count in base 16, cos it helps. we need some
symbols to represent the count, and 0 to 9 do nicely for the
first ten, but then what symbols do we use for the remaining
six? rather than defining some new symbols, we just use A to F
dont look at them as letters, look at them as symbols that link
to a number of something.. put fifteen apples on a table, and
then say "there are F apples there" think about how decimal
things break down: is 2 * 10 * 10 + 7 * 10 so the number 7FE is:
7 * 16 * 16 + F * 16 + rememb