Cs601 Assignment No2 Solution 2024
Cs601 Assignment No2 Solution 2024
Cs601 Assignment no 2
Solution:
1. Calculate the 8-bit checksum for the given data packet at the sender side only
Solution:
Carry bit 1 1 1 1 1
Segment 1 1 1 0 1 1 0 1 1
Segment 2 1 0 1 0 1 0 1 0
1 1 0 0 0 0 1 0 1
Carry bit= 1
So, if the carry bit is generated then adding carry bit into the answer
Carry bit 1
Answer segment 1 0 0 0 0 1 0 1
Carry bit 0 0 0 0 0 0 0 1
Answer 1 0 0 0 0 1 1 0
Now we put this answer in the original segment
Carry bit
Segment 1 1 0 0 0 0 1 1 0
Segment 2 1 1 1 1 0 0 0 0
1 0 1 1 1 0 1 0 0
Carry bit= 1
So if the carry bit is generated then adding carry bit into the answer
Carry bit
Answer 0 1 1 1 0 1 0 0
segment
Carry bit 0 0 0 0 0 0 0 1
Answer 0 1 1 1 0 1 0 1
01110101 00001111
Carry bit 1 1 1 1 1 1 1
Segment 1 0 1 1 1 0 1 0 1
Segment 2 0 0 0 0 1 1 1 1
Answer 1 0 0 0 0 1 0 0
Segment answer=010000100
Task 2:
Provide the complete message with the checksum for transmission by the
sender
Solution:
Question No. 2
Find the hamming distance for the given pair of words. Also find out the
minimum Hamming distance from the given set of words.
(11001, 01100)
(10110, 01011)
(11100, 11110)
(01101, 11101)