In reality, it’s actually quite useful to know how to do the conversions, because knowing how the computer represents values can be remarkably important, especially in a CS course. In my case, we covered base conversions in the “intro to digital circuits” class, one of our projects was to write a circuit that would take a binary input (from a set of switches) and convert it to hex.

It turns out that base conversion is a core part of “New Math”, Tom Lehrer’s “New Math” song is all about how you do arithmetic in different bases. They’re still teaching “New Math” in classes, converting between bases is covered in the 5th or 6th grade at least at Wellington (the school where Valorie used to work). This makes sense, because it’s important that students have a fundamental understanding about how numeric operations work, and what makes up a number – understanding different base systems helps to figure it out.

Obviously this works for any power of two, it’s just that octal and hex are the two most common.

Now once you want to include converting to decimal, it’s gets a bit harder – then whipping out the calculator’s usually the best solution. If you still MUST do the conversion by hand, it’s often easier to do it with the octal representation than the hex representation. In this case, it’s:

Heh, you know it is funny you mention good old HP products, I still have a lot of them laying around or boxed up around. Old HP Products are kind of like old Muscle Cars, they run strong, easy to work on and built to last a lifetime. I have an old HP Jornada running the first windows CE, black and white display. your lucky if the batteries lasted 2 hours while on and running, but was cool for it’s time.

After school/college converting by ‘hand’ is useless … I mean it is handy to know how each number system relates to the other and why they exist but memorising all sixteen hex to binary conversion? No thanks. I got though my Universities ‘basic’ maths exam which funnily enough I found harder than the actual maths in my unit (the basic maths is all the conversions that you never have to use in the actual course).

Now we are doing things like Sets, complex equations that don’t require you to memorize stuff, you just have to learn the "logic" and you can work out the solutions, not remember the solutions and work out the logic or something like that… 🙂

My son is now in Grade 5 here in Vancouver BC and they are "reviewing" the place value system – base 10. Teaching grade 5 different base systems might be a bit too early for most kids methinks. When I was in school in Hong Kong I learn the conversion by hand in grade 7 – first year highschool. But then again we learn other useless things like converting between roman numerals and decimals. Also looking up the old log tables for logs, square roots, sine cosines and the like.

I live in Hong Kong, and we were taught about multi-base(2, 8, 10, 16) conversion at Primary 6(somehow equivalent to Grade 6 there). It’s on the curriculum for Maths. published by our Education Dept., but of course convertion for such big number is not included. (Maybe the students who attend Maths. Olympics will have to learn it anyway.)

This is more to do with hex arithmetic than changing bases, but I was recently given an old-style chinese abacus, where beads are in columns, with 2 beads at the top (each worth 5), then a divider and 5 more beads below (each worth 1).

All the computer bases… binary (2), octal (8), hexadecimal (16), and base64 (64)… can be translated one-to-the-other a piece at a time (as long as you’ve got the offsets right) via the regrouping and translation tables you demonstrate above. Easy.

But converting from any of these to decimal — and from decimal to any of these — requires the BigInt-style multiplication and accumulation. Yuck.

So orangie’s original problem – convert from binary, to decimal, to hex – is an exercise in torture, no? Leaving decimal out would have been much easier.

Yes, the kids in the 5th/6th grade class where I worked for the last two years learn to add, subtract, multiply, divide and convert between base 10, base 2, base 3, base 5, base 7, base 8, base 9, base 11, base 12 and base 16. Kids are between 10 and 12 years of age for the most part. It’s a big part of the place value unit, but also a sneaky way to have kids practice their base10 basic math skills. Kids usually write base10 to base X conversion tables from 1 to 100 for each base as the intro, but we’ll practice converting numbers up to 1M. After all, if you can convert 50, then converting 500,000 just takes more places.

Another point to make is that European and Arabic math is base10 but many other cultures did not use base10 historically. Babylonions used base60 because it had so many factors. There’s a modern day African tribe that uses a numbering system akin to base28 because they recognize 28 different body places when counting.

Is converting bases useful to daily life? Not really. Calculators are way too prevalent in life, but I think understanding how bases work is essential being a well educated person in today’s day and age. I think it’s one of those foundation blocks in math that makes one’s understanding of higher concepts pretty shaky if it isn’t solid, but then again, I’m a definite math geek…

Re: The octal/base-8 chatter. The old DEC stuff used to use octal a ton, you had to know octal almost as well as you knew decimal for some stuff as you saw it more often. It was actually weird going from a DEC PDP to a PC and dealing with a Hex instead of Octal.

I find that many of the younger coders and admins now have little understanding of the standard computer bases nor even bitwise logic and how critically important it all is. They may be learning it in 5th grade but they aren’t remembering it very well when they get to the real world. Lots of core basics like that don’t seem to be understood as well as it should be, it is why I always recommend Petzold’s book "Code" to anyone I meet in the industry as required reading. We may have all of these "advanced" languages and frameworks like Dot NET / Java / etc but it all still comes back to 0’s and 1’s.