In this CIDR tutorial we will learn about supernet calculation.

Let's do calculation for IP address ` 112.3.2.3 /25`  We will calculate stepwise.

Step # 1 : Find Subnetmask
How to calculate Subnet Mask from given prefix?

The prefix number represents the network part of IP address.

We know that IPv4 address is made up of 32 bits binary number (4 Octets).

To get subnet mask, we will take a 32 bits binary number in which first 25 bits (here prefix /25) are '1' and remaining are '0'.

```                  `11111111 11111111 111111111 0000000   which is the Subnet Mask!!`
`11111111.11111111.11111111.10000000`
`255 . 255 . 255 . 128 `
```

So the Subnet Mask for prefix /25 is 255.255.255.128.

Step # 2 : Find Network bits and Host bits
How to find Network Bits and Host Bits?

Network Bits(NB) are same as the prefix#, and Host Bits(HB) are 32 - NB.

We know that SM = 32 (Subnetmask is 32 bit binary number). which means NB + HB = 32 (SM = NB + HB)

```                  NB  = 25
HB  = 32 - 25
= 7
```

So Network Bits are 25 and Host Bits are 7 for /25 network.

Step # 3 : Find Maximum Hosts per Subnet.
How to get maximum hosts per subnet?

Hosts per subnet = 2^HB

```                  Hosts  = 2^7
= 128
```

Step # 4 : Find total subnets in given Network.
How to find maximum number of possible subnets in network?

Number of subnets = 2^NB
```                  Subnets  = 2^25
= 33554432
```

With /25 network maximum 33554432 unique subnets possible.

If you have IP address and Subnet Mask (or prefix) you can easily find the Network Address.

All we need to do is Bitwise AND operation between IP address and Subnetmask to get Network Address.

IP Address: Wildcard Mask: 01110000.00000011.00000010.00000011 112.3.2.3 00000000.00000000.00000000.01111111 0.0.0.127 BITWISE OR 01110000.00000011.00000010.01111111 112.3.2.127