The subnet mask itself is an IP Address so it is also 32 bits
In IPv4, there are a total of 32 bits in an IP address. The number of network and host bits varies depending on the subnet mask used. Typically, the first part of the bits represents the network portion, while the remaining bits represent the host portion. For example, in a common subnet mask of 255.255.255.0 (or /24), there are 24 bits for the network and 8 bits for hosts.
A subnet with a prefix of /100 indicates that the first 100 bits of the IP address are fixed for the network portion. However, since IPv4 addresses are only 32 bits long, a subnet mask of /100 is not valid in this context. In IPv6, which allows for longer prefixes, a /100 subnet would have 100 bits dedicated to the network, leaving 28 bits for host addresses.
32 bits in a IPv4 address
a TcP IPv4 ip address has 32 bits.
32
IPv4 => 32 bits => 4 bytes
we need to borrow 7 bits to subnet 172.16.100.0 to have at least 500 hosts and the subnet mask will be 255.255.254.0
There are 16 bits available; it is up to you how many of those bits you reserve for the subnet, and how many for the individual hosts within each subnet.
64 bits
The subnet mask for a /26 subnet indicates that the first 26 bits are used for the network portion, leaving 6 bits for the host portion. In this case, the subnet 172.168.2.0/26 can accommodate 2^6 = 64 addresses, but only 62 are usable for hosts (subtracting the network and broadcast addresses). Thus, there are 26 bits designated for the network and 6 bits for hosts within this subnet.
32 Bits 4 Octets with 1 Byte each(8 Bits)
16 bits per block