Lecture 11 Error Control Codes
Lecture 11 Error Control Codes
Lecture 11 Error Control Codes
CRC
In CRC, some redundant bits are sent in addition to the
message bits.
The purpose of the redundant bits is to facilitate detecting
error.
How bits
The redundant is FCS generated?
are called frame check sequence (FCS)
Cyclic Redundancy Check….
Introduction….
• Strength of the CRC depends on the number of redundant bits (that is,
FCS length)
• Longer FCS length results in better accuracy in detecting error
At sender
P S
R
Cyclic Redundancy Check….
Example 1
At Receiver
1011 1 1 0 1 0 0 1
1011
1100
1011
1110
1011
1011
1011
0000
• Message M = 1010001101
• Pattern P = 110101
• Length of P=6
• Append K=6-1=5 zeros at the end of M
• S=101000110100000
• Now divide S by P to find 5 bits remainder
[1].
Cyclic Redundancy Check….
Example 2
Linear Block Code: A code in which addition of any two codewords gives another
codeword [2].
Message, M: k bits long
Redundant bits, Q: q bits long
Codeword length, N: k+q bits long
[ ]
Generator matrix, 𝐺=[ 𝑃 𝑘 ×𝑞 𝐼 𝑘 ] 1 1 0
𝑃 3 ×3 = 0 1 1
For 𝑘=3 and q , 1 0 1
[ ]
1 1 0 1 0 0
[ ]
𝐺= 0 1 1 0 1 0 1 0 0
1 0 1 0 0 1 𝐼 3= 0 1 0
0 0 1
Then, it is a (n, k) =(6, 3) block code
Linear Block Code….
Codeword calculation
Modulo-2 summation
The codeword for the message [ 0 1 1] is 0 ×1 1× 0 1× 1=1
𝐶= 𝑀 × 𝐺 0 ×1 1× 1 1 ×0=1
[ ] 0 × 0 1 ×1 1× 1=0
1 1 0 1 0 0
𝐶= [ 0 1 1] × 0
1
1
0
1
1
0
0
1
0
0
1
0 ×1 1× 0 1× 0=0
0 × 0 1 ×1 1× 0=1
𝐶= [ 1 1 0 0 1 1 ] 0 × 0 1 × 0 1 ×1=1
𝑄 𝑀
Linear Block Code….
Error-detection
[ ]
Receiving end 1 1 0
𝑃 3 ×3 = 0 1 1
1 0 1
Parity check matrix, H = [ 𝐼𝑞 𝑃 𝑇
𝑘 ×𝑞 ]
[ ]
1 0 1
H = [ 𝐼3 𝑃 3 × 3 ]
𝑇 𝑇
𝑃 3 ×3 = 1 1 0
0 1 1
[ ]
1 0 0 1 0 1
H= 0 1 0 1 1 0
0 0 1 0 1 1 is the transpose of
Linear Block Code….
Error-detection….
[ ]
1 0 0 1 0 1
𝑟 =[ 1¿1¿0¿ 0¿1¿1] H= 0 1 0 1 1 0
Syndrome, 𝑠=𝑟 𝐻 𝑇 0 0 1 0 1 1
[ ]
1 0 0
0 1 0
𝑇 0 0 1
𝐻 =
1 1 0
𝑠= [ 0 0 0 ] 0 1 1
1 0 1
The all-zero syndrome indicates a correct reception !
Linear Block Code….
Error-detection….
Syndrome, 𝑠=𝑟 𝐻 𝑇
𝑠= [ 0 1 0 ]
[ ]
1 0 0
How to correct the error? 0 1 0
𝐻𝑇 = 0 0 1
1 1 0
1. Syndrome ,𝑠= [ 0 1 0 ] 0 1 1
1 0 1
2. Locate the syndrome in
3. It is in second row
4. So, the second element in the received sequence,
is erroneous.
4. Alter the second bit from 0 to 1.
5. So the correct received sequence is [ 1 1 0 0 1 1].
Note: The given generator matrix enables correction of at most 1 bits.
It is possible to correct more bits , but it requires quite a lot work! No Free Lunch!
Homework
[ ]
1 1 1 1 0 0 0
0 1 1 0 1 0 0
𝐺=
1 1 0 0 0 1 0
1 0 1 0 0 0 1