MathsHexadecimal Number System

Hexadecimal Number System

Hexadecimal Number System

One type of number system is Hexadecimal Number System. Other types include binary, octal, and decimal. A hexadecimal number system has 16 as its base number, which includes both 0 through 9 and A through F. A conversion table is used to show a binary number in hexadecimal, which is thought to be one of the easiest ways to do so in computers. Let’s learn more about the hexadecimal number system, its uses, the conversion table, and a few examples to get a better idea of what it is and how it works.

Hexadecimal Number System Table

Decimal Numbers4-bit Binary NumberHexadecimal Number
000000
100011
200102
300113
401004
501015
601106
701117
810008
910019
101010A
111011B
121100C
131101D
141110E
151111F

Definition of Hexadecimal Number System

Hexadecimal is made up of the words “Hexa” and “deci,” where “Hexa” means “six” and “deci” means “ten.” The hexadecimal number system is made up of numbers from 0 to 9 and letters from A to F. It has 16 digits. In other words, the first 9 numbers or digits are shown as numbers, and the next 6 are shown as letters A through F. Hexadecimal is a lot like the decimal number system, which uses 9 as its base. So, after 9 digits, the 10th digit is shown as a symbol: 10, 11, 12, 13, 14, and 15 are shown as A, B, C, D, E, and F, respectively. So, the 16 digits are 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F.

For example: \(7B3_{16}, 6F_{16}, 4B2A_{16}\) are hexadecimal numbers.

Hexadecimal is also called a positional number system because each digit has a weight of 16. Each number is 16 times more important than the number before it. So, when we want to convert a hexadecimal number to another number system, we multiply the digits one by one, keeping in mind the power of 16 based on where they are.

image upload soon

Hexadecimal Number System Conversion to Others

Using the base number of 16, you can change a hexadecimal number to binary, octal, or decimal. Since each digit has a weight of 16, we use the sum of the products of each digit with its positional value to convert from hexadecimal. We do this by multiplying each digit from the left with 160, 161, 162, 163, and each digit from the right with 16-1, 16-2, 16-3. Let’s talk in-depth about each way to convert.

There are two methods for converting hexadecimal to binary: one includes a conversion table and the other without. Let’s examine both approaches:

Convert Hexadecimal to Binary

Method 1 : Using a conversion table, convert hexadecimal to binary.

This table is used to convert a hexadecimal integer to binary using a conversion table. First, we convert hexadecimal to decimal by looking up the decimal equivalent of each hexadecimal digit in the database. This decimal number is converted to binary using the same table. Finally, we mix the digits to obtain the binary number. Consider the following example.

image upload soon

Example: Convert hexadecimal \((67F)_{16}\) to binary.

Solution: Looking at the conversion table, find the equivalent of each digit to decimal.

6 = \((6)_{10}\) , 7 = \((7)_{10}\) , F = \((15)_{10}\)

Once the decimal of each digit is obtained, looking at the conversion table convert each decimal number to binary.

\((6)_{10}\) = \((0110)_{2}\)

\((7)_{10}\) = \((0111)_{2}\)

\((F)_{10}\) = \((1111)_{2}\)

Combine all the binary numbers together to obtain the final one.

Therefore, \((67F)_{16}\) = \((011001111111)_{2}\).

Method 2: Convert Hexadecimal to Binary without Conversion Table

This method requires both multiplication and division of numbers using the respective base numbers. The hexadecimal base number is 16, the base number of a decimal number is 10, and the base of a binary number system is 2. We multiply each digit with 16n-1, where the digit is in its nth position to obtain the decimal number. Once the digits are converted, we divide the decimal number by 2 by keeping the remainder aside and dividing the quotient by 2 until we arrive at zero. Finally, to obtain the binary number we arrange the remainders from bottom to top. Let us look at an example.

Example: Convert hexadecimal \((76)_{16}\) to binary.

Solution: Convert \((76)_{16}\) to decimal by multiplying each digit with 16n-1. Multiply it

\((76)_{16}\) = 7 × 16(2-1) + 6 × 16(1-1)

\((76)_{16}\) = 7 × 161 + 6 × 160

\((76)_{16}\) = 7 × 16 + 6 × 1

\((76)_{16}\) = 112 + 6

\((76)_{16}\) = 118

Therefore, \((76)_{16}\) = \((118)_{10}\).

Convert \((118)_{10}\) to a binary number by dividing the number by 2 until the quotient is zero.

image upload soon

Therefore, \((118)_{10}\) = \((1110110)_{2}\).

Hence, \((76)_{16}\) = \((1110110)_{2}\).

  • Convert Hexadecimal to Octal

Converting from hexadecimal to octal requires two steps: first, convert the hexadecimal number to decimal, and then convert the decimal number to octal. Let’s examine an example to better comprehend this strategy.

Example: Convert \((AE5)_{16}\) to Octal.

Solution:

\((AE5)_{16}\) = A × 162 + E × 161 + 5 × 160

\((AE5)_{16}\) = 10 × 162 + 14 × 161 + 5 × 160 (convert the symbols to digits looking at the hexadecimal to decimal conversion table used above)

\((AE5)_{16}\) = 10 × 64 + 14 × 16 + 5 × 1

\((AE5)_{16}\) = 640 + 224 + 5

\((AE5)_{16}\) = \((869)_{10}\).

Convert the decimal number to octal by dividing it by 2 until the quotient is 0.

869/8 = 108, remainder is 5

108/8 = 13, remainder is 4

13/8 = 1, remainder is 5

1/8 = 0, remainder is 1

To obtain the final octal number, we arrange the remainder from bottom to top.

Therefore, \((AE5)_{16}\) = \((1545)_{8}\).

  • Convert Hexadecimal to Decimal

Converting hexadecimal to decimal is done in a similar manner as the previous two i.e. multiply each digit with the power of 16. Let us take an example.

Example: Convert \((DC24)_{16}\) to Decimal.

Solution:

\((DC24)_{16}\) = D ×163 + C × 162 + 2 × 161 + 4 × 160

\((DC24)_{16}\) = 13 ×163 + 12 × 162 + 2 × 161 + 4 × 160 (convert the symbols to digits looking at the hexadecimal to decimal conversion table used above)

\((DC24)_{16}\) = 13 × 4096 + 12 × 256 + 2 × 16 + 4 × 1

\((DC24)_{16}\) = 53248 + 3072 + 32 + 4

\((DC24)_{16}\) = 56356

Therefore, the decimal equivalent of \((DC24)_{16}\) = \((56356)_{10}\).

Conversion from Other to Hexadecimal Number System

Converting from other number systems like binary, octal, and decimal to hexadecimal is done in the same way. The above conversion table is also used here. Let us discuss each conversion in detail.

  • Convert Binary to Hexadecimal

To convert binary to hexadecimal we use the conversion table used in the previous section. Let us look at an example for a better understanding.

Example: Convert \((11001111011)_{2}\) to Hexadecimal.

Solution: For hexadecimal, the binary digits are expressed in 4. Hence, every 4 digit in binary becomes one 1 digit in hexadecimal. By looking at the conversion table we get,

0110 = 6, 0111 = 7, 1011 = B

We arrange the numbers together to get the final number.

Therefore, \((11001111011)_{2}\) = \((67B)_{16}\).

  • Convert Octal to Hexadecimal

To go from octal to hexadecimal, we first convert the octal number to binary, then to hexadecimal. The conversion table for octal to binary is different because 3 binary digits make 1 octal digit. This is what the table says:

image upload soon

Example: Convert \((141)_{8}\) to hexadecimal

Solution: Looking at the table, we can convert each octal digit to binary.

1 = 001 , 4 = 100 , 1 = 001

Hence, \((141)_{8}\) = \((001100001)_{2}\)

By looking at the binary to hexadecimal conversion table we get,

0110 = 6, 0001 = 1 (the zero on the left of the last digit can be removed or added according to the requirement)

Therefore, \((141)_{8}\) = \((61)_{16}\).

Convert Decimal to Hexadecimal Conversion : 

The conversion from decimal to hexadecimal is done by dividing the number by 16, the base number of hexadecimal, until the quotient is zero. Let’s look at a specific case.

Example: Convert \((150)_{10}\) to hexadecimal.

Solution: Divide 150 by 16 until the quotient is zero.

150/16 = 9, remainder is 6

9/16 = 0, remainder is 9

Write the remainder from bottom to top.

Therefore, \((150)_{10}\) = \((96)_{16}\).

Octal to Binary Conversion Table

Hexadecimal Number System With Decimal Point

A hexadecimal number with a decimal point is made up of two parts: an integer and a fraction. The whole number is to the left of the decimal point, and the fraction is to the right of it. Since the digits use the power of 16, the digits on the right will have a power of 16 in decreasing order. For example: 5E.64 = 5 × 161 + E × 160 + 6 × 16-1 + 4 × 16-2

Facts of Hexadecimal Number System

  • Out of many types of number representation techniques, the Hexadecimal number system is one having a value of base 16.
  • So Hexadecimal numbers have 16 symbols or digital values, i.e 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.
  • A, B, C, D, E, F are single bit representations of 10, 11, 12, 13, 14 and 15 respectively.
  • The addition of either an o prefix or an h prefix indicates Hexadecimal.

A power of 16 is the weight of the position of every digit.

Solved Examples on Hexadecimal number system

Example 1: What is 5C6 (Hexadecimal)?

Solution

Step 1: The “5 “ is the “16 x 16” position, so that means 5 x16 x16

Step 2: The ‘C’ (12) is in the “16” position, so that means 12 x 16.

Step 3: The “6” in the “1” position so that means 6.

Answer is : 5C6 = 5 x 16 x 16 + 12 x 16 +6 = (1478 ) in Decimal.

Example 2: What is 3C5 (Hexadecimal)?

Solution: Step 1: The “3 “ is the “16 x 16” position, so that means 3 x16 x16

Step 2: The ‘C’ (12) is in the “16” position, so that means 12 x 16.

Step 3: The “5” is in the “1” position so that means 5.

Answer is : 3C5 = 3 x 16 x 16 + 12 x 16 + 5 = (965) in Decimal.

Example 3: What is 7B5 (Hexadecimal)?

Solution: Step 1: The “7 “ is the “16 x 16” position, so that means 7 x16 x16

Step 2: The ‘B’ (11) is in the “11” position, so that means 11 x 16.

Step 3: The 5” in the “1” position so that means 5.

Answer is : 7B5 = 7 x 16 x 16 + 11 x 16 +5 = (1973) in Decimal.

Example 4: What is 2E8 (Hexadecimal)?

Solution: Step 1: The “2 “ is the “16 x 16” position, so that means 2 x16 x16

Step 2: The ‘E’ (14) is in the “16” position, so that means 14 x 16.

Step 3: The “2” is in the “1” position so that means 2.

Answer is : 2E8 = 2 x 16 x 16 + 14 x 16 +8 = (744) in Decimal.

Example 5: What is 4F8 (Hexadecimal)?

Solution: Step 1: The “4 “ is the “16 x 16” position, so that means 4 x16 x16

Step 2: The ‘F’ (15) is in the “16” position, so that means 15 x 16.

Step 3: The “8” is in the “1” position, which means 8.

Answer is : 4F8 = 4 x16 x 16 + 15 x 16 +8 = (1272) in Decimal.

Example 6 : Example 1: Convert \((1101100011)_{2}\) to Hexadecimal.

Solution: Every 4 binary digits is 1 hexadecimal digit. Using the binary to hexadecimal conversion table, we get:

0011 = 3, 0110 = 6, 0011 = 3

Therefore, \((1101100011)_{2}\) = \((363)_{16}\).

Example 7 : Example 2: What is decimal equivalent is \((78DE)_{16}\).

Solution:

\((78DE)_{16}\) = 7 × 163 + 8 × 162 + D × 161 + E × 160

\((78DE)_{16}\) = 7 × 4096 + 8 × 256 + 13 × 16 + 14 × 1

(convert the symbols to digits by using the conversion table)

\((78DE)_{16}\) = 28672 + 2048 + 208 + 14

\((78DE)_{16}\) = 30942

Therefore, the decimal equivalent of \((78DE)_{16}\) = \((30942)_{10}\).

Frequently Asked Questions – FAQs

Q.1 What is Hexadecimal Number System?

Since 16 is the base number, each digit in a hexadecimal number has the power of 16. In contrast to other number systems, hexadecimal has digits from 0 to 9 and symbols for 10 to 16. For example, 10 is represented by the letter A, 11 by B, 12 by C, 13 by D, 14 by E, and 15 by F.

Q.2 What is 0xFF?

The number 0xFF is a hexadecimal number system with a base of 16 that is composed of two F numbers. The binary equivalent of F is 1111. Therefore, 0xFF in binary is 11111111.

Q.3 What are the 16 digits of the hexadecimal number system?

The 16 digits of the hexadecimal number system are 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.

Q.4 What are the Four Types of Number System?

In mathematics, there are four types of number systems, they are:
Binary number system – The base number is 2
Octal number system – The base number is 8
Decimal number system – The base number is 10
Hexadecimal number system – The base number is 16

Q.5 What is the use of the hexadecimal number system?

Computer programming and design use hexadecimal number systems. Since a computer can only understand the numbers 0 and 1, each hexadecimal digit stands for four binary digits.

- Advertisement -

Top Maths Article