Mask Conversion Drill 2
For each Mask Conversion Drill post, you’ll find a mix of DDN and prefix masks. Your job is to convert each to a binary mask first and then to the other format.
Videos: How to and More Practice
The left video teaches you how to convert masks. Then, you can get even more practice using the other two videos.
The Masks to Convert
For each problem, if a DDN mask is listed, determine the prefix mask. If a prefix mask is listed, determine the DDN mask.
Problem | DDN Mask | Prefix Mask |
---|---|---|
1 | 255.255.240.0 | |
2 | /19 | |
3 | 255.254.0.0 | |
4 | /26 | |
5 | 255.255.255.224 |
Answers Below: Spoiler Alert
This table lists the answers. Look to the Explanation tabs for detail about the conversion process.
Problem | DDN Mask | Prefix Mask |
---|---|---|
1 | 255.255.240.0 | /20 |
2 | 255.255.224.0 | /19 |
3 | 255.254.0.0 | /15 |
4 | 255.255.255.192 | /26 |
5 | 255.255.255.224 | /27 |
This problem begins with a DDN Mask. Use this table of the nine possible DDN values in a mask octet as a reminder of the conversion to binary and to the number of binary 1’s in the 8-bit binary equivalent number.
DDN Octet | 8-Bit Binary | Number of Binary 1’s |
---|---|---|
0 | 00000000 | 0 |
128 | 10000000 | 1 |
192 | 11000000 | 2 |
224 | 11100000 | 3 |
240 | 11110000 | 4 |
248 | 11111000 | 5 |
252 | 11111100 | 6 |
254 | 11111110 | 7 |
255 | 11111111 | 8 |
Explanations for Each Problem
The following table lists the major actions. The first row shows the DDN mask separated by octet. The second row displays the number of binary 1’s in the binary equivalent of each octet. The final row shows the sum of the binary 1’s, with the prefix mask being shown as /P, where P is that total.
Action | Octet1 | Octet2 | Octet3 | Octet4 |
---|---|---|---|---|
Mask by Octet | 255 | 255 | 240 | 0 |
1’s Per Octet | 8 | 8 | 4 | 0 |
Sum of 1’s (P) | 20 | . | . | . |
The following table lists the major actions. The first row shows the prefix mask value. The second row displays the Binary 1’s in the binary mask, organized by octet, beginning on the left. The third row completes the binary mask by inserting 0’s into the remaining bit positions. The final row shows the conversion of each 8-bit value, octet-by-octet, to decimal.
Action | Octet1 | Octet2 | Octet3 | Octet4 |
---|---|---|---|---|
Prefix Mask | /19 | . | . | . |
Binary 1’s in Mask | 11111111 | 11111111 | 111 | . |
Binary 0’s Added | 11111111 | 11111111 | 11100000 | 00000000 |
8-Bits to Decimal | 255 | 255 | 224 | 0 |
The following table lists the major actions. The first row shows the DDN mask separated by octet. The second row displays the number of binary 1’s in the binary equivalent of each octet. The final row shows the sum of the binary 1’s, with the prefix mask being shown as /P, where P is that total.
Action | Octet1 | Octet2 | Octet3 | Octet4 |
---|---|---|---|---|
Mask by Octet | 255 | 254 | 0 | 0 |
1’s Per Octet | 8 | 7 | 0 | 0 |
Sum of 1’s (P) | 15 | . | . | . |
The following table lists the major actions. The first row shows the prefix mask value. The second row displays the Binary 1’s in the binary mask, organized by octet, beginning on the left. The third row completes the binary mask by inserting 0’s into the remaining bit positions. The final row shows the conversion of each 8-bit value, octet-by-octet, to decimal.
Action | Octet1 | Octet2 | Octet3 | Octet4 |
---|---|---|---|---|
Prefix Mask | /26 | . | . | . |
Binary 1’s in Mask | 11111111 | 11111111 | 11111111 | 11 |
Binary 0’s Added | 11111111 | 11111111 | 11111111 | 11000000 |
8-Bits to Decimal | 255 | 255 | 255 | 192 |
The following table lists the major actions. The first row shows the DDN mask separated by octet. The second row displays the number of binary 1’s in the binary equivalent of each octet. The final row shows the sum of the binary 1’s, with the prefix mask being shown as /P, where P is that total.
Action | Octet1 | Octet2 | Octet3 | Octet4 |
---|---|---|---|---|
Mask by Octet | 255 | 255 | 255 | 224 |
1’s Per Octet | 8 | 8 | 8 | 3 |
Sum of 1’s (P) | 27 | . | . | . |