• 171

## Learning Opportunities

This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills.

## Goal

The IP address is the address of a computer on a network. In an IP address there are two parts, the network part and the machine part. We can separate the two parts with the mask.

The mask is, in binary, a continuous part of 1s flowing by a continuous part of 0s. It can't be a mixture of 1 and 0.

To know the network address of an IP we proceed like this:
For the entry 192.168.0.15/24, the machine IP is 192.168.0.15 and the mask part is 24.

The mask part means the first 24 bits in the mask are set at 1 and the last ones are set to 0:
In integers that corresponds to 255.255.255.0

To know the network address we take all bits with a 1 in the mask:
192.168.0.15 is in binary
11000000.10101000.00000000.00001111
11111111.11111111.11111111.00000000 -> is the mask in binary
Now the network part of the IP address is:
11000000.10101000.00000000
After, we place all 0 we need to get a total of 32 digits
10000000.10101000.00000000.00000000
In integer that means
192.168.0.0

If we take the same example we got this
192.168.0.15 is in binary
11000000.10101000.00000000.00001111
11111111.11111111.11111111.00000000 -> is the mask in binary
11000000.10101000.00000000.11111111 -> in integer that means 192.168.0.255.
Input
`192.168.0.5/24`
```192.168.0.0