# In "The Martian" why would he use hex over base 10 values for the alphabet? [duplicate]

The fastest way to communicate the English language would be just having the camera point at letters. He explains that it would be too difficult to tell what the camera was pointing at. Since the limiting factor is the amount of discrete directions that the camera can point, why would you use hex over base 10 values to translate into letters? Instead of 16 directions, you would only have to discriminate between 10. You are already having to translate from the numeric representation to the letter representation anyway. I assume you would need either a delimiter or an agreed upon "word space" (each value will be padded with zeros if it uses less than the max word size).

I think there could be several reasons:

1. He's not able to negotiate a protocol in advance. So say he uses decimal values, and sends `2,5,5`. Is that "BEE" (with `1->A`), or "CFF" (with `0->A`), or "YE" (if the first number is "25" instead of "2", and with `1->A`), or the literal number "255"? There's no way of knowing without an agreed-upon delimiter, and no way to agree upon a delimiter that he just makes up on the spot. But if he sends octets, 4-bits/one hex digit at a time, there's an implied delimiter every two digits.

2. He may need to communicate with a larger character-set than `[A-Z]`, especially since he has to discuss technical issues. Unless he resorts to something like ASCII, there's not an obvious way for him to encode anything other than the 26 letters of the alphabet. How you he say "7", or `void main() { print("Hello"); }`, in a way that the recipient will understand?

3. Hex becomes more efficient if he needs a character set with more than 99 values in it. With decimal, as soon as he adds a 100th character (or, if he's using decimal values to send ASCII codes, then as soon as he wants to send lowercase letters or formatted code) he has to start transmitting and receiving 3 numerals for every value. With hex, he doesn't have that problem up until the 256th character. Having to transmit 3 numerals per character significantly reduces his effective bitrate/bandwidth.

4. Maybe the advantage gained from having 10 values instead of 16 was minimal. At 10 values, you have 36 degrees separating each one. At 16, you have 22.5. And at 26, you're down to about 13.8. If 13.8 is too small to work with but 22.5 is okay, there's no reason to step up to 36. The more bits you can send at once, the faster you can communicate. So it would make sense to prefer using hex unless 22.5 degrees just wasn't good enough to be a workable solution at all.

• 1. Seems like either base10 to ascii or hex to ascii would be realized very quickly. 2. Base10 to ascii uses the same characters as hex to ascii. 3. This one makes sense, but it seems like the advantages are minimal due to...4. Guess it depends on the degree that is workable. Thanks for the thorough answer. Accepted. Commented Dec 25, 2015 at 4:11

Hex would make it much easier to transmit ASCII. (Two digits per character as oppose to three.)

ASCII was probably chosen because it is a standard system and more robust then a regular alphabet.

Somehow, we have to have complex astrophysical engineering conversations.