Hexadecimal is a base-16 numbering system used throughout computing to represent data more concisely and readably than binary or decimal. This topic covers how the system works, why it exists, and where it appears in real-world IT environments.
Hexadecimal Overview
We're used to the decimal system, and now we're hopefully used to the binary system. Let's go over the hexadecimal system and do some comparison with those other two. Then we're going to get into why we even use hexadecimal when we've got these other numbering systems, we're going to get into base 16 and what base 16 looks like, and we'll wrap things up by talking about the different places you can find hexadecimal numbers.
Decimal is a system that you are most likely used to working with on a daily basis, and we talked about how there's the thousands, hundreds, tens and ones column. If you have one in the hundreds column, that means you have 1 times 100, and you add that to 4 times 10, and you add that to 8 times 1, to come up with 148. So that's how the decimal system, or a base 10, works.
We related that to binary, which is base two, so we take whatever number is part of that column and multiply it by whatever is right here to come up with what you have. In this case it's 1 times 8, plus 1 times 4, plus 0 times 2, plus 1 times 1, which, if we were to add that up — 8 plus 4 is 12, plus 1 is 13 — so this would equate to 13. So that's when we were working with binary numbers.
Hexadecimal is base 16, so it goes by multiples of 16. Here we have a four in the 4,096 column, a 5 in the 256, a 7 in the 6 16, and a one in the one column. So if we wanted to figure out what this number actually equals, we'd do 4 times 496, plus 5 times 256, plus 7 times 16, plus 1 times 1, and then that would be the answer in decimal value.
You can see that the same rules apply to these hexadecimal numbers as what we've been learning. It's just that we count from 0 through 15 before we carry over a bit, or we carry over something to the next column. So it works very similarly, but it's just base 16, so it operates a little differently and it looks a little different.
Once you've worked with hexadecimal numbers for a while, you really start getting the hang of it and start seeing the advantages of using it. It's really close to binary, and therefore really close to computer language, and so we can make easy translations with things on your computer to numbers. The numbers tend to be more readable than both decimal and binary numbers, and they tend to be shorter, and sometimes converting from one to another of these can be a lot easier. So we're going to go through hexadecimal and play around with these numbers, and you'll start seeing the advantages of why it can really condense what is being represented and what is being shown.
One reason why hexadecimal is so prevalent out there is because it is closely related to binary numbers — it's closely related to those ones and zeros that your computer speaks. Where we're used to, with binary numbers, having eight bits in a byte of information, with hexadecimal we only have two. So we essentially split the byte into these two sections here; we call those nibbles. We break it down into smaller sections, making our number shorter and easier to read, and that's both the advantage of hexadecimal and why it's so prevalent out there.
Hexadecimal is base 16, so our columns do look a little different. We've got 16 to the zeroth power, which is one. We've got 16 to the first power, which is 16. We've got 16 to the second power, which is 256. So it follows the same convention of what we had before, except these numbers are multiplied by 16.
Then two of these columns would be one byte, so this would be a byte and this would be a byte. That makes sense, because if we do 16 times 16, that's 256, so this has the potential of representing 256 possibilities there.
Where do you see these? A lot of times, rather than representing things like ASCII characters in their binary number, which is eight bits long and can be a little bit cumbersome to read, hex looks a lot smaller. You can see how hex looks right here, so it's just a more readable way of presenting this same information when it comes to ASCII.
We also see it really common with colors. We went over before the binary and the decimal equivalent; well, this right here is the hex equivalent, and we can see the hex equivalent in here is much shorter and easier to read. So representing colors and pixels is one of those ways that we do use this. Notice that the beginning of this says 0x — that's one of the signals that this is a hexadecimal number.
IP version 6 also uses hexadecimal numbers, and so you can see here all of the characters that you would find in hexadecimal, which is 0 through 9 and A through F, can be found in here as well. Now, if we were to actually see this in binary form, we could see that it would be a big number and much harder to work with, and even if we were to convert this into decimal form, it's a crazy number as well. So yes, it's much easier to read and work with these hexadecimal numbers.
We covered some comparisons, to compare it to things that we're hopefully familiar with now, like binary numbers. We talked about why hexadecimal numbers are used: it's much easier to read and display information. We went into some areas where you can use it, such as color palettes, such as ASCII, such as IP version 4. There's a lot of areas where you've probably seen it around — if you work with things like memory, you'll see it on the memory, and other areas as well. So there is a good basis, a good starting point, for our talks about hexadecimal.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →