What is a Subnet mask?

An IP address is divided into two parts: network and host parts. For example, an IP class A address consists of 8 bits identifying the network and 24 bits identifying the host. This is because the default subnet mask for a class A IP address is 8 bits long. (or, written in dotted decimal notation, What does it mean? Well, like an IP address, a subnet mask also consists of 32 bits. Computers use it to determine the network part and the host part of an address.

Computers work only with bits. The math used to determine a network range is binary AND.

subnet mask

A subnet mask must always be a series of 1s followed by a series of 0s. The 1s here represent a network part, the 0s a host part.

Let’s say that we have the IP address of with the default mask of 8 bits (
First, we need to convert the IP address to binary:

IP address: = 00001010.00000000.00000000.00000001
Subnet mask = 11111111.00000000.00000000.0000000

Computers then use the AND operation to determine the network number:

what is a subnet mask

The computer can then determine the size of the network. Only IP addresses that begin with 10 will be in the same network. So, in this case, the range of addresses in this network is –

If you have any queries related to the topic, please feel free to post them in the comments section.

Leave a Reply

%d bloggers like this: