For your example of
172.16.0.0 is both the IPv4 network address and a host address, but not a usable host address. It could be the network address, and it may be a usable host address with a different mask length (for example, it is a usable host address with a
/11 or shorter mask length). It could even be both a network address and a usable host address if the mask length is
/16 tells you the length of the mask (number of consecutive
1 bits), and I call it the mask length (can be called the prefix length, depending on the context).
An IPv4 address is a 32-bit unsigned integer (a binary cardinal number from
4294967295 in decimal). Don't read anything into the fact that it is expressed as four decimal octets; that is simply to make it easier for humans to read; network devices deal with the binary number, not the text representation.
A network mask for IPv4 is also a 32-bit unsigned integer, but it consists of consecutive bits set to
1, followed by any other bits set to
0. The mask determines which part of the IP address is the network, and which part is the host number in the network.
If you do a bitwise
AND of the IP address and the mask, you will get the network address. You need to do IP math in binary; trying to use decimal will lead to stupid errors.
IPv4 address 172.16.0.0 -> 10101100000100000000000000000000
Mask length 16 -> 11111111111111110000000000000000
Bitwise AND -> ================================
IPv4 network address -> 10101100000100000000000000000000
If you have an address and mask, you have everything you need to calculate everything about the IPv4 address. See the question, How do you calculate the prefix, network, subnet, and host numbers? for how to do IP math.
IPv6 addressing works the same way, except that IPv6 addresses are 128 bits instead of the IPv4 32 bits, and all IPv6 addresses in a network are usable host addresses because IPv6 does not have broadcast.