Hexadecimal

February 11, 2021

Remember, the decimal system is a base 10 number system – it uses symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.

In contrast, the hexadecimal is a base 16 number system – it uses symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. A – F represents the values 10 – 15.

In the decimal system,

means

In the hexadecimal system,

means

Also, in hexadecimal,

means
Remember,
represents

At first, Bob wasn't too happy about the hexadecimal notation. In particular, he heavily disliked the letters. Why not simply use numbers from

to

But yeah, there is a good reason for it, Bob realized. Just look at

If symbols like
could be used in hexadecimal, what exactly is
then? Is it
Or is it

Bob decided perhaps there is no need to question every decision computer scientists ever made.

Or ... wait. Why not just use two places for each symbol? The symbols from

to
can be simply padded with one zero. Like
instead of
would just stay

You could avoid letters this way! Except that this might not be as efficient as the traditional hexadecimal system. For example, we would have

instead of
Nevertheless, Bob wouldn't be surprised to see computer scientists switch to his hexadecimal system entirely one day.

The Alice and Bob newsletter

Get highlights of Alice and Bob's adventures delivered to your email box.

Made by XLAB with ❤️
Follow us
Twitter Twitter