The subnet mask when applied to the IP address basically extracts the subnet portion of the IP address. This is done when you apply the AND operation against the IP address. What you do is convert the IP address into a binary number. Then you convert the subnet mask into a binary number. AND the numbers together, and the result is the subnet address.