### #ezw_tco-2 .ez-toc-widget-container ul.ez-toc-list li.active{ background-color: #ededed; } chapter outline

The term ‘hexa’ means 6 and ‘deci’ means 10. Together, ‘hexadecimal’ means 16.

The hexadecimal number system (hex) is a type of number system that uses 16 characters to represent numbers of values. It includes digits 0 to 9 and alphabets A to F. Thus, it has a base of 16. It is represented as (23E)16.

It is also known as the positional number system, as each digit has a power of 16. Here, the value of each digit is 16 times more significant than the previous one. Thus, we can easily convert any hexadecimal number to any other number system by multiplying each digit based on its position in the number.

The table shows the binary and decimal equivalents of the 16 hexadecimal elements making up the hexadecimal number system.

The advantage of using hexadecimal numbers is that it takes less memory to store more numbers.

A hexadecimal number is converted to binary, octal, and decimal using the base 16. To convert from hexadecimal form, we use the sum of the product of each digit with its value based on its position. It is done by multiplying each digit from the left as 160, 161, 162, 163 and from the right as 16-1, 16-2, 16-3.

Using Table

The hexadecimal number is first converted to the corresponding decimal number and then to the binary number using the table above.

Now, let us convert (52F)16 to binary.

The decimal equivalent to (52F)16 is

(5)16 → (5)10

(2)16 → (2)10

### (F)16 → (15)10

Using the table, we get the binary equivalents of the decimal digits

(5)10 → (101)2

(2)10 → (10)2

### (15)16 → (1111)2

Combining all the binary numbers, we get (101101111)2

Without Using Table

It requires both multiplication and division of numbers using the respective base numbers. To obtain the decimal number, we multiply each digit with 16n-1 when it is in its nth position. We further divide the decimal number by 2 and the quotient in the successive steps until we get zero. Finally, we obtain the binary number by arranging the remainder from bottom to top.

The decimal equivalent to (52)16 is

(52)16 = 5 × 16(2-1) + 2 × 16(1-1)

= 5 × 161 + 2 × 160

= 80 + 2

= 82

Thus, the decimal equivalent to (52)16 is (82)10

Now, converting it to the binary equivalent, we get

Thus, the binary equivalent to (82)10 is (1010010)2

For converting a hexadecimal number to an octal number, we first convert it to a decimal number and then to an octal number.

Let us convert (BF5)16 to octal.

Converting (BF5)16 to decimal number

(BF5)16 = B × 162 + F × 161 + 5 × 160

As B → 11, F →15

B × 162 + F × 161 + 5 × 160

= 11 × 162 + 15 × 161 + 5 × 160

= 2,816 + 240 + 5

= 3,061

Thus, (BF5)16 → (3,061)10

Now, we convert (3,061)10 to octal by dividing the number by 2 until the quotient is 0.

Thus, the binary equivalent to (3,061)10 is (101111110101)2

Converting a hexadecimal number to decimal is the first step of converting hexadecimal to octal form, as we have done above.

The above table is used to convert binary, decimal, and octal numbers to hexadecimal numbers.

Let us convert (11001111011)2 to hexadecimal.

Using the table, we get

0110 → 6

0111 → 7

1011 → B

Thus, the hexadecimal equivalent of (11001111011)2 is (67B)16

To convert from octal to hexadecimal, we first convert the octal number to a binary number and then to a hexadecimal number.

To convert the octal number to a binary number, we use the following table:

Let us consider an example by converting (245)8 to hexadecimal

Here, (245)8 is first converted to binary.

2 → 10

4 → 100

5 → 101

Hence,

(245)8 = (10100101)2

Now, using the binary to hexadecimal conversion table, we get,

1010 → A

0101 → 5

Thus,

(10100101)2 → (A5)16

Thus, the hexadecimal equivalent of (245)8 is (A5)16