  How do you convert 172.16.20.55 to binary format?

Question

How do you convert 172.16.20.55 to binary format?

Step 1

172.16.20.55 represents IP address in decimal format. In order to convert it into binary format we need to represent each of the four parts of the address as sets of 8 binary digits (a byte)

The 8 bits represent from left to right the decimal values 27,26,25,24,23,22,21,20 , i.e. 128, 64, 32, 16, 8, 4, 2, 1 respectively.

So a value of 10010000 in binary would be

=27 x 1 + 26 x 0 + 25 x 0 + 24 x 1 + 23 x 0 + 22 x 0 + 21 x 0 + 20 x 0

= 144 (in decimal)

Starting with the left most number which is 172 we can convert it into binary form by finding the appropriate set of 1s and 0s.

We accomplish this by dividing the decimal number by the left most value in the byte i.e. 128 and then divide the remainder with the next left most and so on. If the division is possible then we assign 1 to that position and 0 otherwise.

Therefore,

172 / 128 =1 plus remainder of 44 so we try the next position with the remainder

44 / 64 = 0 so we try the next position

44 / 32 = 1 plus r...

Want to see the full answer?

See Solution

Want to see this answer and more?

Our solutions are written by experts, many with advanced degrees, and available 24/7

See Solution
Tagged in

Discrete Mathematics 