Hexadecimal To Decimal
Have you ever seen numbers that use letters like 'A' or 'F'? Welcome to the world of hexadecimal! This lesson will show you the simple and fun way to translate these special 'hex' numbers into the regular decimal numbers you use every day. It's like learning a secret code for computers!

What Is the Hexadecimal Number System?
The hexadecimal number system is a way of counting that uses a base of sixteen, which means it has sixteen unique symbols to represent numbers. Our everyday number system, called decimal or base-10, uses ten symbols: a ten-digit system with digits from 0 to 9. Hexadecimal, often shortened to just 'hex', uses the same ten digits (
So, why add letters? In a base-10 system, once you count past 9, you add another digit to the left to make 10. You're using two symbols ('1' and '0') to represent the number ten. In hexadecimal, you need a single symbol for every value up to fifteen. Since we run out of number digits after 9, we use letters. Here’s what they stand for:
- A represents the value 10
- B represents the value 11
- C represents the value 12
- D represents the value 13
- E represents the value 14
- F represents the value 15
This might seem strange at first, but it's incredibly useful, especially for people who work with computers. To help you see the pattern, here is a table comparing the first sixteen numbers in decimal, hexadecimal, and binary (base-2), which computers use directly.
| Decimal (Base-10) | Hexadecimal (Base-16) | Binary (Base-2) |
|---|---|---|
| 0 | 0 | 0000 |
| 1 | 1 | 0001 |
| 2 | 2 | 0010 |
| 3 | 3 | 0011 |
| 4 | 4 | 0100 |
| 5 | 5 | 0101 |
| 6 | 6 | 0110 |
| 7 | 7 | 0111 |
| 8 | 8 | 1000 |
| 9 | 9 | 1001 |
| 10 | A | 1010 |
| 11 | B | 1011 |
| 12 | C | 1100 |
| 13 | D | 1101 |
| 14 | E | 1110 |
| 15 | F | 1111 |
After F (fifteen), hexadecimal works just like decimal: you add a digit to the left. So, the number after F is 10. But be careful! In hex, '10' doesn't mean ten. It means one group of sixteen and zero ones, which is sixteen in decimal!
Why Do People Use Hexadecimal Numbers?
You might be wondering why we need another number system when our regular decimal system works just fine. The main reason is that hexadecimal is a much more human-friendly way to represent the numbers that computers use. Computers don't think in base-10; they think in binary (base-2), which is a system with only two digits: 0 and 1.
A long string of binary numbers like
You see hexadecimal used in many digital places:
- Web Colors: Have you ever seen a color code like #FF0000? That's a hexadecimal number! It tells the computer how much red, green, and blue to mix to make a specific color. #FF0000 is pure red.
- Error Messages: Sometimes, when a computer program crashes, it will show an error code with hex numbers to help programmers figure out what went wrong.
- Memory Addresses: Every piece of information in a computer's memory has an address, like a house number on a street. These addresses are often shown in hexadecimal because they can get very long.
So, while you won't use hex to buy groceries, it's a fundamental language for programming, web design, and understanding how digital technology works.
How Does Place Value Work in Hexadecimal?
Understanding place value is the key to converting numbers between any base. Let's quickly review how it works in our familiar decimal (base-10) system. When you see a number like
Starting from the right:
- The first spot is the ones place:
- The second spot is the tens place:
- The third spot is the hundreds place:
So,
Hexadecimal (base-16) works exactly the same way, but instead of powers of ten, we use powers of sixteen. The place values increase by a factor of 16 as you move from right to left.
Starting from the right:
- The first spot is the ones place:
- The second spot is the sixteens place:
- The third spot is the two-hundred-fifty-sixes place:
- The fourth spot is the four-thousand-ninety-sixes place:
Let's look at a hex number like
So, the number
What Is the Step-by-Step Method for Conversion?
Converting a hexadecimal number to its decimal equivalent is a straightforward process once you understand place value. You can follow these simple steps every time to get the correct answer. We'll use the hexadecimal number
- Write Down the Hexadecimal Number:
First, just write the number you want to convert. Let's use . - Assign Place Values:
Starting from the rightmost digit, assign the correct power of 16 to each place. The rightmost digit is always , the next one to the left is , the next is , and so on.
For :
The is in the (or ones) place.
The is in the (or sixteens) place.
The is in the (or 256s) place. - Convert Letters to Decimal Values:
Look at your hex number. If you see any letters (A-F), convert them to their decimal number equivalents (10-15).
In , the digit is equal to in decimal. The other digits, and , are the same in both systems. - Multiply Each Digit by Its Place Value:
Now, take the decimal value of each digit and multiply it by its corresponding place value.
For :
Digit :
Digit (which is 10):
Digit : - Add the Results Together:
The final step is to add up all the values you calculated in the previous step. This sum is the final decimal number.
For : .
So, the hexadecimal number
Let's Work Through Some Examples
Practice makes perfect! Let's walk through a few more examples together, from simple to a bit more challenging. Seeing the method in action is the best way to learn.
Convert the hexadecimal number 8C to decimal.
Step 1 & 2: Identify Digits and Place Values
The number is
The digit
The digit
Step 3: Convert Letters to Numbers
The digit
Step 4: Multiply Digits by Place Values
For the digit
For the digit
Step 5: Add the Results
So, the hexadecimal number
Convert the hexadecimal number 40E to decimal.
Step 1 & 2: Identify Digits and Place Values
The number is
The digit
The digit
The digit
Step 3: Convert Letters to Numbers
The digit
Step 4: Multiply Digits by Place Values
For the digit
For the digit
For the digit
Step 5: Add the Results
So, the hexadecimal number
Convert the hexadecimal number BEEF to decimal. (Yes, you can spell words with hex!)
Step 1 & 2: Identify Digits and Place Values
The number is
The rightmost
The
The next
The
Step 3: Convert Letters to Numbers
The digit
The digit
The digit
Step 4: Multiply Digits by Place Values
For the digit
For the first
For the second
For the digit
Step 5: Add the Results
So, the hexadecimal number
What Are Some Common Mistakes to Avoid?
When you're first learning to convert from hexadecimal to decimal, it's easy to make a few common mistakes. Being aware of these pitfalls can help you avoid them and improve your accuracy.
- Forgetting the Letters are Numbers: The most common error is seeing a letter like 'C' and not knowing what to do with it. Always remember to convert A, B, C, D, E, F to their decimal values 10, 11, 12, 13, 14, 15 before you start multiplying.
- Mixing up Place Values: Sometimes students accidentally use powers of 10 instead of powers of 16. Remember, in hexadecimal, every place value is 16 times bigger than the one to its right. It's the 1s, 16s, 256s place, not the 1s, 10s, 100s place.
- Starting Place Values from the Left: Place value always starts from the right. The rightmost digit is always in the
(ones) place. Don't start counting powers from the left side of the number. - Calculation Errors: The multiplication and addition can sometimes involve large numbers. Take your time and double-check your math, or use a calculator to check your final answer once you've written out all the steps. The goal is to learn the process, not just get the number.
- Confusing
and : A key math rule is that any number raised to the power of 0 is 1 (so ). And any number to the power of 1 is just itself (so ). Don't mix these two up!
By keeping these points in mind, you'll find the conversion process much smoother and more reliable.
Quick Summary and Reference
Here is a quick summary of the key information you need to convert hexadecimal numbers to decimal. You can use this as a quick reference guide when practicing.
The Core Idea:
To convert a hexadecimal number to decimal, you multiply each hex digit by its place value (which is a power of 16) and then add all those products together.
The Steps:
- Identify the place value for each digit, starting with
on the right. - Change any letter digits (A-F) to their decimal number values (10-15).
- Multiply each digit's value by its place value.
- Add all the results to get the final decimal number.
Hexadecimal Digit Reference Chart:
| Hex Digit | Decimal Value |
|---|---|
| A | 10 |
| B | 11 |
| C | 12 |
| D | 13 |
| E | 14 |
| F | 15 |
Place Value Chart (Powers of 16):
| Position (from right) | Power of 16 | Decimal Value |
|---|---|---|
| 1st | 1 | |
| 2nd | 16 | |
| 3rd | 256 | |
| 4th | 4,096 | |
| 5th | 65,536 |
Frequently Asked Questions
What does the word 'hexadecimal' actually mean?
The word 'hexadecimal' is a combination of 'hexa' (from the Greek word for six) and 'decimal' (from the Latin word for ten). So, it literally means 'six plus ten', which adds up to the 16 that is the base of this number system.
Why does hexadecimal use letters instead of just more numbers?
A number system needs a single, unique symbol for each value up to its base. Since our familiar number symbols only go up to 9, we need six more symbols to represent the values 10, 11, 12, 13, 14, and 15. Using the letters A through F was the simplest and most widely adopted solution.
Can you convert from decimal back to hexadecimal?
Yes, you absolutely can! The process is different—it involves repeated division by 16 and keeping track of the remainders. It's like doing the conversion process in reverse to find out how many groups of 16, 256, etc., fit into your decimal number.
Where will I see hexadecimal numbers in real life?
The most common place is in anything related to computers and digital technology. You'll see them in web design for color codes (like #34A853), in Wi-Fi passwords, in computer error messages, and in programming to manage memory locations.
What is the biggest single digit in hexadecimal?
The biggest single digit in hexadecimal is F. It represents the decimal value of 15. After F, you need two digits to represent the next number, which is 10 in hex (meaning one sixteen and zero ones).
Is it possible to do math like addition or subtraction with hex numbers?
Yes, it is. You can add, subtract, multiply, and divide hexadecimal numbers directly without converting them to decimal first. It follows similar rules to decimal math, but you have to remember to 'carry over' when you reach 16, not 10.
Why is it important to learn about different number bases?
Learning about systems like hexadecimal and binary helps you understand how computers 'think' at a fundamental level. It's a key concept in computer science and digital logic, and it also strengthens your overall understanding of the math behind our own decimal number system.
Is a hex number like '9A' bigger than a decimal number like '99'?
Yes, it is. The hex number