Hexadecimal is a base 16 counting system, using digits 0-9 and letters A-F. It’s used to relate to binary values, with each digit representing four binary digits. It’s commonly used in computing, including graphic design programs for color codes. Counting in hexadecimal is straightforward, with interesting simplifications when working with powers of two.
Hexadecimal is a base 16 counting system, which means that each digit represents sixteen different numbers, as opposed to the ten numbers in our base 10 system. The system is usually represented using the numbers 0-9 for the first ten digits and then the letters AF for the next six digits. It’s not a historical counting system, but it has its origins in the electronic age, as it’s a fairly intuitive way to expand on a binary system.
Computers work using a simple base-2 counting system, called binary. This, however, can get quite complicated for humans to interact with. Hexadecimal offers a more efficient way of relating to binary values. This is because sixteen is two to the fourth power, so a single digit can be thought of as four binary digits. To put it another way, any four-digit value in binary can be expressed in a single digit of “hex,” and an eight-digit value in binary can be expressed in two digits of hexadecimal, and so on. This is in contrast to the base 10 system we commonly use, which would not match binary digits uniformly in any consistent multiple.
While there are larger base systems used in computing, such as the base-32 system and the base-64 system, hexadecimal is substantially easier for most people to interact with, so it remains the most pervasive. Both base 32 and base 64 have applications in computing, but are rarely used in anything but the deepest levels of coding. While it takes some getting used to, even non-programmers often find themselves using hexadecimal on a regular basis and quickly gaining an aptitude for it.
For example, many designers using graphic design programs get used to using hexadecimal codes to represent the colors used. Hex is an ideal shorthand, because the color codes on most computers consist of three values from 0 to 256, one for red, one for green, and one for blue. The RGB, or red-green-blue, number 256 is simply 16 to the second power, and therefore can be expressed in two digits. So, for example, the color cobalt green can be represented with an RGB value of 61,145,64, or simply with the hexadecimal value of #3D9140.
Counting in hexadecimal, as with any basic system, is pretty straightforward, even though it may seem complex at first glance. For example, counting to fifty would be: 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, 1C, 1D, 1E, 1F, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 2A, 2B, 2C, 2D, 2E, 2F, 30, 31, 32. Note that it looks like the count ended on the number 32, but that’s actually how the number 50 is represented in hexadecimal. Since hexadecimal is basically based on the binary system, there are some interesting simplifications that appear when we work with powers of two. For example, 24 is simply 10, 25 is 20, 26 is 40, 27 is 80, 28 is 100, 29 is 200, and so on.
Protect your devices with Threat Protection by NordVPN