Page 902 of 910 Appendix E: Subnet Mask Conversion from CIDR to Dotted Decimal Format
553-3001-365 Standard 4.00 August 2005
Procedure 129
Converting a subnet mask from CIDR format to dotted decimal format
1Divide the CIDR format value by 8. The quotient (the number of times that
eight divides into the CIDR format value) equals the number of dotted
decimal fields containing 255.
In the example above, the subnet mask is expressed as /20. Twenty
divided by eight equals a quotient of two, with a remainder of four.
Therefore, the first two fields of the subnet mask in dotted decimal format
are 255.255.
2If there is a remainder, refer to Table 123 to obtain the dotted decimal
value for the field following the last field containing “255”. In the example
of /20 above, the remainder is four. In Table 123, a remainder of four
equals a binary value of 1111 0000 and the dotted decimal value of the
next and last field is 240. Therefore the first three fields of the subnet
mask are 255.255.240.
3If there are any remaining fields in the dotted decimal format, they have a
value of 0. Therefore, the complete subnet mask in dotted decimal format
is 255.255.240.0.
End of Procedure
Table 123
CIDR format remainders
Remainder of CIDR
format value divided
by eight Binary value Dotted decimal value
11000 0000 128
21100 0000 192
31110 0000 224
41111 0000 240
51111 1000 248
61111 1100 252
71111 1110 254