← IP Addressing & Subnetting learning path
IP Addressing & Subnetting · Module 2 of 10

Binary and decimal conversion

Convert between binary and decimal for subnetting.

📖 Key ideas

  1. Each octet has bit values 128, 64, 32, 16, 8, 4, 2, 1.
  2. Add the values of bits set to 1 to get decimal.
  3. To convert decimal to binary, subtract the largest bit values.
  4. 255 = 11111111; 0 = 00000000.
  5. Practice makes subnetting fast.
💡 Real-life example: Binary bits are light switches with price tags (128, 64 ... 1); add the prices of switches that are on.
BitBinary digit 0 or 1
Place valueValue of each bit position
11111111255 in decimal
BinaryBase-2 number system