Conversion of Decimal IP Address 100.235.2.2 to Binary
| |
First Octet |
Second Octet |
Third Octet |
Fourth
Octet |
|
Decimal octet |
100 |
235 |
2 |
2 |
|
Each octet converted to binary (Step 1) |
1100100 |
11101011 |
10 |
10 |
|
Binary octets, after putting 0s in front (Step 2) |
01100100 |
11101011 |
00000010 |
00000010 |
|
Resulting 32-bit number (Step 3) |
01100100111010110000001000000010 |
Table B-15 begins
with the decimal IP address in the first row, and the results of each of the
three conversion steps in the next three rows. The actual math for converting
the decimal numbers (Step 1) is not shown, but you can refer to the previous
section for examples using decimal 100 and 235. For the first, third, and fourth
octets, the converted binary numbers are less than 8 bits long, so at Step 2,
binary 0s were added to the left to make them all 8 bits long. Step 3 just lists
all 32 bits in succession. In real life, there's no need to actually write down
Step 3; you can just see the 4 sets of 8 bits all in a row and think of it as a
32-bit number.