You are on page 1of 12

‫اسم الطالب ‪ -:‬سامح جالل فاروق‬

‫ر‬
‫كود الطالب ‪4200257 -:‬‬
‫‪ :- Computer Network‬اسم الماده‬
‫‪ :- CMPN324‬كود الماده‬
‫‪1‬‬
CMP424 CMPN324 Assignment#2_2023
ERROR DETECTION AND ETHERNET
1. What is the maximum round trip delay for an Ethernet frame operating at 10Mbit/s?

(
Max. Ethernet Packet Frame Length is 1518 bytes × 8
bits
byte
=12144 bits )
6
bit rate=line speed (10 ×10 bits / second ),

Max. Ethernet Packet Frame Length is 1500 bytes=1500 x 8=12000 bits

Min . Ethernet Packet Frame Length is 64 bytes=64 x 8=512 bits

For maximum delay we consider the 64 bytes frames


6
Delay=number of bits sent /bit rate=512/10 × 10 seconds=1.2 μs

My solve :-
12144
which gives us seconds,∨1.2144 milliseconds .
107
2. What is the maximum round trip delay for an Ethernet frame operating at 1000Mbit/s If the min.
packet length 64bytes and the maximum packet length 1500 bytes?
A:
 Minimum packet ¿ 64 bytes × 8=512 bits
 Maximum packet ¿ 1500bytes × 8=12000 bits
 bit rate=Line speed =1000 million bits per second =109 bits per second
512 bits
 minimum ¿ is 9 =512 nanoseconds .
10 bits /second
12000 bits
 maximum ¿ is 9 =12 microseconds
10 bits /second
your solve
Maximum round trip delay for an Ethernet frame operating at 10Mbit/s is at the minimum
packet length 64bytes=64x8=512 bits
Delay = number of bits sent / bit rate = 512 / 1000× 10 6 seconds = .012 μs
3. Compare between the maximum round trip delay for an Ethernet frame operating at 10Mbit/s and
100Mb/s?
A:

 bit rate=line speed (10 ×10 6 bits /second ),



Maximum round trip delay for an Ethernet frame operating at 10 Mbit / s=Delay=number of bits sent /bit rate=51

2

Maximum round trip delay for an Ethernet frame operating at 100 Mbit / s=Delay =number of bits sent /bit rate=5
4. An Ethernet LAN with 5 segments each with 180m, and 4 repeaters each repeater introduces a
delay of 3.5 μs and the propagation speed is 1.77×108m/s, calculate the maximum round trip delay.
A:

 There are 5 segments , each with alength of 180 m.


 There are 4 repeaters, each introducing a delay of 3.5 μs .
8
 The propagation speed is 1.77 ×10 m/s .
8
 Total distance=2× 5× 180 m+ 4 ×3.5 μs ×1.77 × 10 m/ s
8
 Round trip delay=total distance /1.77 × 10 m/ s
5. Given a propagation velocity of 1.77×108 m/s and a delay of 3.5 μs introduced by each repeater,
what is the round trip delay for two computers at either end of a 2500 m link that includes three
repeaters?
A:
We will do the calculation by finding the one-way time and then doubling it for the round trip.
 The signal travels 5x180=900 m. Using the formula t = d / v
 t = 900 / (1.77×108) s = 5.084μs
 The four repeaters add a further 4×3.5μs delay, which is 14μs.
 So the total one way time is 14+5.084= 19.084μs-
 The round-trip delay is twice this value: 38.146μs
6. Given a propagation velocity of 1.77×108 m/s and a delay of 3.5 μs introduced by each repeater,
what is the round trip delay for two computers at either end of a 2500 m link that includes three
repeaters?
A:
 We will do the calculation by finding the one-way time and then doubling it for the round trip. The
signal travels 2500 m.
 Using the formula t = d / v
 t = 2500 / (1.77×108) s = 0.0000141 s = 14.1μs
 The three repeaters add a further 3 × 3.5μs delay, which is 10.5μs.
 So the total one way time is 14.1 + 10.5μs = 24.6μs
 The round-trip delay is twice this value: 49.2μs, or just under 50μs 
7. Given a propagation velocity of 1.77×108 m/s and a delay of 3.5 µs introduced by each repeater,
what is the round trip delay for two computers (A-D) at either end of a 2000 m link that includes
three repeaters?
A:

3
 Using the formula t = d / v
 t = 2000 / (1.77×108 ) s = 0.0000112 s = 11.2 µs
 The three repeaters add a further 3 × 3.5 µs delay, which is 10.5 µs.
 So the total one-way time is 11.2 + 10.5 µs = 21.7 µs
 The round-trip delay is twice this value: 43.4 µs
8. Draw a diagram showing the main error detection and correction techniques used in today's
networking and storage protection against errors.
A:

Error Detection And Correction Techniques

Detection Techniques and correction


Detection And Correction
By RETRANSMISSION

CHECKS Cyclic Redundancy Check CRC HAMMING CODE


UM
Vertical Redundancy Check VRC (PARITY BIT)

Longitudinal Redundancy Check LRC

Receive
Data CRC Data
r|

Error
Detection Receive
Data ECC Data
r|
4
Error
Correctio
n
9. Draw a diagram showing how parity checking is used between the transmitter and the receiver.

A:

10. Draw a diagram showing how Cyclic Redundancy Check CRC is used between the transmitter and
the receiver.
A:

11. If data is sent at 1GMbps then calculate the bit duration, if the noise duration is 5μs, how many
bits are lost? If the data rate reduced to 100Mbps, how many bits are lost.
A:

 Number of corrupted bits = (1x10 6) x (5 x 106 )= 5 bits

5
 Increased Number of corrupted bits = (100 x 10 6) x(5 x 106 )= 500 bits
another solution
bit duration = 1 / data rate
Substituting the value of 1Gbps, we get:
bit duration = 1 / 1Gbps = 1 nanosecond
we can calculate the number of bits that would be lost during that time using the formula:
bits lost = (noise duration / bit duration)
If the data rate is reduced to 100Mbps, the bit duration would become:
bit duration = 1 / 100Mbps = 10 nanoseconds
Using the same formula, we can calculate the number of bits lost during a noise duration of 5μs at this
data rate:
bits lost = (5μs / 10ns) = 500 bits
12. Suppose the sender wants to send the word “world’, in ASCII code the 5 characters are coded as”
1110111 1101111 1110010 1101100 1100100
a.What are the actual bits sent if the transmitter and receiver use odd parity
b. What are the actual bits sent if the transmitter and receiver use even parity

A: To include parity bits, we'll add an extra bit to each character so that the total
number of 1's in the character (including the parity bit) is odd for odd parity, and even
for even parity.
The word "world" in ASCII code is given as:
w: 1110111
o: 1101111
r: 1110010
l: 1101100
d: 1100100
a. For odd parity, the transmitted bits will be:
w: 11101111
o: 11011110
r: 11100101
l: 11011001
d: 11001001
b. For even parity, the transmitted bits will be:
w: 11101110
o: 11011111
r: 11100100
l: 11011000
d: 11001000

6
13. If a receiver receives the following bits of 5 words which are corrupted during transmission:
11111110 11011110 11101100 11011000 11001001, which of the words are corrupted if
odd parity is used and if even parity is used
A:
For odd parity:
 11111110 This word is not corrupted.
 11011110 This word is corrupted.
 11101100 This word is not corrupted.
 11011000 This word is corrupted.
 11001001 This word is corrupted.
Therefore, the corrupted words using odd parity are the second, fourth, and fifth words.
For even parity:
 11111110 This word is corrupted.
 11011110 . This word is corrupted.
 11101100 This word is corrupted.
 11011000 This word is not corrupted.
 11001001 This word is corrupted.
Therefore, the corrupted words using even parity are the first, second, third, and fifth
words.
14. Calculate the single even parity check for the word 10011?
A:
Therefore, the single even parity check for the word 10011 is 100111.
15. Calculate the two dimensional (rows and columns) odd parity for the block
10011001 11100010 00100100 10000100?
A:
The two-dimensional odd parity check involves adding a parity bit to each row and
each column of a matrix such that the total number of 1's in each row and each column
(including the parity bit) is odd.
We can represent the given block as a matrix:
1 0 0 1 1 0 0 1
1 1 1 0 0 0 1 0
0 0 1 0 0 1 0 0
1 0 0 0 0 1 0 0
To calculate the two-dimensional odd parity, we need to perform the following steps:
1. Add a parity bit to each row of the matrix such that the total number of 1's in
each row (including the parity bit) is odd.
 For the first row, we need to add a 0 as the parity bit since there are
already an odd number of 1's in the row.
 1 0 0 1 1 0 0 1 0

7
 For the second row, we need to add a 1 as the parity bit since there are
currently an even number of 1's in the row.
 1 1 1 0 0 0 1 0 1
 For the third row, we need to add a 1 as the parity bit since there are
currently an even number of 1's in the row.
 0 0 1 0 0 1 0 0 1
 For the fourth row, we need to add a 0 as the parity bit since there are
already an odd number of 1's in the row.
 1 0 0 0 0 1 0 0 0
2. Add a parity bit to each column of the matrix such that the total number of 1's in
each column (including the parity bit) is odd.
 For the first column, we need to add a 1 as the parity bit since there are
currently an even number of 1's in the column.
 1 0 0 1 1 0 0 1 0
 1 1 1 0 0 0 1 0 1
 0 0 1 0 0 1 0 0 1
 1 0 0 0 0 1 0 0 0
 1
 For the second column, we need to add a 0 as the parity bit since there are
already an odd number of 1's in the column.
 1 0 0 1 1 0 0 1 0
 1 1 1 0 0 0 1 0 1
 0 0 1 0 0 1 0 0 1
 1 0 0 0 0 1 0 0 0
 1 0
 Continuing in the same manner, we can add parity bits to the remaining
columns:
 1 0 0 1 1 0 0 1 0
 1 1 1 0 0 0 1 0 1
 0 0 1 0 0 1 0 0 1
 1 0 0 0 0 1 0 0 0
 1 0 1 1
The final matrix with parity bits is:
1 0 0 1 1 0 0 1 0
1 1 1 0 0 0 1 0 1
0 0 1 0 0 1 0 0 1
1 0 0 0 0 1 0 0 0
1 0 1 1
Therefore, the two-dimensional odd parity for the block 10011001 11100010 00100100
10000100 is 10011001 11100010 00100100 10000100 1011 .
16. Calculate the checksum for the block 10011001 11100010 00100100 10000100?
A:

8
To calculate the checksum for the block `10011001 11100010 00100100 10000100`, we can use the
Internet Checksum algorithm. This algorithm involves dividing the block into 16-bit words and adding
them together with carrying. The result is then complemented to get the checksum.

We can represent the given block as four 16-bit words:

```
1001100111100010
0010010010000100
```

To calculate the checksum, we can add these words together with carrying:

```
1001100111100010
0010010010000100
-----------------
1011111001100110
```

The sum is `1011111001100110`. To get the checksum, we need to complement this sum.

```
1011111001100110 -> 0100000110011001
```

Therefore, the checksum for the block `10011001 11100010 00100100 10000100` is
`0100000110011001`.

17. Explain the roles of CRC in the detection of errors at the packet frame level.
Suppose P(x) = 100100 and Q(x) = 1101, calculate the CRC and what is the data transmitted.
A:
CRC (Cyclic Redundancy Check) is a method used to detect errors in digital
communication networks. It is commonly used at the packet frame level to ensure the
integrity of data transmitted over the network. The CRC algorithm involves appending a
fixed number of bits to the original data, which can be used to detect errors introduced
during transmission.
The roles of CRC in the detection of errors at the packet frame level are as follows:
1. Calculation of CRC: Before transmitting the data, the sender calculates the CRC by
dividing the message by a fixed polynomial (known as the generator polynomial)
using the binary division method. The remainder of this division is the CRC, which
is appended to the message before transmission.

9
2. Transmission of data: The sender transmits the data along with the CRC to the
receiver.
3. Verification of CRC: The receiver calculates the CRC of the received data using the
same generator polynomial. If the calculated CRC matches the CRC received with
the data, then the data is assumed to be error-free. Otherwise, the data is
assumed to be corrupted during transmission, and the receiver can request the
sender to retransmit the data.
Now, let's calculate the CRC for the given data.
We are given:
P(x) = 100100 (the message)
Q(x) = 1101 (the generator polynomial)
To calculate the CRC, we need to perform the following steps:
1. Append the appropriate number of zeros to the message to match the degree of
the generator polynomial.
2. 10010000
3. Perform binary division of the resulting polynomial by the generator polynomial.
4. 1 0 0 1 0 0 0 0
5. _________
6. 1 1 0 1 | 1 0 0 1 0 0 0 0 0
7. 1 1 0 1
8. -------
9. 1 1 1 1
10. 1 1 0 1
11. -------
12. 1 0 1 0
13. 1 1 0 1
14. -------
15. 1 1 1
16.The remainder of the division is the CRC.
17. CRC = 111
18.Append the CRC to the message to get the data transmitted.
19. Data transmitted = 10010000111
Therefore, the CRC for the message 100100 using the generator polynomial 1101 is 111,
and the data transmitted is 10010000111.
18. Consider a message in form of ( X 7 + X 4 + X 3+ X ) want to be transmitted to a station With a
Generator polynomial ( X 4 + X 3 + X ). Find the CRC bits should inbound into the message.
A:

19. Consider a message in form of ( X 9+ X 5 + X 4 + X 3 + X ) want to be transmitted to a station With a


Generator polynomial ( X 5 + X 3+ X +1). Find the CRC bits should inbound into the message.
A:

10
20. A communication system is using an even parity between the transmitter and receiver. If the code
received at the receiver is 0110100. What is the actual message being transmitted using Hamming
Code? (Explain).
A:
The given code word is 0110100, and the communication system is using even parity to detect
errors. Even parity means that the number of 1s in the message, including the parity bit, should
always be even. If there is an error in transmission, the number of 1s in the received message will be
odd, and the receiver can detect this error.

To find the actual message being transmitted using Hamming Code, we need to first identify the
position of the parity bit in the code word. In Hamming Code, the position of the parity bit is given
by the power of 2. That is, the first, second, fourth, eighth, etc., bits are parity bits, and the remaining
bits are message bits.

In the given code word, the parity bits are at positions 1, 2, and 4. We can ignore these bits for now
and focus on the remaining bits, which are the message bits. The message bits are at positions 3, 5, 6,
and 7.

We can now count the number of 1s in the message bits: 1+1+0+1 = 3. To make the total number of
1s even, we need to add a parity bit at position 1. The value of this parity bit will be the XOR of the
message bits that have a 1 in the 1's bit of their position: 1 XOR 1 XOR 0 XOR 1 = 1.

Therefore, the actual message being transmitted using Hamming Code is 10110100, where the first,
second, and fourth bits are parity bits, and the remaining bits are message bits. We can verify that the
number of 1s in the message, including the parity bit, is even, which satisfies the even parity
requirement of the communication system.

21. The receiver receives 1001111 binary numbers then by using hamming code (odd –parity): Show the
correct binary number that transmitted by the sender.
A:
To show the correct binary number that was transmitted by the sender using Hamming
Code with odd parity, we need to perform the following steps:
1. Write the received binary number and identify the position of the parity bits:
Received binary number: 1001111
Position of parity bits: 1, 2, 4, 8, 16, etc.
2. Write the received binary number with spaces between the bits to make it easier
to group them:
1001111
3. Calculate the value of each parity bit based on the message bits it is supposed to
check:
Parity bit 1: checks bits 1, 3, 5, 7 (odd parity)
Parity bit 2: checks bits 2, 3, 6, 7 (odd parity)
Parity bit 4: checks bits 4, 5, 6, 7 (odd parity)

11
4. Calculate the value of each parity bit and compare it with the received value. If
they are different, there is an error in the received message:
Parity bit 1: 1 XOR 0 XOR 1 XOR 1 = 1 (odd) - Received value: 1 (correct)
Parity bit 2: 0 XOR 0 XOR 1 XOR 1 = 0 (even) - Received value: 0 (correct)
Parity bit 4: 1 XOR 1 XOR 1 XOR 1 = 0 (even) - Received value: 1 (error)
5. Since parity bit 4 is incorrect, we need to flip the bit at position 4 to correct the
error:
1000111
Therefore, the correct binary number that was transmitted by the sender using
Hamming Code with odd parity is 1000111.

GOOD LUCK

12

You might also like