Two base-16 characters represent a single byte in computer memory. A byte is 8 bits, and each bit can be 1 or 0, so you have 2^(8) = 256 = 16^(2) possible binary values.
Representations of many common values, such as colors, are also structured along bytes. For instance, colors are often encoded as RGB-triplets: a red, a green and a blue value, and each value can range between 0-255, for a total of 256 possible values – in other words 16^(2), or precisely one byte per value. This makes base-16, or hexadecimal, notation very convenient, as every individual value can be converted to two characters, leading to 6-character “words”. In base-32, you’d either be stuck still using two characters each for R, G and B, or you could convert the entire 3-byte binary number to a 5-character base-32 “word”. But that word would not be very readable to human eyes, because you’ve lost the triplet structure. That is, in a hexadecimal representation like FF8000, I can easily tell that this means an orange color (FF=100% red, 80 = 50% green and 00 = no blue). Using a base-32 5-character word, you’d get FV000, which I can’t read.
And therein lies the rub. This kind of notation is really only for human eyes. The underlying data is still binary. When we make the representation more “compact”, we’re not gaining any computational advantage. In fact, if anything, it’s making things harder, because the base-32 representation is more difficult to convert back to individual bytes (with base-16, you can just take each individual character and convert it separately; with base-32, you have to convert the entire word with what amounts to long division procedure). So there’s no advantage for the computer, and no advantage on the human side either, since the more “compact” representation is actually harder to read. Even if you’re not dealing with colors, it’s easier to think in base-16 than 32, since base-16 only adds 6 more digit characters beyond the familiar base-10. Most everyone knows that F is the 6th letter in the alphabet (and thus F in hex converts to 9+6=15 in decimal), but very few people would know from the top of their head that, e.g. S is the 19th (and thus would represent a decimal value of 28).
Edit: dumb math mistakes pointed out by u/jackerhack
Latest Answers