There are four bytes/octets or 32 bits utilized in an IPv4 address.
The address 172.16.112.1 can be represented as the following binary number:
10110000 00010000 01110000 00000001
The subnet mask of 25 can also be represented by dotted decimal:
255.255.255.128
Or as a binary number:
11111111 11111111 11111111 10000000
If you bitwise AND the original IPv4 address in binary form with the subnet mask in binary form above, you will determine the subnet address:
11111111 11111111 11111111 10000000
•
10110000 00010000 01110000 00000001
=
10110000 00010000 01110000 00000000
Or
172.16.112.0
Another method is simply to count the number of bits indicated in the subnet mask, 25 in this case, starting from the left most bit of the IPv4 Address and once the number is reached discard the remaining bits leaving the subnet address:
10110000 00010000 01110000 00000001
Leaving:
10110000 00010000 01110000 00000000
Or:
172.16.112.0
As the subnet address.
Hope this explanation helps with your understanding.
BigDog