# Task 7. Number Systems in System Administration

Text of the task. In a workers' settlement of shift workers, a network failure occurred as a result of which one of the devices in the gas extraction complex began to return not the standard display of the device's IP address and subnet mask, but its binary representation. The downtime of the equipment complex, which cannot operate without this device, will lead to losses. It is necessary to urgently restore the decimal representation (1) of the IP address, (2) of the subnet mask, and (3) of the network address with the appropriate punctuation for manual transmission of these values to the extraction complex.

IP address: 10110010101100001110011010101010

Subnet mask: 11111111111111111111111110000000
To convert an IP address and subnet mask from binary to decimal, each of them needs to be divided into octets — combinations of 8 numbers separated by dots. Thus, we get:

IP address: 10110010.10110000.11100110.10101010

Subnet mask: 11111111.11111111.11111111.10000000

Next, each bit of each octet is converted by summing the values of the non-zero bits. For example, let's take the last octet of the IP address:

| Binary |  |  |  |  |  |  |  |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |
| Conversion to decimal |  |  |  |  |  |  |  |
| 128 | 0 | 32 | 0 | 8 | 0 | 2 | 0 |

We get the sum of all decimal numbers: 170. The remaining octets of the IP address and the octets of the subnet mask are calculated similarly. Thus, we get:

$$
\text{IP address: 178.176.230.170}
$$

Subnet mask: 255.255.255.128

To determine the network address, it is necessary to perform a bitwise AND (logical multiplication) of the IP address and the subnet mask in binary form. Since, according to the truth table of the AND operation, only \(1 * 1 = 1\), while \(1 * 0\) and \(0 * 0\) have a value of 0, this operation can be shortened to the last octet, as the first three will completely repeat the IP address.

| Binary |  |  |  |  |  |  |  |
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Bitwise AND |  |  |  |  |  |  |  |
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Conversion to decimal |  |  |  |  |  |  |  |
| 128 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |

Thus, the network address will be: 178.176.230.128