2 to the power of x

Binary means dual or double. Those 2 numbers are 1 or 0

  • Combination can either be 1-0, 0-1, 0-0, 1-1.

  • Because a Binary is just 2 numbers hence it is always calculated in the power of 2.

  • E.g. If we have 1 Binary bit that means its (decimal) value is 2. If we have 2 binary then we have to calculate 2x2=4 (which is also called (22). If we have 3 binary then it’s Decimal value is (23)=2x2x2=8.

  • An IP Address (E.g. 10.0.0.1) is 4 Byte (which means 32 bits) Decimal Address divided into 4 parts (1 byte for 1 part) separated by a dot.

  • Each byte is 8 binary bits. Those 8 bits look like this…

Binary Value

1

1

1

1

1

1

1

1

Power of 2

(2^7)

2^6)

2^5)

2^4)

2^3)

2^2)

2^1)

2^0)

Calculation

2x2x2x2x2x2x2x

2x2x2x2x2x2

2x2x2x2x2

2x2x2x2

2x2x2

2x2

2

1

  • If However, we add all these bits then it becomes…

    128+64+32+16+8+4+2+1 = 255. That means we have 1-255 IP Addresses in a single octet/byte.

Reference:

Last updated