In digital electronics, numbers aren't just about the 0-9 we use every day. Computers use different "bases" to process data efficiently. This guide breaks down how these systems work and how to jump between them using the methods from my study notes.
1. The Big Three: Bases & Digits
| System | Base | Used Digits/Symbols |
|---|---|---|
| Binary | 2 | 0, 1 |
| Octal | 8 | 0, 1, 2, 3, 4, 5, 6, 7 |
| Hexadecimal | 16 | 0-9 and A, B, C, D, E, F |
2. Conversion: Decimal to Any Base
To convert from our standard Decimal system to Binary, Octal, or Hex, we use Repeated Division. You divide by the base you are moving to and track the remainders.
Example: Convert (25)₁₀ to Binary
25 ÷ 2 = 12 ... Remainder 1 (LSB)
12 ÷ 2 = 6 ... Remainder 0
6 ÷ 2 = 3 ... Remainder 0
3 ÷ 2 = 1 ... Remainder 1
1 ÷ 2 = 0 ... Remainder 1 (MSB)
Result (Read Bottom to Top): 11001₂
3. The Grouping Method (Shortcut)
Converting between Binary, Octal, and Hex is much easier because they are all powers of 2. We can simply group the bits.
Binary to Octal (Groups of 3)
Since 2³ = 8, we group binary digits in threes starting from the right.
Binary to Hexadecimal (Groups of 4)
Since 2⁴ = 16, we group binary digits in fours.
Example: Convert (10110110)₂ to Hex
Step 1: Group into 4s -> (1011) (0110)
Step 2: Convert each group -> (11) (6)
Step 3: In Hex, 11 = B. So, B6₁₆
4. Quick Reference Table
Keep this table handy for the most common values:
| Decimal | Binary (4-bit) | Hexadecimal |
|---|---|---|
| 8 | 1000 | 8 |
| 10 | 1010 | A |
| 12 | 1100 | C |
| 15 | 1111 | F |