The hexadecimal system is one of the most commonly used notations in computing to represent numbers, especially when working with memory addresses and other areas where a compact representation of long numbers is needed. At first glance, it may seem a bit complicated if you've never used it before, but once you understand the basics, converting decimal to hexadecimal will be a breeze.
To understand this conversion, it is necessary to keep in mind how both the decimal system, which is the one we use most on a daily basis, and the hexadecimal system, which has a set of additional symbols, work. In this article, we will provide you with the steps and details necessary to understand how to do these conversions without relying exclusively on automatic tools.
What is the decimal system?
The decimal system, or base 10, is the most used by humans in their daily lives because we have ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. Each position in a decimal number represents a power of 10 depending on its place, that is, the number 235 is read as two hundred thirty-five because it is the sum of 2 * 10 ^ 2 + 3 * 10 ^ 1 + 5 * 10 ^ 0. This system is intuitive and easy for people to use.
What is the hexadecimal system?

The hexadecimal system, or base 16, is a compact notation that uses both digits and letters to represent numbers. The first ten values ​​(0 through 9) are the same as the decimal system, but then come the letters: A, B, C, D, E, and F, which are equivalent to the values ​​10, 11, 12, 13, 14, and 15 respectively. The use of letters allows larger numbers to be represented with fewer digits than in the decimal system.
For example, to represent the number 255 in decimal we only need two digits in hexadecimal: FF. In fact, due to this compactness, the hexadecimal system is widely used in computing contexts where binary numbers are handled, since it is easier for humans to interpret than reading a long string of 1s and 0s.
Steps to convert from decimal to hexadecimal
Now that we understand the two systems, we can learn how to convert a number between them. The process of converting from decimal to hexadecimal involves a series of successive divisions between the decimal number we want to convert and 16, until the quotient is zero. Each remainder of the division is converted to the hexadecimal equivalent.
Conversion example: Imagine we want to convert the number 196 from decimal to hexadecimal. First, we divide 196 by 16:
196 ÷ 16 = 12 with a remainder of 4. 12 is represented by the letter C in hexadecimal, and the 4 remains as is, so the result is C4.
This same process can be repeated for any larger number, and the important thing is to remember to replace the remainders with the corresponding letters when they exceed 9.
Direct algorithm for conversion
Another way to perform the decimal to hexadecimal conversion is by using a more direct procedure, which in computing is known as an algorithm. This process automates the idea of ​​successive divisions without having to try to find which power of 16 best fits the decimal number.
For example, if we want to convert the number 213 to decimal, we calculate: 213 ÷ 16 = 13, with a remainder of 5. 13 in hexadecimal is represented by the letter D, therefore, the number 213 in decimal translates to D5 in hexadecimal. As you can see, this method allows us to make the conversion quickly and efficiently.
Decimal to hexadecimal conversion table
Below is a table that serves as a quick reference for converting small numbers from decimal to hexadecimal:
| Decimal (Base 10) | Hexadecimal (Base 16) |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
| 7 | 7 |
| 8 | 8 |
| 9 | 9 |
| 10 | A |
| 11 | B |
| 12 | C |
| 13 | D |
| 14 | E |
| 15 | F |
Remembering this table will help you make quick conversions, especially for small numbers. Also, when looking at the growth patterns between the bases, you'll notice that every time you move up a position in hexadecimal, it's like adding more power of 16, which makes the number grow faster compared to decimal.
Source: LasMatesFaciles.com
Automatic tools to convert decimal to hexadecimal
Finally, while doing the conversion manually is a great way to understand both bases, there are also online tools that can do the job for you automatically. These tools allow you to enter a decimal number and get its hexadecimal equivalent with a single click.
Platforms such as conversion calculators or even some mobile apps can be of great help if you need to speed up the process. However, knowing the procedure will allow you to understand how these tools work internally.
It is important to note that while you can use these calculators, it is beneficial to know the steps we have explained because they will allow you to better understand how the hexadecimal numbering system works.