Learning Objective
Learn the hexadecimal digit system and perform accurate conversions between decimal integers and hexadecimal numbers.
Core Concept
Hexadecimal is a base-16 number system that uses sixteen symbols: digits 0–9 and letters A–F. Decimal-to-hexadecimal conversion uses repeated division by 16, while hexadecimal-to-decimal conversion uses positional powers of 16.
Scientific Background
Hexadecimal is widely used in computer science because one hexadecimal digit represents exactly four binary bits. This makes long binary sequences easier to read and write. The symbols A, B, C, D, E, and F represent decimal values 10, 11, 12, 13, 14, and 15 respectively.
Number System Information
Decimal Base
10
Hexadecimal Base
16
Hexadecimal Digits
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
Letter Values
A
10
B
11
C
12
D
13
E
14
F
15
Hexadecimal Place Values
16⁰
16¹
16²
16³
16⁴
Unit Relationship
Decimal (255)₁₀ = Hexadecimal (FF)₁₆
Conversion Principle
Hexadecimal-to-decimal conversion uses powers of 16. Decimal-to-hexadecimal conversion repeatedly divides the number by 16 and records the remainders, converting remainders 10–15 into A–F.
Conversion Formula
Decimal = Σ(hᵢ × 16ⁱ), where each hᵢ is the decimal value of a hexadecimal digit.
Remainder = N mod 16
Next quotient = floor(N/16)
Conversion Method
For hexadecimal-to-decimal conversion, identify the value of every digit, including letters A–F.
Multiply each digit value by its positional power of 16.
Add all the results.
For decimal-to-hexadecimal conversion, divide the decimal integer by 16.
Record each remainder and convert values 10–15 into their corresponding letters.
Continue dividing the quotient by 16 until it becomes zero.
Read the remainders from bottom to top.
Worked Examples
| Problem | Calculation | Answer | Explanation |
|---|---|---|---|
Convert hexadecimal 2A into decimal. | (2 × 16¹) + (10 × 16⁰) = 32 + 10 | 42 | The hexadecimal digit A represents decimal 10. |
Convert decimal 255 into hexadecimal. | 255 ÷ 16 = 15 remainder 15; 15 ÷ 16 = 0 remainder 15 | FF₁₆ | Both remainders equal 15, represented by the hexadecimal digit F. |
Convert hexadecimal 1F4 into decimal. | (1 × 16²) + (15 × 16¹) + (4 × 16⁰) = 256 + 240 + 4 | 500 | The hexadecimal digit F represents 15, and each digit is multiplied by its corresponding power of 16. |
Convert decimal 100 into hexadecimal. | 100 ÷ 16 = 6 remainder 4; 6 ÷ 16 = 0 remainder 6 | 64₁₆ | Reading the remainders from bottom to top gives hexadecimal 64. |
Verification
Convert the hexadecimal result back into decimal using positional powers of 16 and compare it with the original decimal value.
Common Mistakes
Treating hexadecimal letters as ordinary alphabetic values instead of numbers.
Using digits or letters outside the hexadecimal range.
Using powers of 10 instead of powers of 16.
Reading remainders in the wrong order.
Confusing hexadecimal notation with decimal notation when writing large values.
Practical Applications
Representing memory addresses in computing.
Reading hexadecimal color codes.
Debugging and programming.
Representing binary data compactly.
Understanding computer architecture and digital systems.
Knowledge Check
| Question | Answer | Explanation |
|---|---|---|
Convert hexadecimal A into decimal. | 10 | A represents decimal 10. |
Convert decimal 31 into hexadecimal. | 1F₁₆ | 31 divided by 16 gives quotient 1 and remainder 15, represented by F. |