Base-16 (Hexadecimal) Number System
The bridge between human-readable and machine code - essential for memory addressing, networking, and cybersecurity applications.
Learning Objectives
- Understand hexadecimal as a base-16 number system
- Learn conversion between hex, decimal, and binary
- Master various hexadecimal notation styles
- Apply hex concepts to real-world technology scenarios
Hexadecimal Fundamentals
What is Hexadecimal?
Hexadecimal uses 16 distinct symbols:
๐ก One hex digit represents exactly 4 bits (a nibble)
Hexadecimal Values
Notation Styles
Conversion Methods
Hex to Decimal
Positional Value Method
Example: Convert 2A3โโ to decimal
Decimal to Hex
Repeated Division by 16
Example: Convert 255โโ to hexadecimal
Binary to Hex
Group by 4 Method
Example: Convert 11010110โ to hex
Practical Applications
Memory Addressing
Computer memory addresses are commonly displayed in hexadecimal:
Each pair of hex digits represents one byte of data.
Network MAC Addresses
MAC addresses use 6 bytes (12 hex digits) separated by colons:
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
Cryptographic Hashes
Hash values are typically displayed in hexadecimal:
Hands-On Exercises
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"