In: Computer Science
Enter the first usable host on the network 12.48.105.97 255.255.252.0.
Please show work.
12.48.104.1 Explanation: ------------- IP Address: 12.48.105.97 ---------------------------------------- Let's first convert this into binary format 12.48.105.97 Let's convert all octets to binary separately Converting 12 to binary Divide 12 successively by 2 until the quotient is 0 > 12/2 = 6, remainder is 0 > 6/2 = 3, remainder is 0 > 3/2 = 1, remainder is 1 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 1100 So, 12 of decimal is 1100 in binary 12 in binary is 00001100 Converting 48 to binary Divide 48 successively by 2 until the quotient is 0 > 48/2 = 24, remainder is 0 > 24/2 = 12, remainder is 0 > 12/2 = 6, remainder is 0 > 6/2 = 3, remainder is 0 > 3/2 = 1, remainder is 1 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 110000 So, 48 of decimal is 110000 in binary 48 in binary is 00110000 Converting 105 to binary Divide 105 successively by 2 until the quotient is 0 > 105/2 = 52, remainder is 1 > 52/2 = 26, remainder is 0 > 26/2 = 13, remainder is 0 > 13/2 = 6, remainder is 1 > 6/2 = 3, remainder is 0 > 3/2 = 1, remainder is 1 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 1101001 So, 105 of decimal is 1101001 in binary 105 in binary is 01101001 Converting 97 to binary Divide 97 successively by 2 until the quotient is 0 > 97/2 = 48, remainder is 1 > 48/2 = 24, remainder is 0 > 24/2 = 12, remainder is 0 > 12/2 = 6, remainder is 0 > 6/2 = 3, remainder is 0 > 3/2 = 1, remainder is 1 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 1100001 So, 97 of decimal is 1100001 in binary 97 in binary is 01100001 =================================================================================== || 12.48.105.97 in binary notation is 00001100.00110000.01101001.01100001 || =================================================================================== Subnet address: 255.255.252.0 ---------------------------------------- Let's convert this into binary format 255.255.252.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 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 Converting 0 to binary Divide 0 successively by 2 until the quotient is 0 Read remainders from the bottom to top as So, 0 of decimal is in binary 0 in binary is 00000000 ==================================================================================== || 255.255.252.0 in binary notation is 11111111.11111111.11111100.00000000 || ==================================================================================== Remove all dots to form 11111111111111111111110000000000 Remove all 0's from the right side to form 1111111111111111111111 Number of 1's in this is 22 so, Subnet mask is /22 For Calculating network ID, keep first 22 bits of 00001100.00110000.01101001.01100001 and set all remaining bits to 0. so, network ID in binary is 00001100.00110000.01101000.00000000 00001100.00110000.01101000.00000000: ---------------------------------------- 00001100.00110000.01101000.00000000 Let's convert all octets to decimal separately Converting 00001100 to decimal Converting 00001100 to decimal 00001100 => 0x2^7+0x2^6+0x2^5+0x2^4+1x2^3+1x2^2+0x2^1+0x2^0 => 0x128+0x64+0x32+0x16+1x8+1x4+0x2+0x1 => 0+0+0+0+8+4+0+0 => 12 00001100 in decimal is 12 Converting 00110000 to decimal Converting 00110000 to decimal 00110000 => 0x2^7+0x2^6+1x2^5+1x2^4+0x2^3+0x2^2+0x2^1+0x2^0 => 0x128+0x64+1x32+1x16+0x8+0x4+0x2+0x1 => 0+0+32+16+0+0+0+0 => 48 00110000 in decimal is 48 Converting 01101000 to decimal Converting 01101000 to decimal 01101000 => 0x2^7+1x2^6+1x2^5+0x2^4+1x2^3+0x2^2+0x2^1+0x2^0 => 0x128+1x64+1x32+0x16+1x8+0x4+0x2+0x1 => 0+64+32+0+8+0+0+0 => 104 01101000 in decimal is 104 Converting 00000000 to decimal 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 =================================================================================== || 00001100.00110000.01101000.00000000 in decimal notation is 12.48.104.0 || =================================================================================== ========================================== || So, Network ID is 12.48.104.0 || ========================================== For Calculating first valid address in subnet, add 1 to the network address. Network Address is 12.48.104.0 ============================================================= || So, first valid address in subnet is 12.48.104.1 || =============================================================