In: Computer Science
What is the CIDR notation corresponding to a subnet mask of 255.240.0.0?
Please show work.
/12 Explanation: ------------- 255.240.0.0 Let's convert all octets to binary separately Converting 255 to binary Divide 255 successively by 2 until the quotient is 0 > 255/2 = 127, remainder is 1 > 127/2 = 63, remainder is 1 > 63/2 = 31, remainder is 1 > 31/2 = 15, remainder is 1 > 15/2 = 7, remainder is 1 > 7/2 = 3, remainder is 1 > 3/2 = 1, remainder is 1 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 11111111 So, 255 of decimal is 11111111 in binary 255 in binary is 11111111 Converting 240 to binary Divide 240 successively by 2 until the quotient is 0 > 240/2 = 120, remainder is 0 > 120/2 = 60, remainder is 0 > 60/2 = 30, remainder is 0 > 30/2 = 15, remainder is 0 > 15/2 = 7, remainder is 1 > 7/2 = 3, remainder is 1 > 3/2 = 1, remainder is 1 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 11110000 So, 240 of decimal is 11110000 in binary 240 in binary is 11110000 0 in binary is 00000000 ================================================================================== || 255.240.0.0 in binary notation is 11111111.11110000.00000000.00000000 || ================================================================================== number of 1's in 11111111.11110000.00000000.00000000 is 12 so, CIDR notation is /12