Egad! What can you say about hexadecimal?
Human beings (generally) have 10 fingers, and so count by tens therefore we use a decimal based system. Note that there are 10 different symbols (0, 1, ... 8, and 9). After we count to 9, we have to either invent other symbols (not an option), or reuse the ones we have. Therefore, the number after nine -- which is ten -- is written 10. That means we have one ten, and zero units. Ok, this is all first-grade stuff.
However, computers have bits instead of fingers, and so count by 2s. Each bit can have only two values -- 0 or 1. To write a two in binary, you would write 10, meaning one two, and zero ones. Three would be written as 11, meaning one two, and one one. Obviously, for humans this gets tedious quickly.
So people group the bits into either groups of three bits (octal, which is base 8 ) or groups of four bits, which is hexadecimal. Other groupings are possible, but not customarily used. One one of them -- groups of two bits -- even has a name, which is trinary (base 4). I've never seen trinary used in 30 years of programming computers...
Ok. Let's tackle octal before we take on hex(adecimal).
Octal is base eight. That means it has the digits 0...7. To write eight in octal, we're back to 10 again -- 1 eight, and 0 units. The symbols 8 and 9 are not used in octal, just like the digits past 1 are not used in binary.
However, any number can be expressed in binary, octal, decimal, or hexadecimal.
Hex is a little different as it is base 16. That means we need fifteen different symbols. However, our decimal numbering system has only ten different symbols... So, we need to come up with five more symbols. those symbols are the first five letters of the alphabet; A - F.
A = 10 (decimal)
B = 11 (decimal)
C = 12 (decimal)
D = 13 (decimal)
E = 14 (decimal)
F = 15 (decimal)
So... Hexadecimal is base 16. Let's write the digits from zero to 16 in hexadecimal: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10.
As you can see in hex, sixteen is written as 10 -- one sixteen, and 0 units.
Math can be done in any base, but I have to admit that I turn to a calculator for any base other than decimal.
Again, the key takeaways from my little posting are:
1. Humans work in base 10; computers work in binary (base 2).
2. Humans group computer bits together to make them easier to work with. Groups of three bits gives you 8 options, which is octal (base 8 ). Groups of four bits is base 16, or hexadecimal.
If you dig around, you can find exceptions to this.
-- There have been computers made that worked in decimal, but those generally were at the dawn of the computer age and are no longer in current usage.
-- Humans have experimented with bases other than base 10 -- base 12 was used a bit -- not sure where -- and that's where we get 12 hour clocks from. Base 12 has some advantages over base 10, insofar as 10 only has two divisors - 2 and 5. Base 12 has twice as many - 2, 3, 4, and 6.
Kezzstar -- what else are you looking for?
-- Bill