CS601 Assignment No.2 Fall 2022

 CS601 Assignment No.2 Fall 2022


Please read the following instructions carefully before submitting assignment:

You need to use MS word document to prepare and submit the assignment on VU-LMS.

It should be clear that your assignment will not get any credit if:


§  The assignment is submitted after due date.

§  The assignment is not in the required format (doc or docx)

§  The submitted assignment does not open or file is corrupt.

§  Assignment is copied (partial or full) from any source (websites, forums, students, etc)






The objective of this assignment is to enhance the learning capabilities of the students about:

§  Redundancy

§  Block Coding

§  Hamming Distance

Question No. 1                                                                                                                                      (10 marks)


Suppose in a code-word, we add two redundant bits to each 8-bit data word. Find the number of


1.     Valid code-words

2.     Invalid code-words


To find the number of valid code words, we need to find the number of ways to arrange the 10 bits (8 data bits + 2 redundant bits) such that the code-word is valid. A code-word is   considered valid if it satisfies the constraint of having an even number of 1s.

We know that K called data-word r called redundant n called code-word. So, in the scenario   given that 8 data   word(k=8) and redundant bit 2 (r=2)


We find the number of code word by using this formula


Code Word formula


        N =k + r

        N = 8+2

        N =10 (code word)


For finding total number of code word, we applying formula


The number of possible codewords with n bits should be 2n






        1024 total number of code word.


For finding valid number of code word, we skip redundant bit (2)




       256 valid code words


Invalid code words=Total numbers of code words – valid code words

       Invalid code words = 1024-256

       Invalid code words = 768



Question No. 2                                                                                                                                    (5 marks)


Calculate the Hamming distance given in the below table for each of the following code words?


Code Words

Hamming Distance

d (10000, 00000)



d (10101, 10000)



d (00000, 11111)


d (00000, 00000)



d (000, 011)






Post a Comment

Previous Post Next Post