Hexadecimal Number System
The Hexadecimal Number System is a base-16 number system used in diverse fields, especially in computing and digital electronics. It consists of 16 symbols, including numbers 0 to 9 and letters A to F, offering a compact way to represent binary-coded values. The hexadecimal number system is sometimes also represented as 'hex'.

Table of Content
What is Number System?
A number system is a system for expressing numbers; it's a mathematical notation for representing numbers of a given set, using digits or other symbols in a consistent manner.
The four common types of Number Systems are:
- Decimal Number System
- Binary Number System
- Octal Number System
- Hexadecimal Number System

Now let's learn about Hexadecimal Number in detail.
Number System | Base | Digits Used | Example |
---|---|---|---|
Decimal | 10 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 | 345, 29.5 |
Binary | 2 | 0, 1 | 1011, 1100 |
Octal | 8 | 0 to 7 | 145, 376 |
Hexadecimal | 16 | 0–9 and A–F | 2F, A9, 1C4 |
What is Hexadecimal Number System?
Hexadecimal is a number system combining "hexa" for 6 and "deci" for 10. It uses 16 digits: 0 to 9 and A to F, where A stands for 10, B for 11, and so on. Similar to the regular decimal system, it counts up to F instead of stopping at 9. Each digit in hexadecimal has a weight 16 times greater than the previous one, following a positional number system.
When converting to another system, we multiply each digit by the power of 16 based on its position. For example, in the number 7B3, 7 is multiplied by 16 squared, B by 16 to the power of 1, and 3 by 16 to the power of 0.
Hexadecimal Numbers Conversions
The hexadecimal number can be easily converted to various other numbers such as Binary Numbers, Octal Numbers, Decimal Numbers, and vice-versa. Now let's learn about them in detail.
Hexadecimal to Decimal Conversion
Converting hexadecimal to decimal follows a similar process as before, where each digit is multiplied by the respective power of 16.
Hexadecimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Decimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
Example: Convert (A7B)16 to decimal.
(A7B)16 = A × 162 + 7 × 161 + B × 160
⇒ (A7B)16 = 10 × 256 + 7 × 16 + 11 × 1 (convert symbols A and B to their decimal equivalents; A = 10, B = 11)
⇒ (A7B)16 = 2560 + 112+ 11
⇒ (A7B)16 = 2683
Therefore, the decimal equivalent of (A7B)16 is (2683)10.
Decimal to Hexadecimal Conversion
To convert a decimal number to hexadecimal, we use the base number 16. The process involves dividing the number by 16 repeatedly until the quotient becomes zero. The decimal to hexadecimal number system is shown in the image added below.

Example: Convert (92)10 to hexadecimal.
Solution:
Divide 92 by 16
Quotient: 5, Remainder: 12 (C in Hexadecimal)
Divide 5 by 16
Quotient: 0, Remainder: 5
Write the remainders from bottom to top
Therefore, (92)10 is equivalent to (5C)16 in hexadecimal.
Hexadecimal to Octal Conversion
To convert a hexadecimal number to octal, we follow a two-step process: first, convert the hexadecimal number to decimal, and then convert the decimal number to octal.
The following chart shows the equivalent octal values for each hexadecimal digit.
Hexadecimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Octal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
Example: Convert (1F7)16 to Octal.
Solution:
Step 1: Convert (1F7)16 to decimal using the powers of 16:
(1F7)16 = 1 × 162 + 15 × 161 + 7 × 160
⇒ (1F7)16 = 1 × 256 + 15 × 16 + 7 × 1
⇒ (1F7)16 = 256 + 240 + 7
⇒ (1F7)16 = (503)10
Step 2: Convert the decimal number (503)10 to octal by dividing it by 8 until the quotient is 0
503 ÷ 8 = 62 with a remainder of 7
62 ÷ 8 = 7 with a remainder of 6
7 ÷ 8 = 0 with a remainder of 7
Arrange the remainder from bottom to top
Therefore, (1F7)16 is equivalent to (767)8 in octal
Octal to Hexadecimal Conversion
There is a two-step process to convert an octal number into hexadecimal:
Convert Octal to Binary
To convert a number from octal number system to binary number system take each octal digit and replace it with its three-digit binary equivalent.
Example: Convert (345)8 to binary.
Solution:
Step 1: Convert Octal to Binary
3 in octal is 011 in binary
4 in octal is 100 in binary
5 in octal is 101 in binaryCombine these binary equivalents: (345)8 = (011100101)2
Step 2: Convert Binary to Hexadecimal
Group the binary digits into sets of four, starting from the right, and convert each set to its hexadecimal equivalent.
Example 2: Convert (011100101)2 to hexadecimal.
Solution:
Pad the binary number with leading zeros to make its length a multiple of 4.
Add 3 leading zeros to make 12 digits: 0000 1110 0101
0000 in binary is 0 in hexadecimal
1110 in binary is E in hexadecimal
0101 in binary is 5 in hexadecimal
Combine these hexadecimal equivalents: (011100101)2 = (0E5)16
Therefore, (345)8 is equivalent to (0E5)16 in hexadecimal.
Hexadecimal to Binary Conversion
Converting hexadecimal to binary involves two methods: one with a conversion table and the other without a conversion table.
Method 1: Convert Hexadecimal to Binary with Conversion Table
To convert a hexadecimal number to binary using a conversion table, we follow these steps:
Hexadecimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Decimal | 0000 | 0001 | 0010 | 0011 | 0100 | 0101 | 0110 | 0111 | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 |
Example: Convert hexadecimal (4D)16 to binary.
Solution:
Look up Decimal Equivalent of each digit in the conversion table.
4 in decimal is (4)10, and D in decimal is (13)10
Convert each decimal number to binary.
(4)10 is (0100)2, and (13)10 is (1101)2
Combine the binary numbers
(4D)16 is (01001101)2
Method 2: Convert Hexadecimal to Binary without Conversion Table
This method involves multiplying each digit by 16(n-1) to obtain the decimal number, and then dividing by 2 until the quotient is zero.
Example: Convert hexadecimal (A2)16 to binary.
Solution:
Convert (A2)16 to decimal
(A)₁₆ is (10)10, and (2)16 is (2)10
⇒ (A2)16 is 10 × 161 + 2 × 160 = 160 + 2 = 16210
Convert the decimal number (162)10 to binary
Divide 162 by 2: Quotient = 81, Remainder = 0
Divide 81 by 2: Quotient = 40, Remainder = 1
Continue dividing until the quotient is zero: (10100010)2
Therefore, (A2)16 is (10100010)₂ in binary
Binary to Hexadecimal Conversion
To change binary to hexadecimal, we refer to a conversion table from the previous section.
Example: Convert (10111010101)2 to hexadecimal.
Solution:
In hexadecimal, every 4 binary digits represent one digit
Group the binary number accordingly, and find their Hexadecimal equivalent using the hexadecimal table added above.
0010 = 2, 1011 = B, 1010 = A
Combine these hexadecimal digits to get the final number.
Therefore, (10111010101)2 is equal to (2BA)16
Place Value of Digits in the Hexadecimal Number System
The numbers in the hexadecimal number system have weightage in powers of 16. The power of 16 increases as the digit is shifted towards the left of the number. This is explained by the example as,
Example, (AB12)16
Place value of each digit in (AB12)16 is,
= A×163 + B×162 + 1×161 + 2×160
Read More,
Facts About Hexadecimal Numbers
- Hexadecimal is a number system with a base value of 16.
- Hexadecimal numbers use 16 symbols or digital values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.
- A, B, C, D, E, and F represent 10, 11, 12, 13, 14, and 15 in single-bit form.
- If you see an "0x" as a Prefix, it indicates the number is in Hexadecimal. For example, 0x3A
- The position of each digit in a Hexadecimal number has a weight of 16 to the power of its position.
Solved Examples on Hexadecimal Number System
Example 1: Convert Hexadecimal 1A5 to Decimal
Solution:
Multiply First Digit (1) by 16 squared (256)
1×162 = 256
Multiply Second Digit (A, which is 10 in decimal) by 16 to the power of 1 (16)
10×161 = 160
Multiply Third Digit (5) by 16 to the power of 0 (1)
5×160 = 5
Adding the results,
1A5 = 1×162 + A×161 + 5×160
⇒ 1A5 = 1×162 + 10×161 + 5×160
⇒ 1A5 = 256 + 160 + 5 = 421
Decimal Equivalent of Hexadecimal number 1A5 is 421
Example 2: Convert Decimal 315 to Hexadecimal.
Solution:
Divide Decimal Number by 16
315÷16 = 19 with Remainder 11
The remainder (11) is represented as B in hexadecimal
Repeat the division with the quotient (19)
19÷16 = 1 with Remainder of 3
The remainder (3) is represented as 3 in hexadecimal
Hexadecimal Equivalent of Decimal Number 315 is 13B
Practice Questions on Hexadecimal Number System
Problem 1: Convert the hexadecimal number 2A to binary.
Problem 2: Convert the binary number 110110 to hexadecimal.
Problem 3: Add the hexadecimal numbers 1F and A3. Provide the result in hexadecimal.
Problem 4: Subtract the hexadecimal number B6 from D9. Provide the result in hexadecimal.
Problem 5: Multiply the hexadecimal number 7E by 3. Provide the result in hexadecimal.