0% found this document useful (0 votes)
15 views4 pages

Cs601 Assignment No2 Solution 2024

Uploaded by

Afshan Parveen
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)
15 views4 pages

Cs601 Assignment No2 Solution 2024

Uploaded by

Afshan Parveen
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/ 4

Id: Bc220406306

Name: Afshan Parveen

Cs601 Assignment no 2

Solution:

The data packet contains the following 8-bit segments:

11011011 10101010 11110000 00001111


Tasks:

1. Calculate the 8-bit checksum for the given data packet at the sender side only

Solution:

We have to add 1st two segments

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

Segment 1 + Segment 2= 10000101

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

10000110 11110000 00001111

Now we again add 1st two segments

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

Segment 1+ Segment 2= 01110100

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

Now we put this answer in the original segment

01110101 00001111

Now we again add these two segments

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

Taking 1st complement of the answer= 01111011

So, 8-bit complement is = 01111011

Task 2:

Provide the complete message with the checksum for transmission by the
sender

Solution:

11011011 10101010 11110000 00001111 0111011

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)

(10110, 01011)

(11100, 11110)
(01101, 11101)

Minimum Hamming distance

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