Share our tools:



 

Step 1: Binary IP Calculation

Step 1 : Binary IP Calculation!
-------------------------------------------------------------
Binary vs. Decimal

Although we all use the decimal notation for an IP address, all calculations are done in binary values. If you want to do any calculation, you must first understand decimal conversion to binary. Every IP address consist of four octets and every octet in an IP address is represented by 8 bits.

octet1 octet2 octet3 octet4
-------------------------------------------------------------
  192   168     90      1


 
Now that you know that every IP has 4 octets, lets take a closer look at on of the octets, octet 1. This octet has a decimal value of 192 which would represent a binary value of 11000000. Every binary value consist of 8 bits, either 1 or 0. If a bit is 1 it is considered "active" or on, if it is 0 it is "not active" or off. But how does 192 make 11000000?

Simple, take a look at the standard binary calculation table below. You see 8 numbers, which represent the 8 bits in a binary value. Place the binary value 11000000 underneath and see what happens.

128 64 32 16 8 4 2 1
-------------------------------------------------------------
 1  1  0  0  0 0 0 0    -- Bits


Because every bit set to 1 is considered active, add the values corresponding with 1's.

128 + 64 = 192.


Another example:

The decimal value 219 would make a binary value of:

 
128 64 32 16 8 4 2 1
-------------------------------------------------------------
 1  1  0  1  1 0 1 1    -- Bits


128 + 64 + 16 + 8 + 2 + 1 = 219



If you would convert all four octets of the ip address 192.168.90.1 in to binary, it would look like this:


octet1      octet2     octet3    octet4
-------------------------------------------------------------
 192         168         90        1
-------------------------------------------------------------
11000000 . 10101000 . 01011010 . 00000001