Open In App

Hexadecimal Number System

Last Updated : 08 Apr, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Hexadecimal Number System is a base-16 numeral 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’.

Number Systems are various ways to use numbers to represent large numbers and information. The hexadecimal number system is introduced to students in class 9. In this article, we will learn about, the Hexadecimal Number System, Hexadecimal Number System Table, Hexadecimal Number System Examples, and Others in detail.

Before starting with the Hexadecimal Number System we first learn about the Number System.

What is Number System?

Number System is a method of representing Numbers and there are various types of the number systems in mathematics that are defined as,

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.

Types of Number Systems

Based on the base value and the number of allowed digits, number systems are of many types. The four common types of Number System are: 

  • Decimal Number System
  • Binary Number System
  • Octal Number System
  • Hexadecimal Number System

Types of Number Systems

Now let’s learn about, Hexadecimal Number in detail.

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.

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 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.

Hexadecimal Number System Table

Following table represents the relationship between hexadecimal number system with decimal as well as binary number system.

Hexadecimal

Decimal

Binary

0

0

0000

1

1

0001

2

2

0010

3

3

0011

4

4

0100

5

5

0101

6

6

0110

7

7

0111

8

8

1000

9

9

1001

A

10

1010

B

11

1011

C

12

1100

D

13

1101

E

14

1110

F

15

1111

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.

Example: Convert (A7B)16 to decimal.

(A7B)16 = A × 163 + 7 × 162 + B × 161

⇒ (A7B)16 = 10 × 4096 + 7 × 256 + 11 × 16 (convert symbols A and B to their decimal equivalents; A = 10, B = 11)

⇒ (A7B)16 = 40960 + 1792 + 176

⇒ (A7B)16 = 42828

Therefore, the decimal equivalent of (A7B)16 is (42828)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,

Decimal to Hexadecimal Conversion

Example: Convert (92)10 to hexadecimal.

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.

Example: Convert (1F7)16 to Octal.

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 remainders 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:

Step 1: Convert Octal to Binary

For each octal digit, replace it with its three-digit binary equivalent.

Example: Convert (345)8 to binary.

3 in octal is 011 in binary

4 in octal is 100 in binary

5 in octal is 101 in binary

Combine 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: Convert (011100101)2 to hexadecimal.

0111 in binary is 7 in hexadecimal

0010 in binary is 2 in hexadecimal

1101 in binary is D in hexadecimal

Combine these hexadecimal equivalents: (011100101)2 = (72D)16

Therefore, (345)8 is equivalent to (72D)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:

Example: Convert hexadecimal (4D)16 to binary.

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.

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.

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 Hexadecimal Number System

The numbers in the hexadecimal number system has weightage in powers of 16. The power of 16 increases as the digit is shift 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,

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.

Hexadecimal Number System – FAQs

What is a Hexadecimal Number System?

The hexadecimal number system is a method of counting using 16 digits combining

  • Numbers (0-9)
  • Letters (A-F)

What are 16 Digits of Hexadecimal Number System?

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

What is the Use of Hexadecimal Number System?

Hexadecimal is handy in computers for expressing binary data more easily. It’s also used in colors on computers, making it simpler to show a wide range of shades.

What is 16 Called in Hexadecimal?

In hexadecimal, 16 is represented as 10.

What is 8 in Hexadecimal Number System?

8 in Hexadecimal Number System is also, called 8.

How Many Digits are Used in the Hexadecimal Number System?

The hexadecimal system uses sixteen distinct digits: 0-9 for values zero to nine, and the letters A-F for values ten to fifteen.

Where are Hexadecimal Numbers Used by Programmers?

Hexadecimal numbers are commonly used by programmers to define locations in memory units of computers because they can represent large numbers in a more compact form than binary or decimal systems.

How Do You Convert a Hexadecimal Number to Binary?

To convert a hexadecimal number to binary, replace each hexadecimal digit with its corresponding 4-bit binary sequence. For example, the hexadecimal number 2A converts to the binary number 00101010.

How Do You Convert Binary to Hexadecimal?

To convert binary to hexadecimal, group the binary digits into sets of four (starting from the right), and then replace each set with the corresponding hexadecimal digit. For example, the binary number 1101011011 converts to the hexadecimal number 2D6.



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads