Lesson 12: Binary and Hexadecimal Conversion Review
Mastering subnetting requires a solid understanding of binary arithmetic.
Decimal to Binary (The Weight System)
Each position in an 8-bit octet has a decimal weight:
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|
Example: Convert 172 to Binary
- Is 172 >= 128? Yes (1). Remaining: 44.
- Is 44 >= 64? No (0).
- Is 44 >= 32? Yes (1). Remaining: 12.
- Is 12 >= 16? No (0).
- Is 12 >= 8? Yes (1). Remaining: 4.
- Is 4 >= 4? Yes (1). Remaining: 0.
- Is 0 >= 2? No (0).
- Is 0 >= 1? No (0).
Result: 10101100
Introduction to Hexadecimal
Hexadecimal (Base 16) is used extensively for MAC addresses and IPv6. Each hex digit represents exactly 4 binary bits.
| Decimal | Binary | Hex |
|---|---|---|
| 0 | 0000 | 0 |
| 10 | 1010 | A |
| 15 | 1111 | F |
Key Use: 48-bit MAC addresses are displayed as 12 hexadecimal digits.