Net masks - the binary explanation
To really understand the operation of a net mask it is necessary to delve deeper into the life blood of computers – binary; this is native digital, where everything is either a 1 (one) or 0 (zero), on or off, yes or no.
The net mask operation described on the previous page is known as a
11111111.11111111.11111111.11110000
In this case, the four zeroes at the end of the net mask indicate that the local part of the address is formed by only the last four bits. If you use the diagram from the previous example and insert the new net mask, it will have the following effect on the final result:
192 168 142 154
192 168 142 144
Inside a bit-wise AND function
154
10011010
1111 0 0 0 0
Decimal octet prior to AND operation with net mask
Binary equivalent of 154
When you “open up” the last octet of the net mask and look at the binary inside, you can see the last four zero bits preventing any 1’s in the address from falling through.
10010000 | Binary octet after AND |
| operation with net mask |
144 | Decimal equivalent of 10010000 |
|
Thus, when 154 is
54