For example, in the hexadecimal base (16), the letters A through F are included as digits, but why? This letter thing happens in bases greater than ten. For example, in the hexadecimal base, C is 12 in the decimal base and E is 14 in the decimal base. Also, in base 20, the letters A through J are included as digits. Why are there letters for extra digits in bases greater than ten? I'm thinking your answers will be "positive!"
7 Answers
Why are there these crazy symbols $\Large \;\mathbf{2}$, $\;\Large \mathsf{3}$, $\Large \;\mathit{4}$, ... $\Large\;\mathtt{9}$ in bases greater than base 10?
("10" of course denoting the number of eyeballs most people have.)
The point is, how would you explain these symbols to someone who had only ever heard of binary representation? Here's what I would say.
I know you've only ever used $0$ and $1$ before, but long ago some people agreed on arbitrary additional symbols to represent the numbers $10$ (the number of dots in ${:}$) through $1001$ (the number of dots in ${:}{:}{:}{:}{\cdot}$), and in fact you can make a perfectly fine numeral system where instead of counting $$0, \quad 1,\quad 10,\quad 11,\quad 101,\quad\ldots$$ like normal, you instead continue by using these arbitrary symbols $$0,\quad 1,\quad 2,\quad 3,\quad 4,\quad 5,\quad\ldots$$ and only write the symbol $10$ when you run out of extra symbols. The place where you run out is called the base of the numeral system.
- 2,167
-
4
-
4
-
-
9Four whatever reason, I feel compelled to point out that four most people, skipping a number can hardly be described as "normal" counting.... – Jeff Nov 01 '14 at 07:10
-
9I like this one a lot, but it probably has the problem that being understandable only by those that already know the answer (i.e., it is excelent reading to consolidate the knowledge, not to get it in the first place) – Rolazaro Azeveires Nov 01 '14 at 09:44
-
1"There are 10 kinds of people in the world: those who understand binary and those who don't!" Source unknown... – DJohnM Nov 02 '14 at 16:50
We need to distinguish between the symbol $10$, which means the number $1\cdot b + 0\cdot b^0$ in base $b$, and the number which we designate by $10$ in our normal arithmetic, by which I mean the tenth positive integer.
In hexadecimal, $10$ should mean $1\cdot 16 + 0\cdot 16^0$, which is the sixteenth number. If you want to refer to the tenth integer, you need to give it a name. We give it the name $A$, but really it just needs any name and we are only so creative, it seems.
- 91,687
-
-
7I think this is more an issue of familiarity and convenience rather than creativity. Sure, you could denote the digit $A$ by 数 (or a little pink elephant, or whatever), but that would not be easy to remember (or to write!) for most people (particularly those in the west). It's worth mentioning that there is an alternative: most people are used to sexagesimal (base 60) number system written using the decimal, in the form $xx:yy:zz$. – tomasz Nov 01 '14 at 00:16
-
4Hexadecimal was in use back in the bad old days of punch cards, paper tape, and line printers. The only characters that were universally available were the digits, capital letters, space, and a very restricted set of punctuation marks that tended to be heavily overloaded. 0-9A-F was the least bad of several bad choices. – Patricia Shanahan Nov 01 '14 at 16:07
-
6@Patricia: I still use hexadecimal just about every day in my programming work, as do many programmers. And I don't consider 0-9A-F to be a bad choice at all. – TonyK Nov 01 '14 at 20:08
-
@TonyK With richer character sets I would have preferred modified forms of the digits 0 through 5 to represent 10 through 15. – Patricia Shanahan Nov 01 '14 at 20:32
-
1
-
@TonyK The modification should not need very good eyesight. For example, in many mathematical contexts a symbol may be modified by the addition of a bar over it. When I first started programming, we used to put a line through one of capital O and zero to distinguish them on coding sheets. – Patricia Shanahan Nov 01 '14 at 21:33
-
@TonyK However, it was a terrible choice to place
:;<=>?@between'9'and'A'in ASCII. – Daniel Fischer Nov 01 '14 at 21:49 -
2@DanielFischer: That's the price of having the numeric and alphabetic character ranges neatly aligned in blocks of 16 and 32 characters -- you get some awkward spare slots at the ends of the ranges that need to be filled with more or less random punctuation. On the other hand, the decision to align the ranges like that meant that conversion between uppercase and lowercase letters and control codes (and between decimal digits and their numeric values) could be implemented by simple bit flipping, without the need for more complicated addition circuits. – Ilmari Karonen Nov 01 '14 at 22:48
-
@DanielFischer: As Ilmari pointed out (What is the idea behind ^= 32, that converts lowercase letters to upper and vice versa?), that's an unfortunate tradeoff for other good properties, like
'A' ^ 'a' == 0x20for any letter, and for the digit ASCII codes to have their low 4 bits equal to the integer they represent. We could have had'9' = 'A'-1 = 0x40, but that would mean AND/OR wouldn't work to go between'1'and1, only ADD/SUB. – Peter Cordes Sep 18 '22 at 05:56 -
(Probably if ASCII had made that choice, they'd have started the alphabet at 0 with
'A' = 0x40instead of the actual0x41, so the digits'0' .. '9'could be0x36 .. 0x3f, themselves within one aligned partition. I forget how early ASCII was; at that point octal may still have been more popular, as many machines had 18 or 36-bit words, multiples of 9 and thus 3. So the minor inconvenience of hex conversion might not have been given much weight when designing ASCII.) – Peter Cordes Sep 18 '22 at 05:59
When Fibonacci introduced the Indo-Arabic system in his Liber Abaci, he draw the digits inspired from the shapes used by the Arabs. At that time they were just weird symbols and it took time for people to get used to them.
It has then become customary use a limited set of them for the binary system or systems with base less than ten (I write it in letters on purpose). There's no particular reason, one could decide that @ and ! are the symbols for zero and one in the binary system: any two symbols would be as good. Using $0$ and $1$ is better because we need no “translation”.
For the hexadecimal system we need sixteen distinct symbols; we already have ten for denoting the numbers from zero to nine, so it's natural to use them and it remains to choose other six. Letters have an established ordering, and this is the simple reason why they were chosen.
The Babylonians used a base sixty system, so they needed as much distinct symbols. Their choice was to make up them with two base symbols (for one and ten) grouping them in a clever way

For zero the symbol was

A similar system was used by the Mayas who used base twenty:

Note that both systems were quite good for addition: in the Mayan system, five dots became a bar and four bars implied carrying a dot to the next column.
As you see, there's no need of using letters, it's just a convenience.
- 238,574
-
1And all these historical systems were better for arithmetics than the roman numerals. – orion Oct 31 '14 at 23:14
-
2@orion Not really for multiplication: one had to remember $59\cdot 60/2=1770$ elementary multiplications, with the Babylonian system and $190$ for the Mayan against the $45$ of the decimal system. The Romans used the tabula calculatoria (a form of abacus) for doing sums, which actually used the decimal system, but they couldn't the final step. – egreg Oct 31 '14 at 23:18
-
1I just thought I'd point out that typically when we order strings of alphanumeric characters alphabetically in English, the convention is to order numbers before letters also - so in this sense the character "a" comes directly after the character "9", which means there is even less translation required for most people. I'm not sure when this convention arose, but it is handy. – Jeff Nov 01 '14 at 07:15
Well you have to use some symbols because the conventionally used digits only go up to $9$. You could just invent new symbols, but then typesetters, font makers and students learning the notation would curse your name for decades and centuries after you die. It's better to just use what we already have (although I myself don't like this that much).
- 15,781
Of course you could write the number 65535 (FFFF in conventional base-16 representation) as $<15; 15; 15; 15>_{16}$ or something like that; it's clear, it's general-purpose, and it works beyond base-36, but it's just less convenient.
- 357
Teaching kids about the idea that you can represent numbers in bases other than the 10 we grew up with raises really interesting philosophical questions about distinguishing between a number and the name we give that number. Once they realize that you need as many digits as the base and that the next number will be written as "10" you have to struggle to remind them not to read that out loud as "ten".
I know you're not supposed to provide answers as links, but if you want to read more about some of my experience along these lines, try http://www.cs.umb.edu/~eb/sam/duodecimal/ssegm.pdf .
- 95,224
- 7
- 108
- 199
-
1For a period of time (in the 1960s), US schools actually did make a big deal about the difference between "numbers" and "numerals". This was part of so-called "new math" curriculum that seems to have failed pretty badly, as most of the "new" stuff has since been backed out. – cHao Nov 01 '14 at 23:10
I think the reason is that they want 1 symbol for each value , but personally I don't like it because of confusion . So instead of writing 1A20 , write 1 11 2 0 with the symbols >9 not written as letters. This makes it easier to convert between bases and is more convenient.
- 1
- 1
00,01, …,99. If you do that, then the base-100 representation of, say, 142857, is the three digits14 28 57. This kind of system is ubiquitous in computer applications. The Bablyonians used a similar technique for their base-60 system, where the 60 'digits' were effectively00,01, …,59, as described below. You can read more about it in this thread. – MJD Oct 31 '14 at 23:03– Mathster Nov 01 '14 at 20:15