TE [E&TC] Sinhgad Institute of Technology, Lonavala DC
Name of the Student : ____________________________________ Roll No : _____
Class : T.E. [E&TC] Division : _______ Course : DC
Experiment No. 4
** ERROR CONTROL CODING USING SUITABLE HARDWARE. **
Marks: /10
Date of Performance: / /20 Sign with Date
AIM : Study of Linear Block Code using suitable hardware setup/kit.
Objectives:
1. To study 1 bit error correction using hamming code
2. To implement error detection and correction techniques
Outcomes::
1. Demonstrate Hamming Codes or CRC with example.
PEOs ,POs, PSOs and COs satisfied
PEOs : 1,2,4 POs :1,2,3,4,5,6,10,12 PSOs : 1,2 COs :5
Apparatus : : INSTRUMENT WITH SPECIFICATION & RANGE
Experimental kit : Error Control Coding kit
Patch Cards
Theory : Properties of Linear Block Code:
1. The sum of two code words belonging to the code is also a codeword
belonging to the code.
2. The all zero word is always a code word.
3. The minimum Hamming distance between two code words of a linear code is equal to the minimum
weight of any nonzero codeword.
Matrix Description of Linear Block Codes
The generator matrix will be a kxn matrix with rank K. k is message length and n is Codeword
length so given block code is (n,k). Let the message vector is represented by M then codeword
is calculated by:
C=M*G
Hence there will be 2k message vector so codeword will be 2k. After finding all possible
codeword calculate minimum Hamming Distance which is minimum Hamming weight of
1 DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGG
TE [E&TC] Sinhgad Institute of Technology, Lonavala DC
codewords. dmin is minimum Hamming distance then error detecting and correcting capability
is given by
td= dmin-1, tc= (dmin-1)/2
Problem Statement
1. For a systematic (6, 3) linear block code, the generator matrix G is given by,
Design encoder using 7486 Logic Exor gate IC.
Solution:
For a given generator matrix Input are D0 D1 D2 and consider parity bitsare P0 P1 P2 .
Equations for parity bits are given as below
Hamming code is a set of error-correction code s that can be used to detect and correct bit
errors that can occur when computer data is moved or stored Due to the limited redundancy
that Hamming codes add to the data, they can only detect and correct errors when the error rate
is low. This is the case in computer memory (ECC memory), where bit errors are extremely
2 DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGG
TE [E&TC] Sinhgad Institute of Technology, Lonavala DC
rare and Hamming codes are widely used. This practical is designed to explain how to correct
one bit error using hamming code.
Hamming code is basically a linear block code it is error correcting code. Error detection by
using Hamming code is as follows. To each group of m information bits k parity bits are added
to form (m+k) bit code
d7 d6 d5 C3 d3 C2 C1
Location of each of the (m+k) digits is assigned a decimal value. The k parity bits are placed in
positions 1,2, …. 2k-1 positions-K parity checks are performed on selected digits of each code
word. At the receiving end the parity bits are recalculated. The decimal value of the k parity
bits provides the bit-position in error,
Hamming code is used for correction for 4-bit numbers (d4 d3 d2 d1) with the help of three
redundant bits (C3 C2 C1). For the example data 1010, first Ci (0) is calculated considering the
parity of the bit positions, 1, 3, 5 and 7. Then the parity bits C2 is calculated considering bit
3 DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGG
TE [E&TC] Sinhgad Institute of Technology, Lonavala DC
positions 2, 3, 6 and 7. Finally, the parity bits C3 is calculated considering bit positions 4, 5, 6
and 7 as shown. If any corruption occurs in any of the transmitted code 1010010, the bit
position in error can be found out by calculating C3 C2 C1 at the receiving end. For example, if
the received code word is 1110010, the recalculated value of C3 C2 C1 is 110, which indicates
that bit position in error is 6, the decimal value of 110.
ERROR CONTROL COADING TRAINER
Procedure:
Put four data bits 1011[d3=1, d5=1, d6= 0, d7=1] for generation of parity bits (P1, P2,P4)
For generation of P1: check output of fig I note the value of P1
For generation of P2: check output of fig II note the value of P2
For generation of P4: check output of fig III note the value of P4
Put all values of data bits (d3, d5, d6 and d7) and parity bits (P1, P2 and P4) in the Trainer kit
to get hamming code.
Procedure:
1. Put hamming codeword is 1110101 [d1=1, d2=0, d3=1, d4=0, d5=1, d6=1, d7=1] to find
C1, C2 and C3
2. Indicate position of incorrect bit 9(C3C2C1)where error is present on display
3. Invert (0 to1 or 1 to 0) the value of incorrect bit to obtain correct code word
4 DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGG
TE [E&TC] Sinhgad Institute of Technology, Lonavala DC
Conclusion/s :
B. Write short answer of following questions : (4-5 Max)
1. Write an algorithm for LBC coding and decoding
2. Explain following terms with respect to linear block code
a. Hamming weight
b. Hamming distance
c. Hamming code
3. Explain following terms with respect to linear block code
i. Code rate
ii. Constraint length
iii. Word length
iv. Block length
v. Minimum hamming distance
4. What is syndrome decoding operation for (n,k) block code with the help of diagram
5. What are the properties of syndrome
6. Explain linearity property of linear block code with example
7. What is standard array decoding? Explain with suitable example.
C. Viva Questions: (8-10)
1. What is parity check matrix
2. What are the cyclic codes
3. What is parity check polynomial
4. What is significance of syndrome
5 DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGG
TE [E&TC] Sinhgad Institute of Technology, Lonavala DC
5. What are the advantages and applications of BCH
6. Explain applications of CRC
7. What is error? State the types of error in the digital communication
8. Enlist causes of error
A. Design Experiments/ Lab innovations ( over and above )
1. For a systematic LBC, the parity check bits are:
C_{1} =M 1 M 2 M 3
C_{2} =M 2 M 3 M 4
C_{3} =M 1 M 2 M 4
Find: Generator matrix
Error detecting and correcting capabilities
Parity check matrix
Corrected codeword for received codeword [1101001]
2. Obtain code words for (6, 3) LBC which has generator matrix of G = [100101; 010011;
001110]. Find all possible code words. Obtain corrected codeword, if received codeword is r
= [1110]
3. For a systematic LBC, the three parity check digits C4, C5 and C6 are given by
C4=d 1 d 2 d 3
C5 =d 1 d 2
C6 =d 1 d 3
(i) Construct generator matrix.
(ii) Construct code generated by this matrix.
(iii) Determine error correcting capability.
6 DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGG