Author: Tom Large
Last Modified: 12-28-2K
Synopsis: This is a quick run down of Binary numbering and how it relates to IP Address. If you have any questions or comments, I can be reached by sending email to tlarge@thelug.org -- I hope this helps with any questions you might have.
Binary, as it relates to IP Addressing.
With binary, numbers increase by the power of 2, from right to left. Since IP Addresses are 32 bit addresses, broken into four 8 bit octets, we'll be working with 8 bit binary values. So, binary bit values from left to right are: 128, 64, 32, 16, 8, 4, 2, and 1. A quick example will illustrate this.
11111111 Translates to 255. Here's how it works:
(128)+(64)+(32)+(16)+(8)+(4)+(2)+(1)=255
NOTE: In reality this is 256, because we start counting from zero, not 1. So, 0-255 is 256 different values.
Here's a few more for practice:
11010101 is (128)+(64)+(0)+(16)+(0)+(4)+(1)=213
10110100 is (128)+(0)+(32)+(16)+(0)+(4)+(0)+(0)=180
10101010 is (128)+(0)+(32)+(0)+(8)+()+(2)+()=170
00101001 is (0)+(0)+(32)+()+(16)+()+()+(1)=49
OK, now to do some real translations. An IP Address is almost always communicated in dotted decimal notation (nnn.nnn.nnn.nnn), because it's easier for humans to remember four 3 digit numbers, rather than four 8 digit sequences of 1's and 0's. So, here's some translation examples to understand:
010.049.152.230 = 00001010.00110001.10011000.11100110
172.016.037.198 = 10101100.00010000.00100101.11000110
216.112.052.187 = 11011000.11100000.11010000.10111011