Step 1 — Binary Fundamentals

Binary is the foundation of subnetting. Before touching IP addresses, you need to understand how binary works. This step teaches you from absolute zero — no prior knowledge required.

What is Binary?

Binary is a number system that uses only two digits: 0 and 1. Every number we use in networking can be represented in binary.

Computers use binary because they store information as on/off switches. Each switch is a bit — either 0 (off) or 1 (on).

Why 8 Bits = 255

An octet is exactly 8 bits. With 8 switches, you can create 256 different combinations (2⁸ = 256). Since we start counting at 0, the range is 0 to 255.

Minimum: 00000000 = 0
Maximum: 11111111 = 255
Total combinations: 256 (0-255)

Binary Place Values

Just like decimal has place values (ones, tens, hundreds), binary has place values. Each position doubles as you move left.

1286432168421
2⁷2⁶2⁵2⁴2⁰
1286432168421

Memorize these values: 128, 64, 32, 16, 8, 4, 2, 1. This pattern appears constantly in subnetting.

Converting Decimal to Binary

To convert a decimal number to binary, start from the left and ask: "Can this place value fit?" If yes, put a 1 and subtract. If no, put a 0.

Example: Convert 192 to binary

  1. 192 ≥ 128? Yes → write 1, remainder = 192 - 128 = 64
  2. 64 ≥ 64? Yes → write 1, remainder = 64 - 64 = 0
  3. 0 ≥ 32? No → write 0
  4. 0 ≥ 16? No → write 0
  5. 0 ≥ 8? No → write 0
  6. 0 ≥ 4? No → write 0
  7. 0 ≥ 2? No → write 0
  8. 0 ≥ 1? No → write 0

Result: 192 = 11000000

Example: Convert 85 to binary

  1. 85 ≥ 128? No → write 0
  2. 85 ≥ 64? Yes → write 1, remainder = 85 - 64 = 21
  3. 21 ≥ 32? No → write 0
  4. 21 ≥ 16? Yes → write 1, remainder = 21 - 16 = 5
  5. 5 ≥ 8? No → write 0
  6. 5 ≥ 4? Yes → write 1, remainder = 5 - 4 = 1
  7. 1 ≥ 2? No → write 0
  8. 1 ≥ 1? Yes → write 1, remainder = 1 - 1 = 0

Result: 85 = 01010101

Converting Binary to Decimal

Add up the place values where there's a 1.

Example: Convert 11001100 to decimal

1286432168421
11001100

Add the place values where there's a 1:
128 + 64 + 8 + 4 = 204

Practice Exercises

Do these now. Don't skip ahead until you can solve them quickly.

1. Convert to binary:

  1. 255
  2. 128
  3. 64
  4. 224
  5. 10

2. Convert to decimal:

  1. 10110101
  2. 11001111
  3. 00111100
  4. 10011001
  5. 01011010
Show Answers

1. Decimal to Binary:

  1. 255 = 11111111
  2. 128 = 10000000
  3. 64 = 01000000
  4. 224 = 11100000
  5. 10 = 00001010

2. Binary to Decimal:

  1. 10110101 = 181 (128 + 32 + 16 + 4 + 1)
  2. 11001111 = 207 (128 + 64 + 8 + 4 + 2 + 1)
  3. 00111100 = 60 (32 + 16 + 8 + 4)
  4. 10011001 = 153 (128 + 16 + 8 + 1)
  5. 01011010 = 90 (64 + 16 + 8 + 2)

Checkpoint

Before moving to Step 2, make sure you can:

  • Explain why 8 bits gives us 0-255 (256 values)
  • Recite the place values from memory: 128, 64, 32, 16, 8, 4, 2, 1
  • Convert any decimal (0-255) to binary without hesitation
  • Convert any 8-bit binary back to decimal

If any of these feel shaky, practice more. Subnetting builds on this foundation.