Chapter 22 Appendix B Converting a Subnet Mask to Binary Code
160
22 Appendix B Converting a Subnet Mask to Binary Code
IP addresses are sometimes followed by their subnet mask expressed in binary (base two) code. This binary
code is called a prefix length. For example, 192.168.1.1 16 is an IP address followed by the prefix length
16. The prefix length 16 represents the subnet mask 255.255.0.0.
The simplest way to convert a legal subnet mask into a prefix length is to use the scientific calculator
located on most PCs. In the sample Windows screen below, click on Start and then move the cursor over
the Program and Accessories headings to arrive at the Calculator heading. Click on the Calculator
heading.
The calculator will appear. Click on the Dec (Decimal) heading. A dot will mark the circle besides the Dec
heading as shown below. (You can ignore the right hand side headings: Degrees, Radians and Grads.)