Forum member Greg "Gutterpunk" Suhr has put together a rather indepth guide detailing subnet masking.
When hearing Subnet Masking, most people just cringe because of the horror stories that are shared throughout networking. In actuality it is fairly simple. The main things you need to understand are:
- Binary to decimal conversions, and decimal to binary
- Understanding on how to separate network bits to host bits
- A brief understanding of the different classifications of IP addresses
In this guide I will cover each of these aspects starting with converting binary to decimal and visa versa. In subnet masking you work with a series of 4 bytes each byte separated by a decimal. This makes up your IP Address. Remember 1 bit = 8 bytes. So each Address contains 8 bytes or 4 bits.
read here
discuss here