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:
decimal | hexadecimal |
---|---|
1 | 1 |
12 | c |
57 | 20 |
128 | 80 |
1000 | 3e8 |
5598 | 15de |
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:
1
thru 9
stand for themselves.hexadecimal digit | decimal-encoded hexadecimal digit |
---|---|
0 | 00 |
a | 01 |
b | 02 |
c | 03 |
d | 04 |
e | 05 |
f | 06 |
Using this system we can express the numbers above as follows:
decimal | hexadecimal | decimal-encoded hexadecimal |
---|---|---|
1 | 1 | 1 |
12 | c | 03 |
57 | 20 | 200 |
128 | 80 | 800 |
1000 | 3e8 | 305 8 |
5598 | 15de | 1504 05 |
© 2022 Darius J Chuck