Hex to Decimal

Bookmark added to your notes.
View Notes
×

Conversion From Hex to Decimal

Hexadecimal number system (also known as base 16) is a positional system that represents numbers using a base 16. Unlike the common ways of representing the numbers using 10 symbols, it uses 16 different symbols to represent numbers. The symbols 0 - 9 represent values zero to nine, where the symbols A to F represents values ten to fifteen. These symbols are used to convert hexadecimal numeral systems to another system using certain rules of conversion. Programmers and Computer System Designers frequently use hexadecimal number systems as they provide a human-friendly representation of binary codes. Here, you will learn about hexadecimal numeral systems and conversion from hex to decimal along with examples.


What is a Hexadecimal Number?

The hexadecimal numeral system (also abbreviated as hex) is the system of numbers which have 16 digits, rather than 10. The standard numeral system is known as the decimal system (base 10) and uses 10 symbols i.e. 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. The hexadecimal numbers system includes 10 decimal numbers and extra six symbols. There are no numerical symbols that represent the value greater than 9, hence English alphabets such as A, B, C, D, E, and F are used to represent hexadecimal numeral systems.

The 16 digits in the hexadecimal number system are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, where A is 10, B is 11, C is 12, etc.

In the Hexadecimal number system, the place value of a number is determined by the power of 16, rather than 10. For example,

2A316 = 2 * 16² + 10 * 16¹ + 3 * 16º = 67510


Conversion From Hex to Decimal

To convert hex to a decimal manually, you should first start multiplying the hex numbers by 16. Then, you raise it to a power of 0 and increase that power each time by 1 according to the hexadecimal equivalent system.

While applying powers, we will start with the right of a hexadecimal number system and move to the left. Each time you multiply a number by 16, the power of 16 increases.

Let understand the conversion from hex to decimal with an example given below:

Convert (7CF)16 to decimal number.

Solution:

In Hexadecimal number system,

7 = 7

C = 12

F = 15

To convert 7CF into a decimal number, multiply each digit with the power of 16 starting from the unit place of a hexadecimal system.

Accordingly, (7CF)16 can be expressed as:

(7CF)16 =  (7* 16²) +  (12 * 16¹) + (15 * 16⁰)

= (7 * 256) + (12 * 16) + (15 * 1)

= 1792 + 192 + 7

= 19999

Therefore, (7CF)16 = (19999)10

The conversion table for the numbers from hex to decimal is given below:


Hex to Decimal Table

Hexadecimal

Decimal

0

0

1

1

2

2

3

3

4

4

5

5

6

6

7

7

8

8

9

9

A

10

B

11

C

12

D

13

E

14

F

15


The above-given hex to the decimal table helps you to represent the digits and numbers individually in large numbers in a hexadecimal numeral system.


Solved Examples

Let's look at some examples of conversion from hexadecimal to decimal number systems with detailed explanations.


1. Convert (2C7)16 to decimal number.

Solution:

In Hexadecimal Number System,

2 = 2

C = 12

7 = 7

Hence,

(2C7)16 =  (2 * 16²) +  (12 * 16¹) +  (7 * 16⁰)

= (2 * 256) +  (12 * 16) +  (7 * 1)

= 512 + 192 + 7

= 711

Therefore, (2C7)16 = (711)10


2. Convert (1A7D)16 to decimal number

Solution:

In Hexadecimal Number System,

1 = 1

A = 10

7 = 7

D = 13

Hence,

(1A7D)16 =  (1 * 16³) +  (10 * 16²) +  (7 * 16¹) +  (13 * 16º)

= (1 * 4096) +  (10 * 256) +  (7 * 16) +  (13 * 1)

= 4096 + 2560 + 112 + 13

= 6781

Therefore, (1A7D)16 = (6781)10

FAQ (Frequently Asked Questions)

Q1. Mention Some Points on the Difference Between Hexadecimal and Decimal Numeral System?

Ans.

Hexadecimal Numbers System

Decimal Numbers System

Hexadecimal number system consists of 16 symbols. It uses 10 symbols of decimal number i.e 0 to 9, and 6 additional values (A, B, C, D, E, F) to represent values (10, 11, 12, 13, 14, 15) respectively.

Decimal number system consists of 10 symbols. It uses 10 symbols i.e. from 0 to 9 and other combinations to represent different values.

The radix of hexadecimal is 16. it means that all the digits in hexadecimal numbers are represented in terms of the power of 16.

The radix of the decimal is 10. it means that all the digits in decimal numbers are represented in terms of the power of 10.

Hexadecimal numbers are easier to remember.

Decimal numbers are difficult to remember.

Example:

FFFF in hexadecimal numbers represents (sixty-five thousand five hundred thirty-five).

Example:

65535 in decimal number represents (sixty-five thousand five hundred thirty-five).

Applications

Microprocessors and microcontrollers use a hexadecimal number system to represent the address of memory locations.

Applications

  • Most commonly used in everyday life.

  • Widely used in financial transactions and banking transactions.

Q2. What are the Applications of Hexadecimal Number Systems?

Ans. The hexadecimal number system is most commonly used in computer programming and microprocessors. It is also useful to express colours on webpages. Each of the 3 primary colours i.e. red, blue, and green is characterized by two hexadecimal digits to form 255 possible values, thus resulting in more than 16 possible colours. The hexadecimal number system is used to define the memory location of the error. This is beneficial for programmers to find and fix errors. Computer programmers find hexadecimal numbers easier to read and write in comparison with binary or decimal numbers.