I've taken quite a few intro programming classes in my day, mostly just to get my feet wet in every different kind of programming I find.  Not surprisingly, just about every class runs through the same format : intro to hardware, intro to software, and then you get into the actual programming.  While understanding how the hardware and software works is very important, I've always been confused by one topic that has been in every single course.In the intro to software section I've found, without fail, they always put large emphasis on being literate in binary, hexadecimal, and sometimes even octal number systems.  I understand that it's good to understand what these things are, and how a computer would interpret them, but I've never found myself actually needing to know how to read and write any of those number systems.  Really, the only time I've seen something other than base 10 is for colors in CSS, which is even easier if you use something like www.colorpicker.comHave I just been ignorant of the wonderful uses of these non-base-10 number systems in the programming world, or is just an old tradition to include these sections in all programming textbooks?  Does anyone have a good example of where the average programmer would actually use an octal number?
Why learn hexadecimal?
binary;hexadecimal
All the answers are good but they don't address what I think is the most valuable part.  Learning to Think in different bases makes you much more fluent with the way computers handle numbers.If you wanted to store a string of lower case letters packed fairly well, how would ou do it?Well, there are 26 lower case letters, that translates easily into a range of 0-31 which is a 5-bit number, you can pack 6 5-bit numbers into a 32 bit field (int?) and even have enough left over for a few punctuation marks.I'm not saying hex helps with stuff like this, but understanding how numbers convert does.Another case, every so often you use base-64 for passing somewhat long numbers in ascii.  Would you know how to implement this?  Why implement it that way?  Did you even realize that's what you were typing in every time you typed the CD KEY into a game's registration box?Also, for fun, play around with base 12 for a while sometime.  Math turns out to be really interesting in base 12 (base 10 is stupid in comparison, I wish we'd evolved with 6 fingers--we could be decades ahead in our comprehension of math).   Some very smart early humans used base 12 to develop the clock.  In base 10 we have 3 Cool numbers that create easy patterns, 2, 5 and 9 with 8, 6 and 4 as Minor cool numbers.  In base 12 you have 2,3,4,6,11 as Cool numbers with 8,9 and 10 as Minor cool numbers, meaning that if we used base 12 we'd be much better at recognizing patterns in numbers because we'd be seeing them all the time.Also, binary.  You can count on one hand to 32--I do it quite a bit, comes in handy sometimes when counting to 5 just doesn't cut it :)Binary is lots of fun, but it just doesn't translate well.  When you get good with hex, you start to see A as 1010 and 5 as 0101, and these things start to really matter.  If you have a bitfield that you want to extract the 6th bit:00100000, what do you and it with?  You should just know that it's 0x20.If you see code that ands something with 0x0600 which bits are being extracted? You should know without even thinking about it--you should actually read that as though it were written 0000011000000000 (but easier to read because you don't have to count zeros).Why would you want to limit your brain and its ability to process data?