Converting a subnet to a binary number for Challenger Ethernet interface
Host bits
When programming a Challenger V8 panel’s Ethernet settings, you will need to enter a value for host bits. The number of host bits defines the subnet mask.
An IPv4 network mask consists of 32 bits made up of a sequence of ones followed by zeros. The trailing block of zeros designates that part as being the host identifier. The subnet mask determines the size of a sub network, and is assigned by the client’s network administrator. Enter the number of host bits to define the subnet mask.
If the network administrator has not provided the number of host bits, you can convert the decimal value of the subnet mask into binary notation, and then count the zeros. For example:
* If the subnet mask is 255.255.255.0, the binary equivalent is 11111111.11111111.11111111.00000000.
There are 8 zeros, so the number of host bits is 8.
* If the subnet mask is 255.255.192.0, the binary equivalent is 11111111.11111111.11000000.00000000.
There are 14 zeros, so the number of host bits is 14.
* If the subnet mask is 255.0.0.0, the binary equivalent is 11111111.00000000.00000000.00000000.
There are 24 zeros, so the number of host bits is 24.
The follow table lists the number of host bits for various subnet mask values. Host bit values up to 24 are listed,
which is sufficient for about 16 million hosts.
Subnet mask Host bits
255.255.255.254 Do not use
255.255.255.252 Not recommended
255.255.255.248 =3
255.255.255.24 0 =4
255.255.255.224 =5
255.255.255.192 =6
255.255.255.128 =7
255.255.255.0 =8
255.255.254.0 =9
255.255.252.0 =10
255.255.248.0 =11
255.255.240.0 =12
255.255.224.0 =13
255.255.192.0 =14
255.255.128.0 =15
255.255.0.0 =16
255.254.0.0 =17
255.252.0.0 =18
255.248.0.0 =19
255.240.0.0 =20
255.224.0.0 =21
255.192.0.0 =22
255.128.0.0 =23
255.0.0.0 =24