The hexadecimal number system is a number system that uses 16 symbols to represent numbers. It is also called the base-16 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
Example 3: 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
Example 4: 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.
Practice Questions
Question 1: Convert the hexadecimal number 2A to binary.
Question 2: Convert the binary number 110110 to hexadecimal.
Question 3: Add the hexadecimal numbers 1F and A3. Provide the result in hexadecimal.
Question 4: Subtract the hexadecimal number B6 from D9. Provide the result in hexadecimal.
Question 5: Multiply the hexadecimal number 7E by 3. Provide the result in hexadecimal.
Answer Key
1. 101010
2. 36
3.C2
4.23
5.17A