A protocol is a set of rules that determines how computers communicate with each other across networks.
A protocol describes:
The required format of a message.
The way that computers must exchange messages for specific activities.
A routed protocol allows the router to forward data between nodes on different networks.
A routable protocol must provide the ability to assign a network number and a host number to each device.
The network address is obtained by ANDing the address with the network mask.
The reason that a network mask is used is to allow groups of sequential IP addresses to be treated as a single unit.
If this grouping were not allowed, each host would have to be mapped individually for routing. This would be impossible, because according to the Internet Software Consortium there are approximately 250,000,000 hosts on the Internet.