There are two more or less standard (and ancient) command-line unix tools that offer very easy ways to convert numbers between different bases:
$ { echo '16'; echo i; echo 00080000; echo p; } | dc
524288
$ { echo 'ibase=16'; echo 00080000; } | bc
524288
For normal human use I very much prefer bc
, but when writing a program that generates code, especially from a parser of some sort, a stack-based tool like dc
may be easier to deal with (and indeed the original version of bc
was a front-end parser for dc
).