RFC 9226

Bioctal: Hexadecimal 2.0

πŸ“… published April 2022, from ietf

Bioctal: Hexadecimal 2.0 πŸŽ€

Okay bestie, this is RFC 9226 πŸ’Œ It came in as an Independent Submission, which means it wasn't from one of the usual IETF streams, so it's basically the indie-artist drop of the RFC world πŸ¦‹

  • Request for Comments: 9226
  • Author: M. Breen, at mbreen.com
  • Category: Experimental πŸ§ͺ
  • Date: 1 April 2022 πŸƒ (yes, it's an April Fools vibe, iykyk)
  • ISSN: 2070-1721
  • Obsoletes / Updates: It doesn't list any RFCs it obsoletes or updates on its title page. It's a solo little stand-alone moment πŸ’…

Abstract ✨

Okay so the hexadecimal system we're all stuck with was picked because it lines up neatly with groups of four binary digits, but ngl it doesn't care at all about how our brains actually handle it πŸ™ˆ This doc introduces an alternative that's built to cut down on brain cycles when a hex number should be easy for a human to turn into binary. Main character energy πŸ‘‘

Status of This Memo πŸ“œ

Let's get the boring-but-important stuff out of the way 🫢

This document is not an Internet Standards Track specification. It's published so people can look at it, try it out experimentally, and evaluate it πŸ”¬

It defines an Experimental Protocol for the Internet community. It's a contribution to the RFC Series that stands on its own, independent of any other RFC stream. The RFC Editor chose to publish it at their discretion and makes no statement about whether it's any good for implementing or deploying πŸ€·β€β™€οΈ Documents the RFC Editor approves for publication are not candidates for any level of Internet Standard. See Section 2 of RFC 7841 for the details πŸ“–

Info about the current status of this document, any errata, and how to send feedback lives at https://www.rfc-editor.org/info/rfc9226 πŸ’–

Copyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved ✨

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents, which you can find at https://trustee.ietf.org/license-info as they were on the date of publication. Please actually read those, bestie, because they spell out your rights and restrictions for this doc πŸ“

Table of Contents πŸ—‚οΈ

1.  Introduction
  1.1.  The Pernicious Advance of Hexadecimal
  1.2.  Problems with Hexadecimal
  1.3.  Other Proposals
2.  Bioctal
3.  Objections to Be Dismissed
4.  Security Considerations
5.  IANA Considerations
6.  Conclusion
7.  Informative References
Acknowledgments
Author's Address

1. Introduction 🌸

1.1. The Pernicious Advance of Hexadecimal πŸ’…

Okay so octal has been doing its thing for ages, grouping three binary digits into single characters πŸ“ It's really got going for it because it doesn't need any digits beyond the ones we already know from decimal. Sadly, 16-bit machines took over, and so did other machines whose word lengths are divisible by four (but not by three), and that's how hexadecimal became everywhere 😭 Here's the hexadecimal alphabet in Table 1 ✨

                              +=======+=======+
                              | Value | Digit |
                              +=======+=======+
                              |     0 | 0     |
                              +-------+-------+
                              |     1 | 1     |
                              +-------+-------+
                              |     2 | 2     |
                              +-------+-------+
                              |     3 | 3     |
                              +-------+-------+
                              |     4 | 4     |
                              +-------+-------+
                              |     5 | 5     |
                              +-------+-------+
                              |     6 | 6     |
                              +-------+-------+
                              |     7 | 7     |
                              +-------+-------+
                              |     8 | 8     |
                              +-------+-------+
                              |     9 | 9     |
                              +-------+-------+
                              |    10 | A     |
                              +-------+-------+
                              |    11 | B     |
                              +-------+-------+
                              |    12 | C     |
                              +-------+-------+
                              |    13 | D     |
                              +-------+-------+
                              |    14 | E     |
                              +-------+-------+
                              |    15 | F     |
                              +-------+-------+

                                 Table 1: The
                             Hexadecimal Alphabet

Real talk, the choice of letters is totally arbitrary 🎲 Once the decimal digits run out, the first Latin letters just get used in order. An arbitrary alphabet can be fine on an interim or experimental basis. But given how unlikely a return to 18-bit computing is, we should review this choice before it gets locked in, the way QWERTY did, and then nobody can switch to something more logical πŸ₯²

1.2. Problems with Hexadecimal 😭

Okay so one problem with the hexadecimal alphabet is already well known: it has two vowels, and hex numbers have been found to accidentally spell words that are offensive to vegetarians and other groups πŸ’€

The bigger problem is the mental gymnastics of turning a hex number into binary (or back). Take the digit 'D', for example πŸ™ˆ First you have to remember that 'D' means 13. Sure, 'F' is easy to recall as 15 with all bits set, but for the digits in the middle of the non-decimal range, like 'C' and 'D', you might end up counting on your fingers ("A is ten, B is eleven, ..."). Next, you have to subtract eight to get a number in the octal range. So getting one extra bit costs you two extra mental operations before you get to the part that's left, which is just converting the remaining three digits to binary. Not iconic.

These steps aren't hard per se, since a child could do them, but if we can avoid making children do this, we should 🧸 Cognitive psychology kind of has a say here too, specifically the "seven plus or minus two" principle [Miller]. Either octal sits at the upper end of that range (nine) and hex doesn't, or the difference in alphabet size is bigger than the lower end of that range (five). Either way, it's almost certainly relevant 🧠

1.3. Other Proposals πŸ¦‹

People have already floated a bunch of alternatives. Some are just as arbitrary, like picking the last six letters of the Latin alphabet instead of the first six πŸ™ƒ

The scheme that gets closest to solving the main problem so far comes from Bruce A. Martin [Martin], who proposes brand-new characters for the entire octal alphabet ✨ His main goal is telling hex apart from decimal, but each character uses horizontal lines to directly show the "ones" of the matching binary number, so mentally translating to binary is a total breeze 🌟

The catch is that this, and any other proposal that needs new symbols, might not get accepted, since changing the US-ASCII character set [USASCII] might not fly anymore 😬 And it's kind of unrealistic to expect keyboards or printer type elements (whether golf ball or daisy wheel) to get replaced just to fit new character designs πŸ–¨οΈ

2. Bioctal πŸ”₯

Table 2 shows the hexadecimal alphabet again, this time laid out in two octaves, with values going left to right and top to bottom πŸ‘€

                     +---+---+---+---+---+---+---+---+
                     | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
                     +---+---+---+---+---+---+---+---+
                     | 8 | 9 | A | B | C | D | E | F |
                     +---+---+---+---+---+---+---+---+

                          Table 2: The Hexadecimal
                           Alphabet in Sequential
                                  Octaves

And honestly, this layout is giving binary 🀌 Each digit in the second octave has the same binary representation as the digit above it, except the most significant of the four bits is set to '1' instead of '0'.

The mismatch of two decimal digits in the second octave is the clue πŸ•΅οΈβ€β™€οΈ When you blindly line things up with four bits, hexadecimal (six plus ten, and neither is a power of two) misses the chance to also line up with three bits.

Bioctal fixes that congruence by swapping out the second row for characters that are mnemonically tied to the matching character in the first octave πŸ’–

Table 3 shows the result, and it's so satisfying 😭✨

                     +---+---+---+---+---+---+---+---+
                     | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
                     +---+---+---+---+---+---+---+---+
                     | c | j | z | w | f | s | b | v |
                     +---+---+---+---+---+---+---+---+

                            Table 3: Bioctal in
                             Sequential Octaves

The memory hook is the shape of the lowercase character. You can see it right away for '2', '5', and '6' πŸ¦‹ For '3', '4', and '7', the letters come from a quarter-turn clockwise (assuming an "open" '4'). And the choice of 'c' and 'j' for '0' and '1' avoids vowels and lowercase 'L', which can get mixed up with '1' in some fonts πŸ™ˆ

With this set of letters, both problems with hexadecimal are sorted, no cap πŸ‘‘ Mental conversion becomes super easy: if the digit is a letter, then the most significant of the four binary bits is '1', and the remaining three bits match the Arabic numeral with the same shape in the first octave. Slay πŸ’…πŸŒˆ


3. Objections to Be Dismissed ✨

Okay so, bestie, we need to talk about the objections people are going to throw at bioctal πŸ’… I've already got answers ready.

First up is the name. "Bioctal" is already taken πŸ™„ It's been used for two octal characters squished into one field on paper tape (see [UNIVAC]). But if "bioctal" has to lose a few meanings to make room for "biannual," then honestly the paper tapers need to move over πŸ’β€β™€οΈ In our version, the "octal" part means three bits can have eight distinct values, and the "bi" means the number of bits doubles, not the number of values. That paper-tape meaning has a totally confusing origin story, and it doesn't deserve to stick around πŸ™ƒ

Second, someone's going to say hexadecimal is too deeply rooted to swap out right now, so bioctal should wait until everyone who's used to hex has retired 😀 No thanks. That kind of stalling can't be allowed to block progress. Any data entry tech who says bioctal is too hard can be moved to a job that only deals with binary numbers 🫠

Third, the sorting objection: bioctal numbers don't sort numerically. Okay, but that only holds if you're sorting by the US-ASCII order of symbols πŸ€·β€β™€οΈ Bioctal numbers might sort perfectly fine in some lesser-known flavour of EBCDIC. Plus, resisting numeric sorting might actually be a sign of virtue, like the alphabet has a strong, principled personality πŸ’œ

Now the one real difficulty: not every computer supports lowercase letters. That's true, but you have to check it for each specific machine 🧐 The author has noticed that lots of machines with keyboards labelled only in uppercase still support lowercase just fine. And if you're stuck with uppercase, that's allowed too 🫢 The morphology mnemonic still works for most bioctal digits in uppercase. The only catch is that 'B' needs one extra mental cycle πŸ™ˆ


4. Security Considerations πŸ”

Okay this part is serious, babe 😭 The letters 'b' and 'f' show up in both the bioctal and hexadecimal alphabets, so mixing them up is a real risk πŸ’€

Picture this: two embedded systems engineers are building a tiny lizard detector you wear like a wristwatch 🦎⌚ One engineer is on the lizard proximity sensor, and the other is on a minimal two-character display. The two circuits talk over a 14-bit interface. To make life easier, the display engineer sets those bits so they work directly as two seven-bit US-ASCII characters, showing the most significant lizard species nearby πŸ¦–

Here's where it goes sideways. Because of an old US-ASCII table (one written in hex, not bioctal) plus human error, some of the output values from the detection subsystem are in hex, not the bioctal the other engineer is expecting. That includes one type of lizard, which comes through as "4b 4f" 😱 So the display shows "NL" (No Lizards) when it should be showing "KO" (Komodo dragon). Yikes. That could be seriously harmful to whoever's wearing the device πŸ₯Ί

Extensive research has found no other security-related scenarios to date 🫢


5. IANA Considerations πŸ“‹

This document has no IANA actions. Nothing to register here, bestie ✨


6. Conclusion 🌍

Bioctal is a huge upgrade from hexadecimal technology πŸš€ It's going to cut down the tiny (but definitely not zero) contribution to anthropogenic global warming that comes from all those mental hex-to-binary conversions 🌱 Since the mnemonic basis of the alphabet doesn't depend on English or any other natural language, there's honestly no reason it shouldn't be adopted right away everywhere 🌏 The one exception might be certain islands of Indonesia, where Varanus komodoensis is native πŸ¦ŽπŸ‘‘


7. Informative References πŸ“š

[Martin]   Martin, B. A., "Letters to the editor: On binary
           notation", Communications of the ACM, Vol. 11, No. 10,
           DOI 10.1145/364096.364107, October 1968,
           <https://doi.org/10.1145/364096.364107>.

[Miller]   Miller, G. A., "The Magical Number Seven, Plus or Minus
           Two: Some Limits on Our Capacity for Processing
           Information", Psychological Review, Vol. 101, No. 2, 1956.

[UNIVAC]   Sperry Rand Corporation, "Programmers Reference Manual for
           UNIVAC 1218 Computer", Revision C, Update 2, November
           1969, <http:/bitsavers.computerhistory.org/pdf/univac/
           military/1218/PX2910_Univac1218PgmrRef_Nov69.pdf>.

[USASCII]  American National Standards Institute, "Coded Character
           Set -- 7-bit American Standard Code for Information
           Interchange", ANSI X3.4, 1986.

Acknowledgments πŸŽ€

The author owes a big thank you to R. Goldberg for helping with Section 4 🫢

Author's Address πŸ’Œ

Michael Breen mbreen.com Email: rfc@mbreen.com

πŸ“¦ where this page comes from