In: Computer Science
IP address: 158.234.28.72 Subnet Mask: 255.248.0.0 Find Network Address and Broadcast address. Provide all necessary steps.
IP Address: 158.234.28.72 ---------------------------------------- Let's first convert this into binary format 158.234.28.72 Let's convert all octets to binary separately Converting 158 to binary Divide 158 successively by 2 until the quotient is 0 158/2 = 79, remainder is 0 79/2 = 39, remainder is 1 39/2 = 19, remainder is 1 19/2 = 9, remainder is 1 9/2 = 4, remainder is 1 4/2 = 2, remainder is 0 2/2 = 1, remainder is 0 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 10011110 158 in binary is 10011110 Converting 234 to binary Divide 234 successively by 2 until the quotient is 0 234/2 = 117, remainder is 0 117/2 = 58, remainder is 1 58/2 = 29, remainder is 0 29/2 = 14, remainder is 1 14/2 = 7, remainder is 0 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 11101010 234 in binary is 11101010 Converting 28 to binary Divide 28 successively by 2 until the quotient is 0 28/2 = 14, remainder is 0 14/2 = 7, remainder is 0 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 11100 28 in binary is 00011100 Converting 72 to binary Divide 72 successively by 2 until the quotient is 0 72/2 = 36, remainder is 0 36/2 = 18, remainder is 0 18/2 = 9, remainder is 0 9/2 = 4, remainder is 1 4/2 = 2, remainder is 0 2/2 = 1, remainder is 0 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 1001000 72 in binary is 01001000 ==================================================================================== || 158.234.28.72 in binary notation is 10011110.11101010.00011100.01001000 || ==================================================================================== Subnet address: 255.248.0.0 ---------------------------------------- Let's convert this into binary format 255.248.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 255 in binary is 11111111 Converting 248 to binary Divide 248 successively by 2 until the quotient is 0 248/2 = 124, remainder is 0 124/2 = 62, remainder is 0 62/2 = 31, remainder is 0 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 11111000 248 in binary is 11111000 Converting 0 to binary Divide 0 successively by 2 until the quotient is 0 Read remainders from the bottom to top as 0 in binary is 00000000 Converting 0 to binary Divide 0 successively by 2 until the quotient is 0 Read remainders from the bottom to top as 0 in binary is 00000000 ================================================================================== || 255.248.0.0 in binary notation is 11111111.11111000.00000000.00000000 || ================================================================================== Remove all dots to form 11111111111110000000000000000000 Remove all 0's from the right side to form 1111111111111 Number of 1's in this is 13 so, Subnet mask is /13 For Calculating network ID, keep first 13 bits of 10011110.11101010.00011100.01001000 and set all remaining bits to 0. so, network ID in binary is 10011110.11101000.00000000.00000000 10011110.11101000.00000000.00000000: ---------------------------------------- 10011110.11101000.00000000.00000000 Let's convert all octets to decimal separately Converting 10011110 to decimal => 10011110 => 1x2^7+0x2^6+0x2^5+1x2^4+1x2^3+1x2^2+1x2^1+0x2^0 => 1x128+0x64+0x32+1x16+1x8+1x4+1x2+0x1 => 128+0+0+16+8+4+2+0 => 158 10011110 in decimal is 158 Converting 11101000 to decimal => 11101000 => 1x2^7+1x2^6+1x2^5+0x2^4+1x2^3+0x2^2+0x2^1+0x2^0 => 1x128+1x64+1x32+0x16+1x8+0x4+0x2+0x1 => 128+64+32+0+8+0+0+0 => 232 11101000 in decimal is 232 Converting 00000000 to decimal => 00000000 => 0x2^7+0x2^6+0x2^5+0x2^4+0x2^3+0x2^2+0x2^1+0x2^0 => 0x128+0x64+0x32+0x16+0x8+0x4+0x2+0x1 => 0+0+0+0+0+0+0+0 => 0 00000000 in decimal is 0 Converting 00000000 to decimal => 00000000 => 0x2^7+0x2^6+0x2^5+0x2^4+0x2^3+0x2^2+0x2^1+0x2^0 => 0x128+0x64+0x32+0x16+0x8+0x4+0x2+0x1 => 0+0+0+0+0+0+0+0 => 0 00000000 in decimal is 0 =================================================================================== || 10011110.11101000.00000000.00000000 in decimal notation is 158.232.0.0 || =================================================================================== ========================================== || So, Network ID is 158.232.0.0 || ========================================== For Calculating broadcast ID, keep first 13 bits of 10011110.11101010.00011100.01001000 and set all remaining bits to 1. so, broadcast ID in binary is 10011110.11101111.11111111.11111111 10011110.11101111.11111111.11111111: ---------------------------------------- 10011110.11101111.11111111.11111111 Let's convert all octets to decimal separately Converting 10011110 to decimal => 10011110 => 1x2^7+0x2^6+0x2^5+1x2^4+1x2^3+1x2^2+1x2^1+0x2^0 => 1x128+0x64+0x32+1x16+1x8+1x4+1x2+0x1 => 128+0+0+16+8+4+2+0 => 158 10011110 in decimal is 158 Converting 11101111 to decimal => 11101111 => 1x2^7+1x2^6+1x2^5+0x2^4+1x2^3+1x2^2+1x2^1+1x2^0 => 1x128+1x64+1x32+0x16+1x8+1x4+1x2+1x1 => 128+64+32+0+8+4+2+1 => 239 11101111 in decimal is 239 Converting 11111111 to decimal => 11111111 => 1x2^7+1x2^6+1x2^5+1x2^4+1x2^3+1x2^2+1x2^1+1x2^0 => 1x128+1x64+1x32+1x16+1x8+1x4+1x2+1x1 => 128+64+32+16+8+4+2+1 => 255 11111111 in decimal is 255 Converting 11111111 to decimal => 11111111 => 1x2^7+1x2^6+1x2^5+1x2^4+1x2^3+1x2^2+1x2^1+1x2^0 => 1x128+1x64+1x32+1x16+1x8+1x4+1x2+1x1 => 128+64+32+16+8+4+2+1 => 255 11111111 in decimal is 255 ======================================================================================= || 10011110.11101111.11111111.11111111 in decimal notation is 158.239.255.255 || ======================================================================================= ================================================ || So, broadcast ID is 158.239.255.255 || ================================================