12:37 AM

CONVERTING BINARY TO IP ADDRESS AND VICE VERSA


To convert binary into IP address:

- Fill in the table with all the numbers in the code. For each row, list the number which contains the binary 1. Add up the numbers. Do this to all the rows. Arrange the sum into a 4 8 bit octects

64+16+8+4+2= 94
16+4= 20
128+64+2+1= 195
128+64+16+8+4= 220

Code = 94.20.195.220



The code given : 216.1.21.171


To convert IP address into 32 bit binary code:


- Take the first number(216) and subtract the first number from the left(128). If this result in a positive answer, write the number 1 into the first box. Use this answer to subtract the next number along the row. If this gives a negative number, write the number 0 in the box but do not proceed with the subtraction. Instead use the number for the next one in the row. Repeat this for all the row to produce the binary code

The 32-bit binary had been given so we need to find the IP address by using this method:

216-128-64-16-8= 0
1-1= 0
21-16-4-1= 0
171-128-32-8-2-1= 0



You Might Also Like

0 comments

Lumos

Lumos

Lumos

Lumos

Lumos

Lumos