TechKnowSurge
CompTIA Tech+ 1.1
VideoComputeFree

DEMO: Decimal to Hexadecimal

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.

Complete this video to capture a CTF flag worth 1 point.

About this video

Hexadecimal is a base-16 numbering system widely used in computing to represent binary data in a compact, human-readable format. Converting a decimal number to its hexadecimal equivalent is a fundamental skill in IT and cybersecurity, appearing in contexts ranging from memory addressing to packet analysis and color encoding. The first conversion method mirrors the technique used when converting decimal to binary. Starting with the largest relevant power of 16, the process determines how many times that value fits into the decimal number, records that count as a hex digit, subtracts the product, and repeats with the next lower power. Because hexadecimal is base 16 rather than base 2, each digit position can hold a value from 0 to 15, with the letters A through F representing values 10 through 15. For example, the decimal number 62 contains three 16s with a remainder of 14, which maps to the hex digit E, yielding the hexadecimal value 3E. The second method routes the conversion through binary as an intermediate step. The decimal number is first converted to its binary equivalent using the standard power-of-2 subtraction process. The resulting binary string is then divided into groups of four bits, called nibbles, reading from right to left. Each nibble corresponds directly to a single hexadecimal digit, making the final conversion straightforward. Applying this to 62 produces the binary value 00111110, which splits into the nibbles 0011 and 1110, mapping to 3 and E respectively, again giving 3E. Both methods are valid, and building comfort with each one strengthens overall number-system fluency.

What you'll learn

What's covered

Decimal to Hexadecimal Conversion

Aligned to

CompTIA Tech+
1.1 Compare and contrast notational systems.

Key terms

Hexadecimal
Hex
A base-16 number system using digits 0–9 and letters A–F; each hex digit maps to exactly 4 bits, making it a compact shorthand for representing binary data.
Decimal
The base-10 number system using digits 0–9; the standard system used in everyday counting and arithmetic, and the most common format for presenting numeric output to humans.
Binary
The base-2 number system that uses only the digits 0 and 1; the native language of digital computers, which store and process data as electrical on/off states.

Transcript

Using the Column Method

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.

Converting Through Binary

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.

Practice

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.

About TechKnowSurge

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 →