|  | 10.4 | IP Address Classes
| 10.4.5 | Converting binary IP addresses to decimal equivalents

To convert binary IP addresses to decimal numbers, use the opposite approach you used to convert decimal numbers to binary numbers. Example: Convert the first octet of the binary IP address 10101010.11111111.00000000.11001101 to a dotted decimal number.

1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |  |
27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 |  |
128 | 0 | 32 | 0 | 8 | 0 | 2 | 0 | = | 128 + 32 + 8 + 2 = 170

To convert this IP address, start with the bit that is on the far left side in the first octet. It is 1. You know that the value of a bit in that position is 128, therefore the decimal number starts with a value of 128. The next value is 0, so skip it. The third value is 1; any bit in that position has a value of 32; therefore, you add 32 to 128 to get 160. The fourth bit is 0, so skip it. The fifth bit is 1, which means that you add 8 to the current total of 160, giving you a new total of 168. The sixth bit is also 0, so skip it and the seventh bit is 1, which means add 2 to the current total of 168. The last bit is 0, so you can skip it.