Hexadecimal Presentation
Hexadecimal Presentation
Numbers
A Simple Guide to Base-16 Numbers
What is the Hexadecimal System?
• - Hexadecimal is a base-16 number system.
• - It uses 16 symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
A, B, C, D, E, F.
• - Numbers 0–9 represent themselves.
• - Letters A–F represent decimal values 10–15.
• - Widely used in computers to represent
binary data compactly.
How Does Hexadecimal Work?
• - Each position in a hexadecimal number
represents a power of 16.
• - Example: 1A3 in hexadecimal means:
• 1 × 16^2 + A × 16^1 + 3 × 16^0
• - A (hex) = 10 (decimal), so:
• 1 × 256 + 10 × 16 + 3 × 1 = 419.
Why Use Hexadecimal?
• - Compact representation of binary numbers.
• - 1 hexadecimal digit = 4 binary digits (bits).
• - Example:
• Binary: 11010111 → Hexadecimal: D7.
Decimal to Hexadecimal
Conversion
• - To convert decimal to hexadecimal:
• 1. Divide the number by 16.
• 2. Record the remainder (this is a hex digit).
• 3. Repeat with the quotient until it is 0.
• - Example:
• Decimal 345 → Hexadecimal 159:
• 345 ÷ 16 = 21 R 9 → 21 ÷ 16 = 1 R 5 → 1 ÷ 16
= 0 R 1.
Hexadecimal to Binary Conversion
• - Each hex digit maps to a 4-bit binary value:
• 0 = 0000, 1 = 0001, 2 = 0010, ..., F = 1111.
• - Example:
• Hexadecimal: A9 → Binary: 1010 1001.