writing

Encoding hexadecimal numbers with 10 digits

Suppose we only have 10 digits: 0123456789, ordinarily used to express decimal numbers, such as:

decimal
1
12
57
128
1000
5598

Except we need to use them to express hexadecimal numbers which have 16 digits: 0123456789abcdef. Hexadecimal equivalents of the above numbers would be:

decimalhexadecimal
11
12c
5720
12880
10003e8
559815de

We can see that we are short by 6 digits: abcdef. We need some way to express these with the 10 digits that we do have, while still being able to express the original 10 digits.

One solution to this problem is to use digraphs.

For example, we can take 0 out of the pool of the available digits and use it as a mark to start a digraph. Once we do this, we can easily express the 16 digits as follows:

hexadecimal digitdecimal-encoded hexadecimal digit
000
a01
b02
c03
d04
e05
f06

Using this system we can express the numbers above as follows:

decimalhexadecimaldecimal-encoded hexadecimal
111
12c03
5720200
12880800
10003e83058
559815de150405

© 2022 Darius J Chuck