Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

BC230409102

Question No.1

Suppose two devices need to communicate with each other in such a way that the data sent by
the sender could be verified at the receiver side for accuracy. For this purpose, both the sender
and the receiver agreed upon the use of Checksum algorithm at both sides.

The data packet contains the following 8-bit segments:

Tasks:

1. Calculate the 8-bit checksum for the given data packet at the sender side only.
2. Provide the complete message with the checksum for transmission by the sender.

Task 1. Sum all the 8-bit segments:

11011011 + 10101010 = 110000101 (Overflow occurred)


10000101 + 1 (Overflow bit) = 10000110
10000110 + 11110000 = 101110110 (Overflow occurred)
01110110 + 1 (Overflow bit) = 01110111
01110111 + 00001111 = 10000110 (No overflow)
Task 2. One's complement of the final sum:
10000110 -> 01111001

Checksum:
01111001

Complete Message with Checksum for Transmission:


11011011 10101010 11110000 00001111 01111001

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.

Pair of Words Hamming Distance(d)


(11001, 01100) 3
(10110, 01011) 4
(11100, 11110) 1
(01101, 11101) 1
Minimum Hamming distance 1

You might also like