0% found this document useful (0 votes)
13 views

Assignment No 4

This document discusses a computer networks assignment submitted by a student. It contains the student's answers to 7 questions related to error detection codes, data transmission, and parity bits. The questions cover topics like Hamming codes, CRC codes, burst errors, and binary division for generating codewords.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Assignment No 4

This document discusses a computer networks assignment submitted by a student. It contains the student's answers to 7 questions related to error detection codes, data transmission, and parity bits. The questions cover topics like Hamming codes, CRC codes, burst errors, and binary division for generating codewords.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

National University of Technology

Computer Science Department


Semester Fall – 2023
Assignment no - 04
Course: Computer Networks
Course Code:CS4015

Name: Muhammad Shahzaib


Reg No: F20605016
Submitted to: Dr. Iqbal
Submission Date: 24-Jan-2024
Question: 01
1). In Table 10.1, the sender sends dataword 10. A 3-bit burst error corrupts the
code-word. Can the receiver detect the error? Defend your answer.
Datawords Codewords
00 000
01 011
10 101
11 110

Answer:
The codeword corresponding to the dataword 10 is 101. However, due to the occurrence of
a 3-bit burst error, the codeword is altered to 010. As this modified pattern is not a valid
codeword, the receiver promptly identifies the error and rejects the received data, ensuring the
integrity of the transmission.
2). In Table 10.2, the sender sends dataword 10. If a 3-bit burst error corrupts
the first three bits of the codeword, can the receiver detect the error? Defend your
answer.
Datawords Codewords
00 00000
01 01011
10 10101
11 11110

Answer:
The codeword corresponding to the dataword 10 is 10101. However, in the event of a 3-bit
burst error, the codeword is transformed to 01001. Since this altered pattern does not align
with any valid codewords, the receiver identifies the error and rejects the received data,
ensuring the integrity of the transmission.
3). Using the code in Table 10.2, what is the dataword if one of the following
code-words is received?
Datawords Codewords
00 00000
01 01011
10 10101
11 11110

a). 01011
Answer:
The codeword 01011 is legitimate, resulting in the decoded dataword being 01.
4). We need a data word of at least 11 bits. Find the values of k and n in the
Hamming code C (n, k) with 𝒅𝒎𝒊𝒏 = 𝟑.
Answer:

To find a suitable value k in the Hamming code


for with the constraint
𝑚
k = 2 −1 − m ≥ 11. We use trial and error to find the right answer:
a. Let m = 1 k = 2𝑚 −1 − m = 21 −1 − 1 = 0 (not acceptable)
b. Let m = 2 k = 2𝑚 −1 − m = 22 −1 − 2 = 1 (not acceptable)
c. Let m = 3 k = 2𝑚 −1 − m = 23 −1 − 3 = 4 (not acceptable)
d. Let m = 4 k = 2𝑚 −1 − m = 24 −1 − 4 = 11 (acceptable)
The code is C (15, 11) with dmin = 3.
n = k + m = 11+4 =15. Where n is the length of the codeword. k is the length of the message
and m is the length of the parity bits. For hamming code, 2𝑚 = 𝑘 + 𝑚 + 1, ℎ𝑒𝑟𝑒 𝑘≥ 11, so, 2𝑚
−1 − m≥ 11, so, m=4. Since, n is defined as k + m. So, it will be 11+4 =15.
5). Referring to the CRC-8 polynomial in Table 10.7, answer the following
questions:
CRC-8 generator is 𝒙𝟖 + 𝒙𝟐 + x + 1.

b). Does it detect a burst error of size 6? Defend your answer.


Answer:
The polynomial being of degree 8 indicates that the number of check bits, or the remainder
in error detection, is 8. In this context, the code can effectively detect all burst errors of size 8
or less. The degree of the polynomial corresponds to the number of check bits, providing the
capability to identify errors in the received data caused by bursts of up to 8 bits. This level of
error detection ensures the reliability of the code in identifying and correcting a specific range
of errors, particularly those associated with consecutive bits in the transmission.
d). What is the probability of detecting a burst error of size 15?
Answer:

The detection of burst errors of size 15 is generally reliable, with a probability of slipping by
𝟏 𝟏
of approximately ( )r or ( ))8 = 0.004 .This translates to a small likelihood of 4 out of 1000
𝟐 𝟐
burst errors of size 15 remaining undetected. While the error detection mechanism is effective,
there exists a minimal probability that some specific burst patterns may go unnoticed,
emphasizing the importance of considering error probabilities in the reliability assessment of
the system.
6). Assuming even parity, find the parity bit for each of the following data units.
In even parity, the parity bit is chosen so that the total number of 1s in the data unit (including the
parity bit) is even.
a). 1001011
Answer:
❖ To find the parity bit for the given data sequence "1001011", we need to determine the
value of the parity bit so that the total number of '1's in the data sequence, including the
parity bit, is even.
❖ Counting the number of '1's in the given data sequence: 1 (first position), 0, 0, 1, 0, 1,
1.
❖ There are a total of 4 '1's in the data sequence. Since we want an even parity, the parity
bit should be 0 to ensure that the total count becomes even.
❖ Therefore, the parity bit for the given data sequence "1001011" is 0.
b). 0001100
Answer:
❖ To determine the parity bit for the given data sequence "0001100" with even parity,
we need to calculate the value of the parity bit so that the total number of '1's in the
data sequence, including the parity bit, is even.
❖ Counting the number of '1's in the given data sequence: 0, 0, 0, 1, 1, 0, 0.
❖ There are a total of 2 '1's in the data sequence. Since we want an even parity, the parity
bit should be set to 0 to ensure that the total count becomes an even number.
❖ Therefore, the parity bit for the given data sequence "0001100" with even parity is 0.

7). Given the data word 1010011110 and the divisor 10111:
a). Show the generation of the codeword at the sender site (using binary
division).
(b) Show the checking of the codeword at the receiver site (assume no error).

You might also like