Unit Conversion

What is Hexadecimal – Definition and Conversion

What is Hexadecimal?

For counting and solving maths problems, we use a base-ten system. However, if you would like to program computers, you need to learn about hexadecimal, a number system based on sixteen. Furthermore, computer scientists create the computer systems that we use to surf the net, play games online, and even read online lessons.

In addition, they program computers using a number system called hexadecimal. It is very important in terms of the computer world. Let us discuss its definitions and conversions.

hexadecimal

Introduction to Hexadecimal 

It is a number system based on the number index sixteen. Remember that Hexa means six as a hexagon with six sides and decimal refers to a system based on the number ten. Thus it describes a base-16 number system. That is, it describes a numbering system containing 16 sequential numbers as base units including zero.

The hexadecimal numbers are using 0-9 digits and then the letters A-F. We will see the equivalence of binary, decimal, and hexadecimal numbers in the table below.

Thus. ts system has sixteen single-digit numbers. These are the sixteen single-digit numbers of the hexadecimal system:

Actually, it is a convenient way to represent binary numbers in the modern computers in which a byte is defined as containing eight binary digits. Also, it’s one digit can represent the arrangement of four binary digits. And, two digits can represent eight binary digits or a byte.

Binary Decimal Hexadecimal
0000 0 0
0001 1 1
0010 2 2
0011 3 3
0100 4 4
0101 5 5
0110 6 6
0111 7 7
1000 8 8
1001 9 9
1010 10 A
1011 11 B
1100 12 C
1101 13 D
1110 14 E
1111 15 F

 Conversions of Hexadecimal 

  1. Converting from hexadecimal to a Decimal

First, we must know the letters in a hex all have decimal equivalents, as listed in the table above.

For converting it to a decimal manually, we must start by multiplying the hex number by 16. Then, we raise it to a power of zero and increase that power by 1 each time from right to left. We start from the right of the hexadecimal number and go to the left for applying the powers. Each time we multiply a number by 16, the power of 16 increases.

Example 1

When converting the (C9)16 hexadecimal to decimal your work should look something like this:

 9 = 9 * (160) = 9

C = 12 * (16 1) = 192

Then, we add the results.

192 + 9 = (201)10 decimal

Example 2

Convert (ABC)16 to a decimal.

We raise the number 16 to zero for the rightmost bit of the question. As we move the power 16 is raised by one more than the previous bit from right to left.

Thus

C = 12 * (16 0) 12

B = 11 * (16 1) 176

A = 10 * (16 2) 2560

Then, we add the results.

2560 + 176 + 12 = (2748)10 decimal

  1. Converting from Decimal to a Hexadecimal

To convert from decimal to hexadecimal we will divide the decimal number by 16 repeatedly. Then, write the last remainder we obtained in the hex equivalent column. If the remainder is more than nine then change it to its hex letter. Now, the answer is taken from the last remainder obtained to the first remainder. Refer to the diagram below as an example:

Example 1

Divisor Base Ten Number Remainder Hex Equivalent
16 201 X X
16 12 9 9
X 0 12 C

Thus, the answer is C9. As you can see, it contains fewer bits than its decimal equivalent is 201.

Example 2

In this example, we want to convert decimal (3000)10 to hexadecimal.

Divisor Base Ten Number Remainder Hex Equivalent
16 3000 X X
16 187 8 8
16 11 11 B
16 0 11 B

The answer is (BB8)16

Solved Question for You

Q.1.How many permutations are there when using the hexadecimal system?

Ans: It depends on how many hexadecimal digits we are using. One digit has 16 permutations, two digits have 256 permutations, etc. Each digit is represented with 4 bits in binary. So if we have n hexadecimal digits, there are 2(n * 4) possible permutations.

Share with friends

Customize your course in 30 seconds

Which class are you in?
5th
6th
7th
8th
9th
10th
11th
12th
Get ready for all-new Live Classes!
Now learn Live with India's best teachers. Join courses with the best schedule and enjoy fun and interactive classes.
tutor
tutor
Ashhar Firdausi
IIT Roorkee
Biology
tutor
tutor
Dr. Nazma Shaik
VTU
Chemistry
tutor
tutor
Gaurav Tiwari
APJAKTU
Physics
Get Started

Leave a Reply

avatar
  Subscribe  
Notify of

Customize your course in 30 seconds

Which class are you in?
No thanks.