Hexadecimal and Decimal Number Systems

Sarath G
3 min readJul 14, 2019

In this article, we will explore the hexadecimal and decimal number systems. First, let’s discuss the hexadecimal number system and decimal number system.

Hexadecimal Numbers

Hexadecimal numbers are numeral systems with a radix or base of 16. This means that the hexadecimal numbers are represented using 0–9 and A-F. In total, it includes 16 numbers (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F). Hexadecimal numbers are widely used in computing because they provide a more human-friendly representation of binary codes. The values A-F represent the decimal numbers 10–15 respectively, as shown in Figure 1.1.

A table which shows the decimal value of A,B,C,D,E,F as 10,11,12,13,14,15 respectively
Figure 1.1: A table showing the decimal value of A,B,C,D,E,F as 10,11,12,13,14,15 respectively.

Decimal Numbers

Decimal numbers are numeral systems with a radix or base of 10. This means that decimal numbers are represented using 0–9. The decimal number system consists of ten single-digit numbers (0,1,2,3,4,5,6,7,8,9). The number after 9 is 10 and the number after 19 is 20, and so on. The next number after 9 requires the addition of another positional digit (10 is the next digit after 9, which is a combination of 1 & 0). Likewise, the numbers after 9 require the addition of another decimal digit. The decimal numbering system is also called a positional numeral system.

Converting Hexadecimal to Decimal

To convert a hexadecimal number to decimal, we need to multiply each hexadecimal digit with the corresponding power of 16 and add up the results. We start from the rightmost digit of the hexadecimal number and work our way to the left.

For example, let’s convert the hexadecimal number A2B4 to decimal. Here’s the process:

  1. Start from the rightmost digit “4”. As 4 is a decimal number, we can write it as “4 x 1⁶⁰”.
  2. The next digit is “B”. Since B is not a decimal number, we use the table shown in Figure 1.1 to find its decimal value, which is 11. So we write it as “11 x 1⁶¹”.
  3. The next digit is “2”. As 2 is a decimal number, we can write it as “2 x 1⁶²”.
  4. The leftmost digit is “A”. Since A is not a decimal number, we again use the table in Figure 1.1 to find its decimal value, which is 10. So we write it as “10 x 1⁶³”.

We can now collectively write all of these values as follows:

A2B4 = (4 x 1⁶⁰) + (11 x 1⁶¹) + (2 x 1⁶²) + (10 x 1⁶³)
= (4 x 1) + (11 x 16) + (2 x 256) + (10 x 4096)
= 4 + 176 + 512 + 40,960
= 41,652

Therefore, the decimal value of A2B4 is 41,652.

I hope that this article has helped you understand the hexadecimal, decimal, and the conversion of hexadecimal to decimal.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Sarath G
Sarath G

Written by Sarath G

Cyber Security Trainer | Cyber Security Enthusiast. Facebook: https://www.facebook.com/sarathg.alp

No responses yet

Write a response