In: Computer Science
find the broadcast address for 10.248.139.232 with mask 255.255.255.252
Answer: -------- 10.248.139.235 Explanation: ------------- IP Address: 10.248.139.232 ---------------------------------------- Let's first convert this into binary format 10.248.139.232 Let's convert all octets to binary separately Converting 10 to binary Divide 10 successively by 2 until the quotient is 0 > 10/2 = 5, remainder is 0 > 5/2 = 2, remainder is 1 > 2/2 = 1, remainder is 0 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 1010 So, 10 of decimal is 1010 in binary 10 in binary is 00001010 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 So, 248 of decimal is 11111000 in binary 248 in binary is 11111000 Converting 139 to binary Divide 139 successively by 2 until the quotient is 0 > 139/2 = 69, remainder is 1 > 69/2 = 34, remainder is 1 > 34/2 = 17, remainder is 0 > 17/2 = 8, remainder is 1 > 8/2 = 4, remainder is 0 > 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 10001011 So, 139 of decimal is 10001011 in binary 139 in binary is 10001011 Converting 232 to binary Divide 232 successively by 2 until the quotient is 0 > 232/2 = 116, remainder is 0 > 116/2 = 58, remainder is 0 > 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 11101000 So, 232 of decimal is 11101000 in binary 232 in binary is 11101000 ===================================================================================== || 10.248.139.232 in binary notation is 00001010.11111000.10001011.11101000 || ===================================================================================== Subnet address: 255.255.255.252 ---------------------------------------- Let's convert this into binary format 255.255.255.252 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 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 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 252 to binary Divide 252 successively by 2 until the quotient is 0 > 252/2 = 126, remainder is 0 > 126/2 = 63, remainder is 0 > 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 11111100 So, 252 of decimal is 11111100 in binary 252 in binary is 11111100 ====================================================================================== || 255.255.255.252 in binary notation is 11111111.11111111.11111111.11111100 || ====================================================================================== Remove all dots to form 11111111111111111111111111111100 Remove all 0's from the right side to form 111111111111111111111111111111 Number of 1's in this is 30 so, Subnet mask is /30 For Calculating broadcast ID, keep first 30 bits of 00001010.11111000.10001011.11101000 and set all remaining bits to 1. so, broadcast ID in binary is 00001010.11111000.10001011.11101011 00001010.11111000.10001011.11101011: ---------------------------------------- 00001010.11111000.10001011.11101011 Let's convert all octets to decimal separately Converting 00001010 to decimal Converting 00001010 to decimal 00001010 => 0x2^7+0x2^6+0x2^5+0x2^4+1x2^3+0x2^2+1x2^1+0x2^0 => 0x128+0x64+0x32+0x16+1x8+0x4+1x2+0x1 => 0+0+0+0+8+0+2+0 => 10 00001010 in decimal is 10 Converting 11111000 to decimal Converting 11111000 to decimal 11111000 => 1x2^7+1x2^6+1x2^5+1x2^4+1x2^3+0x2^2+0x2^1+0x2^0 => 1x128+1x64+1x32+1x16+1x8+0x4+0x2+0x1 => 128+64+32+16+8+0+0+0 => 248 11111000 in decimal is 248 Converting 10001011 to decimal Converting 10001011 to decimal 10001011 => 1x2^7+0x2^6+0x2^5+0x2^4+1x2^3+0x2^2+1x2^1+1x2^0 => 1x128+0x64+0x32+0x16+1x8+0x4+1x2+1x1 => 128+0+0+0+8+0+2+1 => 139 10001011 in decimal is 139 Converting 11101011 to decimal Converting 11101011 to decimal 11101011 => 1x2^7+1x2^6+1x2^5+0x2^4+1x2^3+0x2^2+1x2^1+1x2^0 => 1x128+1x64+1x32+0x16+1x8+0x4+1x2+1x1 => 128+64+32+0+8+0+2+1 => 235 11101011 in decimal is 235 ====================================================================================== || 00001010.11111000.10001011.11101011 in decimal notation is 10.248.139.235 || ====================================================================================== =============================================== || So, broadcast ID is 10.248.139.235 || ===============================================