# Why hexadecimal instead of base-32 or higher?

**URL:** <https://boards.straightdope.com/t/why-hexadecimal-instead-of-base-32-or-higher/699765>\
**Category:** Factual Questions\
**Created:** [September 28, 2014, 5:32am UTC](https://boards.straightdope.com/t/why-hexadecimal-instead-of-base-32-or-higher/699765 "2014-09-28T05:32:22Z")\
**Posts on this page:** 6\
**Page:** 3

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [September 30, 2014, 3:56pm UTC](https://boards.straightdope.com/t/why-hexadecimal-instead-of-base-32-or-higher/699765/41 "2014-09-30T15:56:33Z")

</div>

You’d want to be careful about extending the digit-set to include multiple alphabets, since many of the letters look the same. Can you tell the difference between o and omicron, or between Rho and P?

And it should also be noted that on old Unix installations, the command you’d use to show the hex sequence of a binary file was called “od”, for “octal dump”. Apparently that was the standard at the time that command was written.

---

<div class="post-metadata">

**Author:** ![yabob](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/yabob/32/2821_2.png) [@yabob](https://boards.straightdope.com/u/yabob)\
**Post date:** [September 30, 2014, 4:26pm UTC](https://boards.straightdope.com/t/why-hexadecimal-instead-of-base-32-or-higher/699765/42 "2014-09-30T16:26:52Z")

</div>

And, of course, we’ve retained octal in many modern contexts for representing ASCII and unicode character codes, which I find mildly annoying sometimes. I don’t see the advantage of thinking of, say, the percent sign, as octal 45 instead of hex 25. Particularly as one place the character codes tend to turn up - URL escaping - DOES use hex. When EBCDIC was more commonly seen, it tended to be represented in hex.

And why does somebody want to look at a dump of “oOO” patterns instead of “XX”?

ETA:

And why did somebody then decide that character entities specified by code in XML/HTML would use decimal?

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [September 30, 2014, 4:54pm UTC](https://boards.straightdope.com/t/why-hexadecimal-instead-of-base-32-or-higher/699765/43 "2014-09-30T16:54:15Z")

</div>

> [@Chronos](#):
>
> And it should also be noted that on old Unix installations, the command you’d use to show the hex sequence of a binary file was called “od”, for “octal dump”. Apparently that was the standard at the time that command was written.

AFAIK, that’s the command on _new_ Unix installations as well, although it still defaults to octal. Type ‘od -x’ to get hex. (Or better yet ‘od -t x1’ to avoid the insane byte-swapping default on Little-Endian machines.)

BTW, I’m still surprised that pople think arithmetic in base-16 (or base-32 :smack: ) is “easy.” I’m not ashamed to admit that when adding 0A to 0B, I think “ten plus eleven” … and I was top of my 3rd-grade arithmetic class!

---

<div class="post-metadata">

**Author:** ![Voyager](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/voyager/32/133_2.png) [@Voyager](https://boards.straightdope.com/u/Voyager)\
**Post date:** [September 30, 2014, 8:01pm UTC](https://boards.straightdope.com/t/why-hexadecimal-instead-of-base-32-or-higher/699765/44 "2014-09-30T20:01:17Z")

</div>

> [@septimus](#):
>
> AFAIK, that’s the command on _new_ Unix installations as well, although it still defaults to octal. Type ‘od -x’ to get hex. (Or better yet ‘od -t x1’ to avoid the insane byte-swapping default on Little-Endian machines.)
> 
> BTW, I’m still surprised that pople think arithmetic in base-16 (or base-32 :smack: ) is “easy.” I’m not ashamed to admit that when adding 0A to 0B, I think “ten plus eleven” … and I was top of my 3rd-grade arithmetic class!

UNIX was first developed on octal machines.  
Octal was a pain on pdp 11’s, since you had the sign bit left over.  
Now the LGP-21 I used in high school (from 1962 but based on the even older LGP-30) used hex. It was a 32 bit machine. The hex was non-standard. Instead of  
0-9ABCDEF  
it used  
0-9FGJKQW  
Why? Because none of these were used for opcodes. The opcode for unconditional branch, U was 1010. The non-ASCII code for U was 101001.  
The non-ASCII code for F was 101010. So it was trivial to convert the character coding for either to their underlying value.

Oh what they did to save a few transistors.

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [September 30, 2014, 9:34pm UTC](https://boards.straightdope.com/t/why-hexadecimal-instead-of-base-32-or-higher/699765/45 "2014-09-30T21:34:47Z")

</div>

> [@yabob](#):
>
> And why did somebody then decide that character entities specified by code in XML/HTML would use decimal?

You can specify HTML entities in hex. &#169 == &#xA9 == ©

---

<div class="post-metadata">

**Author:** ![yabob](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/yabob/32/2821_2.png) [@yabob](https://boards.straightdope.com/u/yabob)\
**Post date:** [September 30, 2014, 9:49pm UTC](https://boards.straightdope.com/t/why-hexadecimal-instead-of-base-32-or-higher/699765/46 "2014-09-30T21:49:18Z")

</div>

> [@friedo](#):
>
> You can specify HTML entities in hex. © == &#xA9 == ©

Hmmm. OK, good to know. I don’t think I’ve ever seen anyone doing that, rather than specifying the decimal version, though.

[Previous page](https://boards.straightdope.com/t/why-hexadecimal-instead-of-base-32-or-higher/699765.md?page=2)
