Number System Conversion Tricks - Complete Guide
Part 1: Decimal to Other Bases
TRICK: "Divide and Reverse"
Steps:
1. Keep dividing the Decimal number by the target base (2, 8, or 16)
2. Write down the remainders
3. Reverse the remainders -> That's your answer!
Examples:
- Decimal -> Binary = Divide by 2 -> Reverse
- Decimal -> Octal = Divide by 8 -> Reverse
- Decimal -> Hex = Divide by 16 -> Use A-F -> Reverse
Memory Tip: "Decimal is Divide - then Reverse to arrive!"
Part 2: Other Bases to Decimal
TRICK: "Power Multiply & Add"
Steps:
1. Start from right to left; give powers starting from 0
2. Multiply each digit × (Base^Power)
3. Add all the results
Examples:
- Binary -> Decimal = Multiply digits × 2^n -> Add
- Octal -> Decimal = Multiply digits × 8^n -> Add
- Hex -> Decimal = A-F -> 10-15 -> Multiply × 16^n -> Add
Memory Tip: "Multiply with power, then add like a flower!"
Part 3: Other Base to Another Base (6 Types)
1. Binary <-> Octal
- Binary -> Octal: Group 3 bits -> Convert to Octal
- Octal -> Binary: Each Octal digit -> 3-bit binary
Memory Tip: "3 bits = 1 Octal!"
2. Binary <-> Hex
- Binary -> Hex: Group 4 bits -> Convert to Hex
- Hex -> Binary: Each Hex digit -> 4-bit binary
Memory Tip: "4 bits = 1 Hex!"
3. Octal -> Hex
- Convert Octal -> 3-bit Binary -> Group 4 -> Hex
Memory Tip: "O -> B -> H"
4. Hex -> Octal
- Convert Hex -> 4-bit Binary -> Group 3 -> Octal
Memory Tip: "H -> B -> O"
5. Octal -> Binary: Each digit -> 3-bit binary
Memory Tip: "1 Octal = 3 Binary"
6. Hex -> Binary: Each digit -> 4-bit binary
Memory Tip: "1 Hex = 4 Binary"
Quick Summary Table
From -> To Trick
Decimal -> Binary Divide by 2 -> Reverse
Decimal -> Octal Divide by 8 -> Reverse
Decimal -> Hex Divide by 16 -> A-F -> Reverse
Binary -> Decimal Multiply digits × 2^n -> Add
Octal -> Decimal Multiply digits × 8^n -> Add
Hex -> Decimal A-F = 10-15 -> Multiply × 16^n -> Add
Binary -> Octal Group 3 bits -> Convert to Octal
Octal -> Binary Each digit -> 3-bit binary
Binary -> Hex Group 4 bits -> Convert to Hex
Hex -> Binary Each digit -> 4-bit binary
Octal -> Hex Octal -> Binary -> Hex
Hex -> Octal Hex -> Binary -> Octal