In the process of computing networks, in preparation for CCNA, I found an interesting pattern, based on which you can quickly calculate the network address, as well as its broadcast address without much effort. I have not seen this method in the literature before.
So, we have an arbitrary IP address - 192.170.175.83/13 and our 1 task is to calculate the network address, for this we look at the second octet, since it contains both the network and the host part. 3 bits are allocated to the host part in the second octet, which gives us 8 (2 ^ 3) variable host addresses in this octet, i.e. each subnet in this octet will contain 8 mutable addresses. Now we divide the number presented in the third octet by the number of changeable addresses - 170/8 = 21.25, as a result of the division, we received the number of the required subnet - 21 (the fractional part is of no interest to us). Knowing the number of the subnet, and the number of changeable addresses in it, we can calculate its address, for this 21 * 8 = 168. Total - the network address will be 192.168.0.0.
Task number 2 is to calculate the broadcast address, for this we add 168 the number of changing addresses and subtract one: 168 + 8 - 1 = 175, therefore the broadcast address of this subnet is 192.175.255.255.
And about the last two octets in my example - if the mask in the octet is zero, then in the network address it will always be 0, and the broadcast address will always be 255.
')
PS: If this method previously met someone - please give a link.