Hexadecimal
Hexadecimal is a base-16 number system that uses sixteen symbols: the digits 0 through 9 and the letters A through F, where A = 10, B = 11, C = 12, D = 13, E = 14, and F = 15. It is widely used in computing because it provides a compact way to represent binary data.
Hexadecimal (often abbreviated "hex") is a positional numeral system with a radix of 16. Each digit position represents a power of 16, so a hexadecimal number has the decimal value . Because , each hexadecimal digit corresponds exactly to a group of four binary digits (bits), making hex a convenient shorthand for binary values.
Key Formula
Where:
- = the hexadecimal digit at position i (0–9 or A–F)
- = the place value at position i
- = the position of the leftmost digit (counting from 0)
Worked Example
Problem: Convert the hexadecimal number 2A3 to decimal.
Step 1: Identify each digit and its position. From right to left: 3 is at position 0, A is at position 1, and 2 is at position 2.
Step 2: Replace any letters with their decimal equivalents. A = 10.
Step 3: Multiply each digit by the corresponding power of 16.
Step 4: Calculate each term and add them together.
Answer: The hexadecimal number 2A3 is equal to 675 in decimal.
Why It Matters
Hexadecimal is everywhere in computing. Colors on websites are specified in hex (like #FF5733), memory addresses are written in hex, and programmers use it constantly because it compresses long binary strings into something far more readable. A single hex digit replaces four binary digits, so a byte (8 bits) can be neatly written as just two hex characters instead of eight 0s and 1s.
Common Mistakes
Mistake: Treating hex digits A–F as separate letters instead of numbers
Correction: Remember that A = 10, B = 11, C = 12, D = 13, E = 14, and F = 15. These are single-digit values in base 16, not placeholders.
Mistake: Using powers of 10 instead of powers of 16 when converting
Correction: Hexadecimal is base 16, so each position represents a power of 16 (1, 16, 256, 4096, …), not a power of 10.
