Lecture 13 Error Control Codes
Lecture 13 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 is FCS
The redundant generated?
bits are called frame check
sequence (FCS)
Cyclic Redundancy Check….
Introduction….
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
Block Code: A code in which addition of any two codewords gives ano
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
he codeword for the message [ 0 1 1] is 0 × 1 0 × 1 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]× 0
1
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
Parity check matrix, 1 0 1
H =[ 𝐼 𝑞 𝑃 𝑇
𝑘× 𝑞 ]
[ ]
1 0 1
H =[ 𝐼 3 𝑃 𝑇
3 ×3 ] 𝑃
𝑇
= 1 1 0
3×3
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 ]
[ ]
How to correct the error? 1
0
0
1
0
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.
So the correct received sequence is [ 1 1 0 0 1 1].
The given generator matrix enables correction of at most 1 bits.
ssible to correct more bits , but it requires quite a lot work! No Free Lunc
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