Internet
Fact-checked

At EasyTechJunkie, we're committed to delivering accurate, trustworthy information. Our expert-authored content is rigorously fact-checked and sourced from credible authorities. Discover how we uphold the highest standards in providing you with reliable knowledge.

Learn more...

What is a Hexadecimal?

Brendan McGuigan
Brendan McGuigan

Hexadecimal is a base-16 counting system, meaning that each digit represents sixteen different numbers, as opposed to the ten numbers in our base-10 system. The system is generally represented using the numbers 0-9 for the first ten digits, and then the letters A-F for the next six digits. It is not a historical counting system, but has its origins in the electronic age, as it is a fairly user-friendly way to expand on a binary system.

Computers operate using a simple base-2 counting system, called binary. This, however, can get fairly cumbersome for humans to interact with. Hexadecimal offers a more efficient way to relate to binary values. This is because sixteen is two to the fourth power, so that a single digit can be looked on 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 eight digit value in binary can be expressed in two digits of hex, and so on. This is in contrast to the base-10 system we commonly use, which would not evenly match binary digits in any consistent multiple.

Red has the hexadecimal value #FF0000.
Red has the hexadecimal value #FF0000.

While there are larger base systems used in computing, such as the base-32 system, and the base-64 system, hex is substantially easier for most people to interact with, so it remains the most pervasive. Base-32 and base-64 both have applications in computing, but they are rarely used in anything, but the deepest levels of coding. Although it takes some getting used to, even non-programmers often find themselves using hexadecimal regularly, and quickly getting an aptitude for it.

For example, many designers who use graphic design programs become accustomed to the use of hexadecimal codes to represent the colors used. Hex is an ideal shorthand, because the color codes on most computers are made up of three values from 0 to 256, one for red, one green, and one for blue. The RGB, or red-green-blue, number 256 is simply 16 to the second power, and so can be expressed with two digits. So, for example, the color cobalt green can be represented with an RGB value of 61,145,64, or simply the hexadecimal value of #3D9140.

Counting in hexadecimal, as with any base system, is rather straight-forward, although it can look complex at first glance. Counting to fifty, for example, would look like: 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 finished on the number 32, but actually that is how the number 50 is represented in hexadecimal. Because hexadecimal is fundamentally based on the binary system, there are interesting simplicities 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.

Discuss this Article

Post your comments
Login:
Forgot password?
Register:
    • Red has the hexadecimal value #FF0000.
      By: picsfive
      Red has the hexadecimal value #FF0000.