Decimal-to-hexadecimal conversion can be approached through two methods: direct column-based division or an intermediate conversion through binary. Both techniques produce the same result and provide a foundation for working with hex values in IT and cybersecurity contexts.
Decimal to Hexadecimal Conversion
One method that we can use to convert from decimal to hexadecimal is the same method that we used when we converted from decimal to binary.
So if I have a number — let's say we're going to do 62 in decimal form to hexadecimal — I can go down each column and say, is there a 65,000 in there? No, there isn't. Is there a 4,000 in there? No. Is there a 256? No. Is there a 16? Well, yes there is. In fact, there's multiple 16s in there. So that's the only difference here: you could have multiple, because it's not just a one or zero, so we could actually have multiple 16s in here.
So how many 16s do we have in here? Well, I know it's not 4, because that's 64. So it's 16 times 3 is 48, so there are three 16s in there, and I've got to subtract those out. So I'm going to do 62 minus 48, and then we come up with 14 for that. So now what goes into the ones column? Well, 14 does, but 14 in hexadecimal is E. So the equivalent to 62 is 3E.
That's one way of doing our conversion. The other way that we can do our conversion, or at least the other way that I'm going to teach right now, is we can switch to binary and then we could switch to hexadecimal.
So if I were to switch to binary, what I could do is I could say, okay, if we've got 62, do I have a 32 in there? Well, yes I do, so minus 32 from there, and then that gives me 30 left. Do I have a 16 in there? Yes I do, so minus 16, and then that leaves me with 14 left. Do I have 8 in there? Yes I do, so minus 8, and that leaves me with a 6 left. Do I have a 4 in there? Yes I do, so then that leaves me with a 2 left. Do I have a 2? Yes I do, so that leaves me with zero. So there I have it, there's the conversion so far to get into my binary number.
Now I can convert that to hexadecimal. So this right here is three, and 1110 is E. So now I have 3E as the answer.
There is a list of decimal numbers right there. Go ahead and go through that list of decimal numbers and figure out what the hex numbers are associated with those. There are the answers — go ahead and check out your answers.
Hopefully that went well. We're not going to get real in depth later on about converting from decimal to hexadecimal and vice versa, so you don't have to go real in depth into this. Make sure you have the basic understanding and can do it, but it's not going to be critical moving forward.
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 →