Arkiana

A Place Of Growth. We Strive To Help You Sharpen Your Skills In Engineering and Programming. We Work Hard To Provide The Answers You are Looking for in Programming and Engineering/

Hexadecimal

Hexadecimal

WHAT IS HEXADECIMAL

Hexadecimal (also called base-16 or simply hex) is a numeral system that uses 16 as its base.

This means that there are 16 possible digits in the hexadecimal system: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. The letters A through F represent the decimal values 10 through 15, respectively.

In my third year of Electrical Engineering, I took a Digital Electronics class, where we learned more about Binary, Hexadecimal, ASCII, and other numbering systems.

We learned that Hexadecimal is used a lot in the computing world and among those working with low-level programming languages like Assembly, C, or C++.


Here is an example of Hexadecimal numbers

DECIMALHEXADECIMALBINARY
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
10
11
12
13
14
15
16
17
18
19
1A
1B
1C
1D
1E
1F
0
1
10
11
100
101
100
111
1000
1001
1010
1011
1100
1101
1110
1111
10000
10001
10010
10011
10100
10101
10110
10111
11000
11001
11010
11011
11100
11101
11110
111111
Example of Hexadecimal
Hexadecimal Numbers

You don’t have to master these numbers, you can easily make reference to hexadecimal values in case you need them.

There are a lot of resources that will help you to understand and convert hexadecimal to any form you need or vice versa.

If you are interested in working with systems, microcontrollers, and other low-level stuff in digital electronics, being able to work with hexadecimal is a great advantage.

A bonus point is that there is not so much to learn about hexadecimal, they are easy to understand and convert.

WHY IS HEXADECIMAL USED INSTEAD OF BINARY?

Engineers, Software developers, and system designers widely use hexadecimal numbers because they provide a human-friendly representation of binary-coded values


Simply put, Hexadecimal is used because it is easier and more readable than binary.

It is much easy to read 1a than 00011010, in case you are wondering, 1a (hexadecimal) is 26 in decimal, and 00011010 (binary) is 26 in decimal.

You can see that 1a is easier to read and understand than 00011010.

Plus, you also save a lot of space and time using hex. You will be able to convey a lot of information without taking a lot of space using hex than binary.

For example, with only 2 hexadecimal digits, you can denote any number from 0 (0) to 255 (FF).

To represent 255 (11111111) in binary, you will need 8 digits. Think of what this will be for very large numbers. You can easily see that Hexadecimal is very helpful in such cases.

Though computers understand only binary, it is much easy and more convenient to work with Hexadecimal than binary.

USES OF HEXADECIMAL

Hexadecimal is useful for a number of things, it can be used in machine code or assembly language to denote memory and network addresses.

Hex is also useful for colors in programming and other design software. For example, #FFAA54 helps programmers to understand how much red, green, and blue has been applied.

Hexadecimal can be used to represent Media Access Control (MAC) addresses. MAC addresses are unique identifiers for network devices. They are often represented in hexadecimal format.

Further, Hexadecimal can be used to display error messages. Error messages are often displayed in hexadecimal format. This makes it easier to identify the source of the error.

The main advantage of hexadecimal is that it is a more compact way to represent binary numbers.

 This makes it easier to read and write binary data, and it also makes it easier to store binary data in memory.

Hexadecimal
Scroll to top