Hexadecimal, or base 16,Footnote 1 has been used as a computer language for decades. But much that has been written about the development of the term hexadecimal and the associated number system itself is incorrect. In this short article, we delve into the history of the term, the number system, and its notation in order to offer a more complete (and accurate!) story of hexadecimal and to dispel some of the myths that have emerged along the way. So here are F, or fifteen, things you (probably) didn’t know about hexadecimal:

1

The Oxford English Dictionary’s first attestation of hexadecimal dates from a newsletter of January 1954, which used the word to describe the Miniac,Footnote 2 a decimal computer that had been reconfigured so that it might “be operated hexa-decimally” [2, p. 6]. In fact, the word can be antedated to 1950, when it was used to refer to the notation used for inputting numbers and instructions into the Standards Eastern Automatic Computer (SEAC), designed and constructed by the National Bureau of Standards, a US government agency based in Maryland [1, p. 123].Footnote 3. However, the oft-made claim that IBM coined hexadecimal (see, for example, [6, p. 118]) is false.

2

The hexadecimal digits chosen by the National Bureau of Standards were the Western Arabic numerals 0–9 and the Roman letters A–F, and these have remained standard ever since. This has not pleased everyone. In 1968, Bruce Alan Martin [13, p. 658] complained that “[w]ith the ridiculous choice of letters A, B, C, D, E, F as hexadecimal number symbols adding to already troublesome problems of distinguishing octal (or hex) numbers from decimal numbers (or variable names), the time is overripe for reconsideration of our number symbols.” To that end, he sketched fifteen new symbols for the nonzero digits of hexadecimal:

However, Martin’s suggestion that these replace 0–9 and A–F came to nought, or .

3

Inspiration for the choice by the National Bureau of Standards of A–F as the six extra digits may have come from Joseph Bowden’s Special Topics in Theoretical Arithmetic (1936), in which he suggested that [5, p. 50]Footnote 4

[i]f we wish to employ a base larger than ten, we may instead of using new symbols, use letters for the extra digits. Thus with 25 for base we may count as follows:

1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, G, H, K, L, M, N, P, Q, R, S, T, U, V, W, X, Y, 10.

Bowden also considered the merits of base 16, which he referred to as sexidenal, a term he appears to have drawn from Robert Morris Pierce, who used it in 1898.Footnote 5 For the six extra digits of his sexidenal system, Pierce [17, p. 9] chose the lowercase Latin letters a, b, c, d, e, f. With the aim of providing information that could support an attempt to switch public use away from the decimal system, he showed how standard arithmetic operations worked in bases 8, 10, 12, and 16.

4

In The Art of Computer Programming, Donald Knuth [8, p. 202] notes that today’s prevalent term for base 16, hexadecimal, is “a mixture of Greek and Latin stems,”Footnote 6 namely the Greek ἕξ (héx, “six”) and the Latin decem (“ten”). That’s like hybridizing English and German roots to make sixzehn or sechsteen. Of course, the result may still be understood, and some hybrids (such as television) have become ubiquitous, but Greek and Latin roots are generally best kept separate, since combining their vocabularies increases the prevalence of homographs (i.e., unrelated words with the same spelling), which makes it that much harder to work out what a coinage means; for example, it is only by assuming their separation that you can be assured that pedology is the study (λόγος · lógos) of soil (πέδον · pédon), not feet (pedes).

5

Knuth [8, p. 202] also claims that “more proper terms would be ‘senidenary’ or ‘sedecimal’ or even ‘sexadecimal.’” However, Knuth is mistaken about the aptness of sexadecimal, which is in fact a corruption of the correct term sexdecimal. That spurious a probably derives from the misdivision of sexagesimal (a term used to refer to base 60; literally “relating to sixty”) as sexa-gesimal.Footnote 7 The corrupted term sexadecimal first appeared in 1895 in William Dwight Whitney’s The Century Dictionary [24, p. 5535].Footnote 8 Unfortunately, the corruption has by now taken root: in a book on the etymology of mathematical terms, Schwartzman [18, pp. 5, 105] wrongly takes sexadecimal to be an etymologically correct alternative for hexadecimal.

6

According to Knuth [8, p. 201], the first person to use base 16 was the Swedish-American engineer John William Nystrom (1825–1885). This is incorrect, as we shall see. But Nystrom was at least a very vocal proponent of base 16, which he outlined in great detail in a book published in 1862 and in a series of articles published a year later.Footnote 9 He proposed replacing the familiar decimal system with a base-16 system he called tonal. The name has nothing to do with music; rather, in Nystrom’s system the number 10 (that is, 16 in decimal) is arbitrarily named ton. In fact, Nystrom [14, pp. 16–17] coined new names for all numbers expressed in his tonal system; for example, 0 is noll, 9 is ko, 100 is san, 1,000 is mill, 1,000,000 is sanbong, etc. For tonal notation, he suggested [14, p. 15] the following symbols:Footnote 10

Nystrom was so enamored of his tonal system that he not only suggested new units of weights and measures but also devised a clock dial that divided the day into sixteen hours. He even proposed dividing the year into 16 months of approximately 23 days apiece, each month having its own novel name (Anuary, Debrian, and Timander were the first three).Footnote 11 Aside from the number 16 allowing for more convenient binary divisions (i.e., divisions by 2) than the number 10, Nystrom [14, p. 23] also favored base 16 over base 10 because the former requires “a less number of figures in expressing a high number.”

7

However, in 1867, W. B. Taylor, of the United States Patent Office, reviewed Nystrom’s proposal and reached the conclusion that base 16 was not significantly more economical than base 10, as Nystrom had claimed. Taylor [22, p. 120] demonstrated that when it came to expressing very large numbers, such as “the number of grains of sand required to constitute a globe as large as our earth,” around 659 quintillion,Footnote 12 the senidenary system (Taylor’s preferred term for base 16) was scarcely more convenient than the decimal, for whereas decimal would require 33 digits to express such a large number, the senidenary would still require 28: “a reduction quite insignificant,” in Taylor’s opinion. Having won no support for his tonal system, Nystrom later abandoned his efforts to promote it, instead recommending public adoption of the duodenal (i.e., duodecimal, or base-12) system [16, pp. 307–331].

8

Nystrom did not claim base 16 as his own invention. He wrote that King Charles XII of Sweden (1682–1718) had considered introducing the base-16 system in Sweden, but his objection to the consequent requirement for new symbols for the extra digits led him to prefer the octal (base-8) system instead [15, pp. 263–264]. However, Nystrom provided no evidence for his assertion, and it is undermined by an eyewitness account by Emanuel Swedenborg (1668–1772) that describes Charles XII’s interest in octal and even base 64, but not base 16 [21].

9

Nystrom was at least correct about his not being the inventor of base 16, even if he wasn’t right about who had got there before him. Almost two decades earlier, in 1845, the English schoolmaster and mathematician Thomas Wright Hill (1763–1851) proposed a base-16 numeration system in a paper read at a meeting of the British Association for the Advancement of Science in Cambridge, England. The paper was posthumously published as “A system of numerical nomenclature and notation, grounded on the principles of abstract utility” [7, pp. 63–85]. Hill referred to his base-16 system as sexdecimal. The Latin word for sixteen is sedecim (which gives English sedecimal), but it can also be spelled sexdecim, so Hill’s choice of term is etymologically sound.

A

Hill [7, p. 69] drew his inspiration from the divergent use of the term stone in the county of Yorkshire, England, to refer to a weight of 16 pounds, rather than to one of 14 pounds, as elsewhere in Britain. Hill noted that the Yorkshire practice allowed for more convenient bisections, which suggested that benefits could be reaped by adopting base 16 more broadly. Rather than identify sixteen distinct digits for his sexdecimal notation, Hill [7, p. 78] came up with nine elements that could be combined to form any positive or negative value in sexdecimal:

• n = the fractional dot

• ō = zero

• ĭ = 1

• ŏ = 2

• w = 4

• ĕ = 8

• d = +

• k = −

• advance in the scale = × 16

From these elements, Hill generated distinctive names for all positive and negative sexdecimal values; for example, dĭn = +1, dĭkōn = +16 (because the ĭ, or 1, is in the 16’s place, with the k before the ō acting as a place separator), dĭdōkōn = +256 (because the ĭ, or 1, is in the 256’s place, with the d and k before each ō acting as place separators), kĭn = −1, kĭkōn = −16, etc., where ō can be preceded by either d or k, depending on one’s preference for pronunciation, since 0 is unaffected by + or −.

B

Hill [7, p. 74] believed that the sexdecimal system was not one that had theretofore found any supporters, stating, “[T]his number [i.e., 16] has not hitherto been publicly recommended, as far as my knowledge extends.” Hill was right that sexdecimal had not been publicly recommended before, but that does not mean he was the first to conceive it. In fact, base 16 was invented in the seventeenth century by the polymath Gottfried Wilhelm Leibniz (1646–1716), who is well known for a number of other mathematical innovations, such as the calculus and the binary system. Initially, Leibniz’s term for base 16 was sedecimal. In his first writing on base 16, Leibniz [9] worked out how to convert the decimal number 1679, representing the year of his invention, into sedecimal numeration.

C

Leibniz experimented with different forms of notation for sedecimal. In his first writing on the subject [9], he used the Roman letters m, n, p, q, r, and s for the six extra digits, before abandoning them in favor of the six Aretinian syllables ut, re, mi, fa, sol, and la,Footnote 13 abbreviated by Leibniz to u, r, m, f, s, and ℓ. By combining these syllables with the German words for numbers, he created an entirely new set of terms for values expressed in sedecimal. For example, utzehn, a combination of the syllable ut, standing for ten, and the German word zehn, which traditionally meant ten, but was repurposed by Leibniz to stand for sixteen, was Leibniz’s term for the decimal number 26 expressed in sedecimal (1u, in Leibniz’s notation).

D

Leibniz [10] also experimented with different forms of notation for base 16. In another early writing, in which he termed the number system sedenary,Footnote 14 he stacked dots and dashes, using a dot for each 0 bit and a dash for each 1 bit, with the most significant bit at the top and the least significant bit at the bottom:

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

– •

Leibniz’s dot-and-dash notation is reminiscent of that used in the ancient Mayan (base-20, or vicenary) number system, which aside from a special “shell” character for zero, uses only two symbols, a dot (for 1) and a bar (for 5), with stacks of dots and bars used to form numbers up to 19 and a vertical positional system to represent even higher numbers [3, p. 764]. However, there is no evidence that Leibniz had any knowledge of the Maya, so the similarity is surely a coincidence.

E

In 1682 or thereabouts, Leibniz [11] sketched out another form of sedenary notation on the back of an envelope. This time he starts with a concave-up semicircle to denote 0 and a concave-down semicircle to denote 1, and he then modifies these characters to create the remaining digits:

Inferring from his descriptions (or instructions), Leibniz based each digit on Roman letters, either single or joined-up, with some of them being “bicaudate,” that is, extended by a tail (cauda in Latin) on either side, and others “antecaudate,” that is, extended by a tail on the left-hand side alone.

F

In what was probably his last writing on base-16 numeration, Leibniz [12] drew a table featuring the decimal numbers 0 to 40 represented in every base from 2 to 16. In this table, Leibniz used the lowercase Latin letters a, b, c, d, e, and f for the six extra digits of his sedenary character set, the first and only time he did so. This anticipated rather than influenced the modern convention of using A, B, C, D, E, and F for the six extra digits, since Leibniz’s writings on sedenary are only now starting to be published [20].