We can find Network Bits and Host Bits from any below information available.
How to find Network Bits and Host Bits from prefix?
Prefix or CIDR Netmask represents network part of IP address.
So, Network Bits = Prefix #
Network Bits and Host Bits together forms 32 bits binary number(Subnet Mask).
NB + HB = 32
HB = 32 - NB
Network Bits and Hostsbits for /23 network
How to find Network Bits and Host Bits from Subnet Mask?
As mentioned before Subnet Mask is 32 bits binary number. Which consists of Network Bits and Host Bits.
SM = NB + HB
Convert Subnet Mask in binary format Count consicutive '1' from
MSBNumber of consicutive '1' is Network Bits. and Number of consicutive '0' is Host Bits.
Network Bits and Host Bits for Subnet Mask 255.255.255.128
How to find Network Bits and Host Bits from Wildcard Mask?
Wildcard Mask is inverted binary of Subnet Mask.
WM = ~SM
We can say '1' represents Host Bits and '0' represents Network Bits.
Network Bits and Host Bits from Wildcard Mask 0.0.0.127
How to find Netwokbits and Host Bits from Class information?
Classful IP address allocating scheme were designed on basic of predefined block of IP ranges.
Default Network Bits and Host Bits for classes are as below
|Class||Network Bits||Host Bits|