What Are Hexadecimal Numbers & Why Do We Use It?

So in this article, we will take a look at what Hexadecimal numbers are. But we wont stop just there. We will also learn why we need to use them. We will take a look at few examples of hexadecimal numbers to know it better.

So does that sound like something you want to know more about? Great! Then strap yourself to your seat and read along. Because you are in for a treat with a world of numbers!

So first thing first, let us answer the basic question we have.

What Are Hexadecimal Numbers?

So to answer this, we first need to ask ourselves what a decimal number is. Alright? Because the numbers we use in our daily lives are based on decimal number system. So looking at hexadecimal numbers after analyzing decimal number will be so much easier. Right?

Alright then.

Decimal numbers

They are the number system that has the digits 0 to 9. Right? But what do we do when we want to go beyond the number 9?

What Are Hexadecimal Numbers?
What Are Hexadecimal Numbers?

We use 2 digits to represent the next number. And these digits will now start with a 1 followed by another digit between 0 to 9.

So the next set of numbers will be 10, 11, 12, 13, 14 …… Correct? But what happens when we reach the number 19? We again start with our next number 2 and repeat the process again.

So it will now be 20, 21, 22, 23 ….

So what we see here is that we can only use digits between 0 to 9. But they can be grouped together in to multiple digits to count any number we want. Right?

Alright. I can now hear you asking me what does this have to do with Hexadecimal number?

Well this concept is very much related to hexadecimal numbers as well. How, you ask? Let me explain!

Hexadecimal Numbers

So just like we have digits between 0 to 9 for decimal, we use digits between 0 to F in hexadecimal system!

What? So how does the digits look like? They look like below:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E & F

These are the digits we use in a hexadecimal number system!

So as you can see, the numbers between 0 & 9 are the same as decimal system. However after that, 10 is represented by A. 11 by B, 12 by C and so on. This goes on until the letter F which is used to represent the number 15.

So in hexadecimal system, we have symbols to count from 0 to 15!

Why Do We Use Hexadecimal System?

Now that we know what hexadecimal system is, let us learn why we need it.

If you take a look at a computer, we know that it works in binary right? So the only numbers it can understand is 1s & 0s. Because of this, a large number like 10 is represented in binary as 1010b right?

But as you can see, it is not so readable. Correct? So there is a very good chance that we can read or write a binary number wrong! So to avoid that, we use hexadecimal numbers when working with computers!

Hexadecimal Number Examples

Decimal NumberHexadecimal Number

Example Of Hexadecimal Numbers

So you can see few examples of hexadecimal numbers in the above table. Right? But did you notice something? We have prefixed hexadecimal numbers with “0x”. Why? Because that is a convention that will tell anyone to treat it as a hexadecimal number!