FT Lecture 11 Error Control Codes Fall22
FT Lecture 11 Error Control Codes Fall22
FT Lecture 11 Error Control Codes Fall22
❑ 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.
➢ The redundant bits are called frame check sequence (FCS)
How is FCS generated?
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
Modulo-2 summation
The codeword for the message [ 0 1 1] is 0 × 10 × 11 × 1 = 1
𝐶 =𝑀×𝐺 0 × 11 × 11 × 0 = 1
1 1 0 1 0 0 0 × 01 × 11 × 1 = 0
𝐶= 0 1 1 × 0 1 1 0 1 0 0 × 11 × 01 × 0 = 0
1 0 1 0 0 1 0 × 01 × 11 × 0 = 1
𝐶= 1 1 0 0 1 1 0 × 01 × 01 × 1 = 1
𝑄 𝑀
Linear Block Code….
Error-detection
Receiving end 1 1 0
𝑃3×3 = 0 1 1
Parity check matrix, 𝑇 1 0 1
H = 𝐼𝑞 𝑃𝑘×𝑞
1 0 1
𝑇
H= 𝐼3 𝑃3×3 𝑇
𝑃3×3 = 1 1 0
1 0 0 1 0 1 0 1 1
H= 0 1 0 1 1 0 𝑇
𝑃3×3 is the transpose of 𝑃3×3
0 0 1 0 1 1
Linear Block Code….
Error-detection….
Syndrome, 𝑠 = 𝑟𝐻𝑇
1 0 0
0 1 0
0 0 1
𝑠 = [1 0 0 0 1 1]
1 1 0
0 1 1
𝑠= 0 1 0 1 0 1
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
2. Locate the syndrome in 𝐻𝑇 1 0 1
3. It is in second row
4. So, the second element in the received sequence, 𝑟 = [1 0 0 0 1 1]
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