What is the decimal number system?
The decimal number system, also known as the base-10 system, is the most common numeral system used in everyday life. It consists of ten digits — from 0 to 9 — and each digit’s position determines its value based on powers of ten. For instance, in the number 523, the digit 5 is in the hundreds place, which equals ; the digit 2 is in the tens place, ; and the digit 3 is in the ones place, . Thus, adding these values together gives .
This positional value system is straightforward because it matches how human understanding of number counting originated — using ten digits corresponding to ten fingers.
What is the hexadecimal number system?
The hexadecimal number system, or base-16 system, is widely used in computing and digital electronics because of its close relationship with binary code. Instead of ten symbols, it uses sixteen. The first ten symbols are the same as in the decimal system (0–9), but to represent values from ten to fifteen, letters A–F are added:
| Decimal | Hexadecimal |
|---|---|
| 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 |
Hexadecimal is particularly useful for human readability of binary data. One hexadecimal digit corresponds directly to four binary digits, also called bits. This means converting between binary and hexadecimal is simple — each group of four bits directly translates to one hexadecimal digit.
Step-by-step conversion process
- Write down the hexadecimal number.
- Assign each digit its decimal equivalent.
- Multiply each digit by 16 raised to the power of its positional index, starting from 0 at the rightmost position.
- Add all the results together.
This step-by-step manual method is precisely what an automatic converter performs instantly.
Examples
Example 1
Convert hexadecimal 101 to decimal.
Break down:
so .
Therefore, .
Example 2
Convert octal number FF to decimal.
So .
In binary, this also equals 11111111, which represents one byte of maximum value in 8-bit systems.
Example 3
Convert decimal number 513 to hexadecimal.
Decimal to hexadecimal:
| Division by 16 | Quotient | Remainder |
|---|---|---|
| 513 ÷ 16 | 32 | 1 |
| 32 ÷ 16 | 2 | 0 |
| 2 ÷ 16 | 0 | 2 |
So, .
Historical background
The idea of hexadecimal notation appeared with the development of digital computers in the mid-20th century. Because binary numbers, consisting only of 0s and 1s, are cumbersome for human processing, engineers introduced base-16 as an efficient shorthand. Early programming languages and computer systems — for example, IBM mainframes and later C-based languages — adopted hex representation for addresses, machine instructions, and color codes.
In modern computing, hexadecimal notation is standard in web design (for example, #FF5733) and in debugging tools, firmware development, and memory addressing.
Conversion in everyday context
While hexadecimal values might seem abstract, they appear frequently:
- Color codes in web design:
#FFFFFF(white) or#000000(black). Each pair of characters corresponds to a color intensity for red, green, and blue channels. - Computer memory addresses: such as
0x1A3F. - Error codes from hardware or software diagnostics. Understanding how to interpret or convert them can make troubleshooting and data analysis more intuitive.
Frequently asked questions
How to convert the hexadecimal value 3e7 to decimal?
.
Therefore, .
How many decimal numbers correspond to hexadecimal digits A through F?
The letters A to F represent decimal numbers from 10 to 15. Thus, six decimal values (10, 11, 12, 13, 14, 15) correspond to hexadecimal A–F.
Why is hexadecimal used in programming?
Because one hexadecimal digit equals exactly four binary bits, it simplifies how binary sequences are represented, read, and debugged. For example, 11111111 in binary can easily be written as FF in hexadecimal.
How to check the correctness of a hexadecimal to decimal conversion?
After calculating the decimal value, convert it back into hexadecimal by repeatedly dividing by 16 and recording remainders. If you return to your original hex digits, the conversion is correct.
2022 from decimal to hexadecimal
Let’s convert the decimal number 2022 to hexadecimal.
| Division by 16 | Quotient | Remainder |
|---|---|---|
| 2022 ÷ 16 | 126 | 6 |
| 126 ÷ 16 | 7 | 14 (E) |
| 7 ÷ 16 | 0 | 7 |
The remainders from bottom to top give: .