Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

An Internet Protocol address (IP address) is a numerical bit pattern assigned to

ID: 3738499 • Letter: A

Question

An Internet Protocol address (IP address) is a numerical bit pattern assigned to each device (e.g, computer, printer) participating in a computer network that uses the internet for An IP address serves two purposes: 1) host identification and 2) location addressing IPv4 uses 32-bi four-bytes) addresses. IPv4 addresses may be written in any notation expressing a 32-bit integer value, but for human convenience, they are most often writ- ten in the dot-decimal notation, which consists of four octets of the address expressed individually in decimal and separated by periods. However, IPv4 addresses can also be expressed in Octal, Decimal, Hexadecimal etc as shown in the Table 2. Table 2: The following table shows several representation of the IP Address 192.0.2.235 Notes Format 32 Bits Dotted Decimal Dotted Hexadecimal CO.00.02.EB Dotted Octal Value 1100 0000 0000 0000 0000 0010 1110 1011 Hardware bit pattern 192.0.2.235 0300.0000.0002.0353 C00002EB 3221226219 30000001353 Each 8-bits is expressed as decimal Each 8-bits expressed as hexadecimal Each 8-bits expressed as octal 32-bit binary number in hexadecimal 32-bit binary number in decimal 32-bit Decimal Octal number in octal Question 2 tasks a) Consider the following IP address given in dotted decimal format 127.0.255.1. Con vert it to the following formats. i) Decimal format. ii Binary format. iii Octal format. b) You are given an IP address: 01110111 0011 0000 1000 1000 1000 1001 as a 32-bit binary number. Convert this number to: i Dotted Hexadecimal format. ii) Octal format. iii Dotted Decimal format. c) Instead of using four bytes we decide to use six bytes (48 bits) to store the address. How many addresses can be represented with this number of bits? How does it relate to the number of bits?

Explanation / Answer

a) For the IP address Dotted Decimal format 127.0.255.1:

In 32 bits form, the equivalent binary number(8 bits) of decimal value present in each of the 4 dotted part is used to represent the IP address.

Thus binary equivalent of 127 -> 0111 1111 is used to represent the first dotted part in dotted decimal format

for 0 -> 0000 0000 is used to represent

for 255 -> 1111 1111 is used to represent

for 1 -> 0000 0001 is used to represent

Thus combining together all the four parts the below is the 32 - bit format :

0111 1111 0000 0000 1111 1111 0000 0001

i) Decimal format: The above binary number(32 bits) is converted to its equivalent decimal number below:

2130771713

ii) Binary format:Binary format is nothing but 32-bit form. Therefore it is

0111 1111 0000 0000 1111 1111 0000 0001

iii) Octal format: It is nothing but 32-bit binary number in octal:

17700177401

b) IP address: 0111 0111 0011 0000 1000 1000 1000 1001 in 32-bit binary number form.

i) Dotted Hexadecimal format: The 32-bit binary number is divided into 4 parts with each part having 8 bits. Each 8 bits(one part) is converted to its hexa decimal equivalent and combined together with dots separting each part to give its dotted hexadecimal format.

0111 0111 -> 77

0011 0000 -> 30

1000 1000 -> 88

1000 1001 -> 89

Therefore combining them together with dots separting them is given below as dotted decimal format:

77.30.88.89

ii) Octal format : It is nothing but 32-bit binary number in octal:

16714104211

iii) Dotted Decimal format: The 32-bit binary number is divided into 4 parts with each part having 8 bits. Each 8 bits(one part) is converted to its decimal equivalent and combined together with dots separting each part to give its dotted decimal format.

  0111 0111 -> 119

0011 0000 -> 48

1000 1000 -> 136

1000 1001 -> 137

Therefore combining them together with dots separting them is given below as dotted decimal format:

119.48.136.137

c) If 6 bytes (48 bits) are used to represent the addresses, then there are 281,474,976,710,656 (2^48) addresses that can be represented with 48 bits.

This is because each bit can be either '1' or '0'. Hence with 48 bits the total number of combinations with either '1' or '0' in each bit, there are 281,474,976,710,656 unique combinations. This is the relationship between the number of bits and the address representation with those many bits.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote