Network masks are expressed in one of two forms: The first, know as CIDR notation, is to append a "/" and an integer up to 32 that indicates the number of bits in the binary mask. The second notation is to display the number of bits in the binary mask as four 8-bit octets (cada número separado por um ponto no IP é um octate) in decimal format. Ou seja: the number of available host addresses in a subnet depends on the network prefix size (podendo medir 3,2 ou 1 octeto, de modo que, quanto maior a qntd de hosts, menor o prefix). For example, a network prefix of /24 leaves 8 bits (net prefix size de 3 octetos), or 255 possible host addresses in the subnet. A network prefix of /16 leaves 16 bits (net prefix de 2 octetos), or 65536 possible host addresses in the subnet.
The network address for a subnet is the lowest possible address on a subnet, where the host number is all binary zeros.
The broadcast address for a subnet is the highest possible address on a subnet, where the host number is all binary ones, and is a special address for broadcasting packets to all subnet hosts.
The gateway address for a subnet can be any unique host number in the subnet, but is commonly set to the first available host number, which is a binary number of all zeroes except for a '1' in the last bit. This gateway numbering convention is not mandatory, and subnets that do not need external communication will not set a network gateway.