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

Assignment No 2 CS601

assignment 2

Uploaded by

alibaseer2022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Assignment No 2 CS601

assignment 2

Uploaded by

alibaseer2022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Assignment no 2

CS 601

Question No. 1

Find Hamming Distance among each pair of words as given in the following table and fill the
“Hamming Distance” column:

Serial No. Pair of Words Hamming Distance (d)


A (10001, 11110)
B (11100, 11011)
C (10101, 11010)
D (01101, 10111)

Solution:

Serial No. Pair of Words Hamming Distance (d)


A (10001, 11110) 4
B (11100, 11011) 3
C (10101, 11010) 4
D (01101, 10111) 3

Question No. 2

To ensure reliable exchange of messages, a sender and receiver have agreed to use the “Even
Parity Check.” The sender will append a parity bit to each message, which can then be verified
by the receiver. Considering the data bits of each message given in the following table, calculate
the parity bit for each message and write it in the Parity Bit column:

Message Data Bits in Message Parity Bit


1 1 0 1 1 1 1 1 1
2 1 1 1 0 1 0 0 1
3 1 1 1 1 0 0 0 0
4 1 0 0 1 0 0 1 0
5 1 1 0 0 0 0 1 1
Solution:
an even parity system, the number of 1's in the data bits, including the parity bit, should be even.
If the number of 1's in the message is odd, the parity bit is set to 1. If the number of 1's is even,
the parity bit is set to 0.
Number of 1’s Even =0
Number of 1’s Odd = 1

Message Data Bits in Message Parity Bit


1 1 0 1 1 1 1 1 1 1
2 1 1 1 0 1 0 0 1 1
3 1 1 1 1 0 0 0 0 0
4 1 0 0 1 0 0 1 0 1
5 1 1 0 0 0 0 1 1 0

You might also like