menu
bartleby
search
close search
Hit Return to see all results

How do you convert 172.16.20.55 to binary format?

Question

How do you convert 172.16.20.55 to binary format? 

check_circleAnswer
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

Check out a sample Q&A here.

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

Engineering

Computer Science

Discrete Mathematics

Related Computer Science Q&A

Find answers to questions asked by student like you

Show more Q&A add
question_answer

Q: My assignment wants me to program the hailstone series. I have done that, but my program isn't execu...

A: To input integer value into a string you need to use stringstream class which is declared in sstream...

question_answer

Q: write a program in c++. You work for a box company, and have been asked to write a program to compar...

A: Solution:The C++ program has the following algorithm:Declare and initialize the required variables.D...

question_answer

Q: This is for python For this assignment, you will write a program to simulate a payroll application. ...

A: Instruction for the given program:Add the given Node class in the python file Node.py.Add the given ...

question_answer

Q: Problem: Develop a class encapsulating the concept of a college course, assuming that a course has f...

A: The program has the following algorithm: Course.javaCreate default constructors.Test the “set” metho...

question_answer

Q: How to use ProstgreSQL in my local Java IDE using SSH tunnelingon a Mac using intellj Idea , eclipse...

A: Lets first check about Intellij:1) Open the Database tool window (View | Tool Windows | Database) an...

question_answer

Q: Not very familiar with RAID so I would really appreciate some help and an explanation behind the ans...

A: RAID is an acronym for Redundant Array of Independent Disk. It is a process of storing the data into...

question_answer

Q: Nine coins are placed in a 3x3 matrix with some face up and some face down. You can represent the st...

A: As there is no programming language mentioned, we are writing this program in JAVA. The program is g...

question_answer

Q: How do I convert a number to octal without using modulus, multiplication, and division. Also, I can'...

A: To convert an integer number to octal without using multiplication, division and modulus or any inbu...

question_answer

Q: I need to be find the result of typing: len("Grand Hotel" [:6] . rstrip()) into Python. I constantly...

A: To find the result of the statement len("Grand Hotel" [:6] . rstrip()), you need to use print() func...

Sorry about that. What wasn’t helpful?