Base-16 (Hexadecimal) Number System
The bridge between human-readable and machine code - essential for memory addressing, networking, and cybersecurity applications.
What is Hexadecimal?
Hexadecimal (Base-16) uses 16 distinct symbols to represent numbers:
Digits (0-9):
0 1 2 3 4 5 6 7 8 9
Letters (A-F):
A B C D E F
Hexadecimal Values Reference
Hex | Decimal | Binary | Hex | Decimal | Binary |
---|---|---|---|---|---|
0 | 0 | 0000 | 8 | 8 | 1000 |
1 | 1 | 0001 | 9 | 9 | 1001 |
2 | 2 | 0010 | A | 10 | 1010 |
3 | 3 | 0011 | B | 11 | 1011 |
4 | 4 | 0100 | C | 12 | 1100 |
5 | 5 | 0101 | D | 13 | 1101 |
6 | 6 | 0110 | E | 14 | 1110 |
7 | 7 | 0111 | F | 15 | 1111 |
Notation Styles
Hex to Decimal Conversion
Positional Value Method
Example: Convert 2A3₁₆ to decimal
Position | Digit | Base Power | Calculation | Value |
---|---|---|---|---|
2 | 2 | 16² = 256 | 2 × 256 | 512 |
1 | A (10) | 16¹ = 16 | 10 × 16 | 160 |
0 | 3 | 16⁰ = 1 | 3 × 1 | 3 |
Decimal to Hex Conversion
Repeated Division by 16
Example: Convert 255₁₀ to hexadecimal
FF₁₆
Binary to Hex Conversion
Group by 4 Method
Example: Convert 11010110₂ to hex
1101₂ = D₁₆ = 13₁₀
0110₂ = 6₁₆ = 6₁₀
Memory Addressing
Computer memory addresses are commonly displayed in hexadecimal:
Each pair of hex digits represents one byte of data.
MAC Addresses
MAC addresses use 6 bytes (12 hex digits) separated by colons:
3C:4D:5E Device ID
Web Color Codes
RGB colors use 3 bytes (6 hex digits) for red, green, and blue:
00 = 0 Green
00 = 0 Blue
FF = 255 Green
00 = 0 Blue
00 = 0 Green
FF = 255 Blue
Cryptographic Hashes
Hash values are typically displayed in hexadecimal:
MD5 Hash:
SHA-256 Hash:
Exercise 1: Hex to Decimal
Convert these hex values to decimal:
A7₁₆ = ?
Solution:
A7₁₆ = (A×16¹) + (7×16⁰)
= (10×16) + (7×1)
= 160 + 7 = 167₁₀
Exercise 2: Decimal to Hex
Convert these decimal values to hex:
200₁₀ = ?
Solution:
200 ÷ 16 = 12 remainder 8
12 ÷ 16 = 0 remainder C
200₁₀ = C8₁₆
Exercise 3: Binary to Hex
Convert these binary values to hex:
10110011₂ = ?
Solution:
10110011₂
Group by 4: 1011 | 0011
Convert: B | 3
10110011₂ = B3₁₆
Exercise 4: Message Decoding
Decode this hex message (ASCII):
48656C6C6F = ?
Solution:
48₁₆ = 72₁₀ = 'H'
65₁₆ = 101₁₀ = 'e'
6C₁₆ = 108₁₀ = 'l'
6C₁₆ = 108₁₀ = 'l'
6F₁₆ = 111₁₀ = 'o'
Message: "Hello"
Hex Calculator
Quick Hex Reference
A | = | 10 |
B | = | 11 |
C | = | 12 |
D | = | 13 |
E | = | 14 |
F | = | 15 |