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

Example:

Network Bits and Hostsbits for /23 network

NB = Prefix#

NB = 23

We know that NB + HB = 32

HB = 32 - NB

HB = 32 - 23

HB = 7

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 formatCount consicutive '1' fromMSB Number of consicutive '1' is Network Bits. and Number of consicutive '0' is Host Bits.

Example:

Network Bits and Host Bits for Subnet Mask 255.255.255.128

SM = 11111111.11111111.11111111.10000000

We can write as

SM = 11111111111111111111111110000000

Consicutive '1' from

NB = 1111111111111111111111111 and HB = 0000000

Now simply count number of '1' and number of '0' for Network Bits and Host Bits respectively.

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.

Example:

Network Bits and Host Bits from Wildcard Mask 0.0.0.127

WM = 00000000.00000000.00000000.01111111

Now simply count number of '0' and number of '1' for Network Bits and Host Bits respectively.

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 |
---|---|---|

A | 8 | 24 |

B | 16 | 16 |

C | 24 | 8 |

© 2015 - 2021 SubnetCalculator.info