Computer networking Assignment – 4
1. What are services provided by the data link layer?
Ans:
1. Framing: Divides data into frames with headers and trailers to mark the beginnin
g and end of each frame, ensuring proper data alignment.
2. Error Detection and Correction: Identifies and corrects errors that may occur
during transmission using methods like checksums and CRC.
3. Flow Control: Manages the rate of data transmission to prevent overwhelming t
he receiver.
4. Access Control: Determines how devices share the communication medium, usi
ng protocols like CSMA/CD and token passing.
5. MAC Addressing: Provides hardware (MAC) addresses for devices to ensure pro
per data delivery within a local network.
6. Reliable Data Transfer: Ensures that frames are delivered without loss or duplic
ation.
7. Link Management: Establishes, maintains, and terminates the connection betwe
en two physically connected devices.
2. Explain Unicast, Multicast Broadcast address?
Ans:
3. What is error and what are the types of errors?
Ans:
4. Calculate the odd parity bit for the following group of data bits?
a. 10011001 c. 00001111
b. 01010010 d. 01101010
Ans:
• 10011001
Count number of 1s: 1 + 0 + 0 + 1 + 1 + 0 + 0 + 1 = 4 (even number 1’s)
Odd Parity Bit: To make the total number of 1s odd, add a parity bit of 1.
Data with Odd Parity Bit = 100110011
• 01010010
Count number of 1s: 0 + 1 + 0 + 1 + 0 + 0 + 1 + 0 = 3 (odd number of 1s)
Odd Parity Bit: The total number of 1s is already odd, so add a parity bit of
0.
Data with Odd Parity Bit = 010100100
• 00001111
Count number of 1s: 0 + 0 + 0 + 0 + 1 + 1 + 1 + 1 = 4 (even number of 1s)
Odd Parity Bit: To make the total number of 1s odd, add a parity bit of 1.
Data with Odd Parity Bit = 000011111
• 01101010
Count number of 1s: 0 + 1 + 1 + 0 + 1 + 0 + 1 + 0 = 4 (even number of 1s)
Odd Parity Bit: To make the total number of 1s odd, add a parity bit of 1.
Data with Odd Parity Bit = 011010101
5. Calculate the even parity bit for the following group of data bits?
a. 01011010 c. 00011101
b. 11011001 d. 10101010
01011010
1. Count the number of 1s.
2. Total number of 1s is even, so add a parity bit of 0.
3. Result = 010110100
b. 11011001
1. Count the number of 1s.
2. Total number of 1s is odd, so add a parity bit of 1.
3. Result = 110110011
c. 00011101
1. Count the number of 1s.
2. Total number of 1s is even, so add a parity bit of 0.
3. Result = 000111010
d. 10101010
1. Count the number of 1s.
2. Total number of 1s is even, so add a parity bit of 0.
3. Result = 101010100
6. Define the backward and forward error correction?
Ans:
Backward Error Correction (Automatic Repeat reQuest - ARQ):
• Definition: A method where the receiver detects an error in the data and requ
ests the sender to retransmit the incorrect data.
• Process:
1. Receiver detects error.
2. Sends a negative acknowledgment (NAK) to the sender.
3. Sender retransmits the erroneous data.
Forward Error Correction (FEC):
• Definition: A method where the sender adds redundant data (error-
correcting codes) to the original data, allowing the receiver to detect and corre
ct errors without needing retransmission.
• Process:
1. Sender adds redundant data.
2. Receiver uses this data to detect and correct errors independently.
7. What do you mean by block coding?
Ans:
8. Explain the various error detection technique?
Ans:
Description: CRC (Cyclic Redundancy Check) is an error-
detecting code used to check the integrity of data. It applies polynomial division t
o data and appends the remainder (CRC code) to the end of the data. The receive
r performs the same division to check for discrepancies.
Encoding:
1. Data to be sent: 1001
2. Divisor (Polynomial): 1011 (3 bits)
3. Steps:
• Append 3 zeros to the data: 1001000
• Perform binary division of the data by the divisor.
Division:
Decoding:
1. Received Data: 1001011
2. Divisor (Polynomial): 1011
3. Steps:
• Perform binary division of the received data by the divisor.
Division:
Checksum: A simple error-
detection technique where data units are summed, and the sum (checksum) is ap
pended to the data. The receiver recalculates the checksum and compares it to th
e sent checksum to detect errors.
Example:
• Data Units: 7, 11, 12, 0, 6, 0
1. Calculate the Sum:
• Sum = 7 + 11 + 12 + 0 + 6 + 0 = 36
2. Checksum:
• In this simple example, the checksum is the same as the sum (36).
Transmitted Data: 7, 11, 12, 0, 6, 0, 36 (Checksum)
Verification at the Receiver:
• Received Data: 7, 11, 12, 0, 6, 0, 36
• Recalculate the Sum:
o Sum = 7 + 11 + 12 + 0 + 6 + 0 + 36 = 72
Verify Checksum:
• If the calculated sum equals the expected sum (36 + 36 = 72), the data is co
nsidered error-free
9. Generate the CRC code for the data word 1001110 using the deviser 1011?
Ans:
1. Data to be sent: 1001110
2. Divisor (Polynomial): 1011 (3 bits)
3. Steps:
• Append 3 zeros to the data: 1001110000
• Perform binary division of the data by the divisor.
Division:
Encoding:
1011
---------
1011| 1001110000
1011
--------------------
001110000
000000000
---------
011100000
000000000
---------
111000000
101100000
---------
011000000
000000000
---------
110000000
101100000
---------
010000000
000000000
---------
100000000
101100000
---------
000000000
000000000
---------
111000000
101100000
---------
011000000
000000000
---------
110000000
101100000
---------
010000000
000000000
---------
100000000
101100000
---------
000000000
000000000
---------
1010 (Remainder)
Remainder: 1010
Encoded Data: 1001110 + 1010 = 10011101010
Decoding:
1. Received Data: 10011101010
2. Divisor (Polynomial): 1011 (3 bits)
3. Steps:
• Perform binary division of the received data by the divisor.
Division:
1011
---------
1011 | 10011101010
1011
---------
001111010
000000000
---------
011110010
000000000
---------
111100010
101100000
---------
011100010
000000000
---------
110000000
101100000
---------
010100010
000000000
---------
101100010
101100000
---------
000010 (Remainder)
Remainder: 000
Since the remainder is 000, it indicates that there are no errors in the transmissio
n, and the received data (10011101010) is valid.
10. What is parity Checking?
Ans:
Parity Checking: An error detection technique used to ensure data integrity duri
ng transmission. It adds an extra bit, called the parity bit, to a string of binary dat
a. This bit makes the total number of 1s either even (even parity) or odd (odd pari
ty), helping to detect single-bit errors.
Example:
• Data: 1010101 (7 bits)
• Even Parity:
1. Count the 1s: 4 (even).
2. Parity bit: 0 (to keep the total number of 1s even).
3. Transmitted Data: 10101010.
• Odd Parity:
1. Count the 1s: 4 (even).
2. Parity bit: 1 (to make the total number of 1s odd).
3. Transmitted Data: 10101011.
Detection:
If the received data does not match the expected parity, an error is detected. For
example, if the expected even parity data (10101010) is received as 10101011, an
error is detected because the number of 1s (5) is odd.
11. Calculate the check sum for the set of numbers 7,11,12,0,6?
Ans: