So now let's do it in reverse, binary to decimal
So in this example, if we were given this IP Address in binary notation
how would you convert it to decimal?
So using our table, the 1st bit is set on so that is the equivalent of a 128
2nd bit is off, 3rd bit is on which equates to 32, 4th bit is off
5th bit is on equates to 8, 6th is on equates to 4 and the last 2 bits are set off
So 1st bit is a 128, 64 is not used, 3rd bit is 32, 4th bit is not used
5th bit is 8, 6th bit is 4 and the last 2 bits are not used
that gives us a 128 + 32 + 8 + 4 = 172
So 10101100 in binary equals 172 in decimal
Looking at the 2nd octet, we have 00010000
So in our table, the 4th bit is set on and all the other bits are set off
So this is the equivalent of 16, so 00010000 is equivalent to 16 in decimal
by the same token, in the 3rd octet which is full of 0s except for the last bit
that equates to 1 in decimal or if we populate the octet with binary 1s
that is the equivalent of 255
so that's another example of doing binary to decimal conversion