Mathematical Approach to linear Block Code

advertisement
SIRTE
Data Communication
Mathematical Approach to Linear Block Code
Dr. Rajeev Srivastava
2015
www.drrajivsri.com
Unit 5
Mathematical Approach to Linear Block Code
Linear Code : In coding theory, a linear code is an error correcting code for which any linear
combination of code words is also a code word. Linear codes are traditionally categorized as block
code and convolution code, when these two codes are combined they are called as turbo codes.
Mathematical presentation/method of linear block codes :
Block code is generated as (n,k) code
 n  message bits/Data word
 (n-k)  check bits (CRc : Cyclic Redundancy check bits)
m0 m1m2 .....mk 1 / b0 b1. .....bnk 1
K message bits
(n – k) parity bit
So the produced code word can be denoted as x0 , x1 , x2 .....xn1 
Where,
x0 m 0 b0
x1  m1b1
Or
xi ={
mi ........i  0,1,......k  1
bi k ......l  k , k  1,........n  1
If we take C(7,4)
Then
n=7
K = 4 & (n-k) = 3
C (7,4)
7=n
4
K
m0m1m2m3
So, finally code word can be represented as
3
n-k
b0b1b2
bn-k-1
X = [M : B]
Where M = K -> message bits [Data Word]
e.g. C(7,4) = IK = 4x4
&
PK = 4x3
identify matrix
coefficient matrix
Or in details
1
0
IK =
0
0
0 . . 0
1 .. . 0
in case of 4x4 it is IK =
0 1 . 0
0 0 . 1
Kx4
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
B = (n – k) -> parity bits
Matrix Presentation of Linear Block Code
X = [M : B]
[X]1xn = [M]1xk [G]kxn
[X]1xn
=
Code word matrix of 1xn size
[M]1xk =
Date word matrix of 1xk size
[G]kxn
Generator matrix of kxn size
=
Generator Matrix : [Which generates required values for you, e.g. parity bits]
 The Generator matrix will be dependent o the type of linear code used.
 It is represented as
[G] = [Ik/P]kxn
Where, IK = Kxk
P = K x (n-k)
P00
P01
PKx(n-k) = .
.
P0, K 1
P10
P11
.
.
P1, K 1
P21
P21
.
.
P2, K 1
identity matrix
Coefficient matrix
.
.
Pnk 0
PA K 1
.
.
PA K , K 1
P00
in case of 4x3 P01
P02
Kx(n-k)
P10
P11
P12
P20
P21
P22
P30
P31
P32
How to obtain parity bits ?
The parity bits corresponding to each data word can be obtained as
B=MxP
Where
M = Message word / Data word
P = Coefficient matrix
P00
P01
.
.
P0,k 1
i.e. [b0b1……bn-k] = [m0m1…..mk-1]1xK
So
P10
P11
.
.
P1,k 1
P20
P21
.
.
P2,k 1
.
.
.
.
.
.
.
.
.
.
Pnk ,0
Pnk ,1
.
.
Pnk ,K 1
(Kxn-k)
b0 = m0P00  m1P01  m2P02  ……….  mkP0,k-1
Generation of Code words :
Step 1 : Generator matrix is given, separate out coefficient matrix P
Step 2 : Obtain parity bits for each message word as
[B] = [M][P]
Step 3 : Join these parity bits after the message bits to get corresponding code words
Ex.
The generator matrix for a (6,3) block code b give below. Fix the code words of this code.
G=
Soln.
100
010
001
:
:
:
011
101
110
In case of block code of (n, K) which is (6,3) here
n=6
K = 3 & n-K=3=parity bits
It means message block size (K) = 3
Length of code word = 6
Step1: Separate Coefficient matrix P as G continuous P as
G = [Ik/P]
So,
1 0 0
Ik [0 1 0]
0 0 1
0 1 1
P= [1 0 1]
1 1 0
G = [Ik / P]
P3x3
Now use formula
B=MxP
0 1 1
[b0b1b2] = [m0m1m2] [1 0 1]
1 1 0
Since block size b=k=3, so eight possible block are
(000)(001)(010)(011)(100)(101)(110)(111)
b0 = m00 ⨁ m11 ⨁ m21 = m1 ⨁ m2
b1 = m01 ⨁ m10 ⨁ m21 = m0 ⨁ m2
b2 = m01 ⨁ m11 ⨁ m20 = m1 ⨁ m2
code words for (6,3) block code
Sr.
Message word
Parity bits
no
m0
m1
m2
b0
b1
b2
1
0
0
0
0
0
0
2
0
0
1
1
1
0
3
0
1
0
1
0
1
4
0
1
1
0
1
1
5
1
0
0
0
1
1
6
1
0
1
1
0
1
7
1
1
0
1
1
0
8
1
1
1
0
0
0
Complete code word
m0
m1
m2
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
b0 = m1 ⨁ m2
b1 = m0 ⨁ m2
b2 = m0 ⨁ m1
Decoding the received code words:
Step 1 : obtain the parity check matrix H:
[H] = [Pt /In-k]
PT = transpose of coefficient matrix
In-k = identity matrix of the order (n-k) where (n-k) is no. of parity bits
Step 2: take transpose of parity check matrix H:
HT=
[P/In-k]nx(n-k)=HT
If YHT = (0,0,0------0) No error in transmission [Y = received code word]
If YHT ≠ (0,0,0------0) Error exits in transmission [Y = received code word]
Example: For a linear block code (6,3) the coefficient matrix is a follows
0 1 1
[P] = [1 0 1]
1 1 0
The received code word are
(i)Y1 = 001110 (ii) Y2 = 111011
Check the correctness of recived words.
b0
0
1
1
0
0
1
1
0
b1
0
1
0
1
1
0
1
0
b2
0
0
1
1
1
1
0
0
0 1 1
Step1: PT [1 0 1] [transpose the matrix is obtained by interchanging the rows & coloums]
1 1 0
& n-k = 6-3 = 3
1 0 0
I3 = [0 1 0]
0 0 1
H= [PT |I3]
0 1 1 1 0 0
=[1 0 1 0 1 0]
1 1 0 0 0 1
0
1
T
H = 1
1
0
[0
1
0
1
0
1
0
1
1
0
0
0
1]
0 1 1
1 0 1
T
Now Y1 H = [001110] 1 1 0
1 0 0
0 1 0
[0 0 1]
0.0⨁0.1⨁1.1⨁1.1⨁1.0⨁0.0=
Result Y HT = (0,0,0) No error
0 1 1
1 0 1
1 1 0
Y2 HT =[111011]
1 0 0
0 1 0
[0 0 1]
Y2 HT = (0,1,1) Erroneous transmission
Important formula for linear block code
1.
2.
3.
4.
5.
6.
7.
8.
CODE WORD FORMAT
GENERATION OF CODE WORD
GENERATOR MATRIX
CADE RATE
CODE EFFICIENCY
NO OF ERROR DELECTATE
NO OF ERROR CORRECTABLE
PARITY CHECK MATRIX
Error correction (syndrome decoding)
Q. WHAT IS SYNDROME?
:
:
:
:
:
:
:
:
A=[M,B]
X=MG
G= [IK : P]
R=K/H
Η= CODERATE = K/N
S ≤ (D MIN – 1 )
S ≤ ½ (D MIN – 1 )
H = [PT :| IN-K]
A. The syndrome is defined as the non-zero output of the product YHt
The all non-zero element of syndrome represent no error state.
A non-zero value represents state of error is transmission.
C(7,4)
S=YHT
OR
[S]1X(N-K) = [Y]1XN [HT]NX(N-K)
[S]1x3 = [Y]1x7 . [HT]7x3
PROCEDURE OF ERROR CORRECTION:
STEP 1: For the given code word obtain the syndrome
S= YHT = [S1 S2 - - - SN]
STEP 2: Now compare syndrome with each now of HT
STEP 3: The row number where syndrome exactly matches with the element of row of ht is given bit
No. in error .
STEP 4: Invert this bit to correct the error.
EX: For a (6,3) linear block code, the received code word is [111011]. Is this code word correct? If not
than correct it using the syndrome decoding. The coefficient matrix is given by
0 1
P = [1 0
1 1
1
1]
0
STEP 1:
HT = [P / IN-K]
0
1
1
1 1
0 1
1 0
1
0
0
0 0
1 0
0 1
since
HT = [P / IN-K]
now
Y = 111011
so
S = YHT
S= [111011]
0
1
1
*
1 1
0 1
1 0
1 0
0 1
0 0
0
0
1
S = [011]
STEP 2: Locate the Error



Compare the syndrome with each row of ht matrix.
It matches with 1st row.
hence , 1st received bit b wrong
111011
WRONG
STEP 3: Invert the error bit
011011
B’ A VALID CODE
EX. consider (7,4) block code generated by the following :
1
0
G=[
0
0
0
1
0
0
0
0
1
0
0
0
0
1
1
0
1
1
1
1
1
1
0
1
]
0
1
7x4
(A). Generate at least 4 block code
(b). check 1101101 is correct or not?
Explain how error syndrome s helps in correcting the error.
SOLN.
HINT: USE FORMULAS
[G] = [IK / P]KXN
SEPARATE:
1
0
IK = [
0
0
P=[
0
1
0
0
1
0
1
1
0
0
1
0
1
1
1
1
IK & P
0
0
]  IDENTITY MATRIX
0
7x4
1
4x4
0
1
]  COEFFICIENT MATRIX
0
1
3x4
[b0 b1 b2] = [m0 m1 m2 m3] x [
1
0
1
1
1
1
1
1
0
1
] [B] = [M] [P]
0
1
CODE RATE:
The code rate is defined as ratio of number of massage bits (k) to the total number of bit (n) is
a code word.
∴ CODE RATE (R) = K/N = CODE EFFICIENCY
HAMMING DISTANCE:
HAMMING WEIGHT:
No. Of non-zero element in a code vector is called as hamming weight.
X = 11010100
So hamming weight is = 4
W(X) = 4
BIT ERROR RATE (BER)
:
[PPT]
CHARACTER ERROR RATE (CER)
:
B X BER [B IS BITS PER CHARACTER]
FRAME ERROR RATE (FER)
:
F * BER [F IS NO BITS PER FRAME]
HAMMING CODE STRUCTURE:
D15
D14
D13
D12
D11
D10
D9
P8
D7
D6
D5
P4
D3
P2
P1
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
15 BITS HAMMING CODE
7 BIT HAMMING CODE:
D7
D6
D5
P4
D3
P2
P1
7
6
5
4
3
2
1
.
PROBLEM: A SEVEN BIT HAMMING CODE RECEIVED IS 1111101. WHAT IS THE CORRECT CODE?
ANSWER: Code is erroneous. The correct code is 1111111.
EX: The Parity Check Matrix Of A Particular (7,4) Linear Block Code Is Given By:
1 1
H = [1 1
1 0
i)
ii)
iii)
iv)
SOLUTION:
1 0
0 1
1 1
1 0 0
0 1 0]
0 0 1
Find generator matrix
List all code vectors
What is minimum hamming distance between code vectors?
How many errors can be detected & corrected?
Use formulae:
generator matrix g = [ik | p]
Parity check matrix h = [pt | in-k]
1 1
 P T = [1 1
1 0
1
1
P=[
1
0
&
1
0
]
1
1 4x3
1
IK = [ 0
0
0 0
1 0]
0 1
therefore
G = [IK | P]
1
0 0
0 1 1
1
0
1 0
0 1 1
0
0
0 1
0 1 0
1
[0
0 0
1 0 1
1]
G=
I4X4
1
1
0
1
1 0
0 1]
1 1
Parity bits ................ For code word
B = MP
[B0 B1 B2] = [M0 M1 M2 M3] X [P]
1
1
1
0
1
1
0
1
1
0
]
1
1
[B0 B1 B2] = 101
FOR CODE WORD SHOW TABLE 13.11.18 PAGE 13-39
NOW
D MIN = 3
D MIN = S+1
∴S≤2
&T≤1
0
1
0
0
0
0
1
0
0
0
]
0
1
 It Is the Required Generator Matrix
P4X3
[B0 B1 B2] = [M0 M1 M2 M3] X [
1
0
IK = [
0
0
[AS 3 ≥ 2T+1]
4x4
CODE WORD POLYNOMIAL
If you have code word [x0, x1, x2 --------- xn-1] than you can always represent by code
word polynomial:
x[D] = x0 + x1.D + x2. D2 = x3.D3 + ----------- + xn-1.Dn-1
Where D is an arbitrary real value.
Cyclic code uses shift property
We do here polynomial multiplication, which infaet is equivalent to shifting to the right.
 If x[D] = x0 + x1.D + x2. D2 = x3.D3 + ----------- + xn-1.Dn-1
Than
 [ D.x[D]
]= xn-1 + x0.D + x1. D2 + x2. D3 + ----------- + xn-2.Dn-1
Mod (Dn-1)
Or
D x [D] mod (Dn-1) = n xn-1 + x0.D + x1. D2 + x2. D3 + ----------- + xn-2.Dn-1
Shifting to right
it is nothing but presentation of
[xn-1, x0, x1, x2 --------- xn-2]
like wise
D2 x [D] mod (Dn-1) = n xn-2 + xn-1. D + x0.D2 + x1. D3 + ----------- + xn-3
Representation of
( xn-2, xn-1, x1 , x2--------- xn-3)
Each shifted word represents a new code word
Generator polynomial for cyclic code:
The generator polynomial is represented by Cp[D]
It is used to generate cyclic code words from massage bits (data word).
The generation of code is represented as
x[D] = M[D] , G[D]
Here, M[D] = message signal polynomial of degree ≤ K
G[D] = generating poly of degree (n-k) is given by:
G[D] = 1 + ( g1.D + g2. D2 = g3.D3 + ----------- + gn-k-1.Dn-k-1 ) + Dn-k
or
G[D] = 1 + ∑𝑛−𝑘−1
𝑔i Di + Dn-k
𝑖=1
IMP- the degree of generator polynomial is equal to the number of parity bits.
Generation of non- systematic code words
The non- systematic code words can be attained by multiple of massage polynomial
with the generator polynomial as follow...
X1(D) = M1(D) . G(D)
X2(D) = M2(D) . G(D)
X3(D) = M3(D) . G(D) ....... and so on.
Generation of systematic code word:
Step1: multiply the massage poly M(D) by Dn-k to get Dn-k M(D)
[=> Shift code by (n-k) bits ][on other word
Step2: Divide Dn-k M(D) by Generator poly G(D) to obtain remainder b(D)
 Dn-k M(D) / G(D) = QCD ⨁ B(D) / G(D)
Step3: Add the remainder poly b(D) to the shifted poly Dn-k M(D) & obtain code word poly
x(D) is exactly divisible by generator poly G(D).
EX: The Generator Polynomial for a (7,4) cyclic code is given by
G(D) = 1 + D + D3
Compute all systematic & non Systematic code words.
Solution:
NON Systematic code:
1. This is a (7, 4) cyclic hamming code, so message word / data word is 4 bit long.
=> Total no of data word = 24 = 16
Or
M = [m0 m1 m2 m3]
Let us take M = (10 10 ) for example
Now, $ bit data word can be represented as
M[D] = m0 + m1D + m2D2 + m3D3
Substituting the value of (1010) we get –
= 1 + 0.D + 1.D2 + 0.D3
= 1 + 1.D2
Now,
G(D) = 1 + D + D3
So non systematic cyclic code is given by
X[D] = M[D] . G(D)
X[D] = (1 + D2 ) . (1 + D + D3)
X[D] = 1 + D + D3 + D2 + D3 + D5
X[D] = 1 + D + D2 + D3 ⨁ D3 + D5
X[D] = 1 + D + D2 + D5
X[D] = 1 + 1 . D + 1 . D2 + 0 . D3 +0 . D4 + 1 . D5+ 0 . D6
6 is let became
n-1 = 7-1
X[D] = 1100010
This is the
Code word for the data word (1010)
Like wise we can create other non systematic code.
TO OBTAIN SYSTEMATIC CODE:
Step1: multiply M(D) by Dn-k
i.e. Dn-k . M(D) = D3 . (1 = D2)
= D 3 + D5
Step2: divide Dn-k M(D) by generating polynomial
 Dn-k . M(D) / G9D0 = D3 + D5 / 1 + D + D3
 D3+0. D2 + D + 1
D5 + 0. D4 + D3+ 0.D2 + 0.D + 1
Quotient poly Q(D)
D2 + 0D + 0
 D3+0. D2 + D + 1 D5 + 0. D4 + D3+ 0.D2 + 0.D + 1
D5 + 0. D4 + D3+ D2
⨁
0 +0
+ 0 + D2 + 0.D + 1
Reminder poly B(D)
So, the result of the division are
Quotient -> Q(D) = 0 + 0D + D2
Reminder -> B(D) = 0 + 0D + D2
Step3: Obtain the code word poly x(D)
= [ Dn-k M(D) ] ⨁ B[D]
Represents parity bit
= [ 0 + 0 D + 0D2 + D3 +0 D4 + D5+ 0D6] ⨁ [ 0 + 0D + D2]
= [0 + 0D + D2 + D3 +0D4 + D5+ 0.D6]
0011010
Parity 001
Massage bit = 1010
0011010
Code Word
X0
X1
X2
X3
X4
X5
X6
0
1
1
1
0
1
0
parity
massege
Some arrangement of bits can be done as
1
0
1
0
0
Massage
0
1
0
Massage
0
1
Parity
1
1
0
Parity
0
Check method
Exp = D5 + 0D4 + 1D3+ 0D2 + 0D + 0
= 101000
Division = D3+ 0D2 + D + 0 = 1011
Take polynomial is increasing order…

1+D+0D2+ D3

1101
Final Data
0+0D+0D2+1D3+ 0D4+ 1D5 + 0D6
0001010
000 1010 001
Massage word = 1010
CRC = 001
Generator parity check matrix for cyclic codes:
Generater matrix G[D] is given by ( of size kxn)
G[D] = Dn-k-1 + Dn-k . g n-k-1 + .................... + g2D2=g1D+1
Multiplying both side by Di
Di .G[D] = Dn-k+i + Dn-k+i-1 + .................... + g2D2+I=g1D1+i+ Di
Where i=(k-1), (k-2)............................2,1,0
The epn derived represent poly for row of ith.
So we can derive fall matrix.
Ex 13.2
For (7,4) cyclic code, find out generator matrix
If G[D] = 1+D+D3
Solution:
n=7 & k=4
Here n-k=3
G[D] = 1+D+D3
Multiplying both side by Di
Di .G[D] = Di + D1+i + D3+I
Since
K=4 so i=0, 1, 2, 3
Now substitute these values.
Row no 1:
i=3
D3G[D] = D3+D4+D6
Row no 2:
i=2
D2G[D] = D2+D3+D5
Row no 3:
i=1
D1G[D] = D+D2+D4
Row no 4:
i=0
D0G[D] = 1+D+D3
So, the generator matrix is-
G=
D6
1
0
0
0
D5
0
1
0
0
D4
1
0
1
0
D3
1
1
0
1
D2
0
1
1
0
D1
0
0
1
1
D0
0
0
0
1
4x7
This is required generator matrix.

The cyclic codes are basically linear block codes. Therefore its code words can
be obtained by using the generator matrix
X=M.G
M=1xK Massage word
Ex 13.12
For the generator matrix of previous example, calculate all the problem code words.
Solution:
All the code words can be obtained by using the expression
X=M.G
Let M = (m3 m2 m1 m0) = (1010)
1 0 1 1 0 0
0 1 0 1 1 0
X= [1010] [
0 0 1 0 1 1
0 0 0 1 0 0
0
0
]
0
1
Non symmetric
Matrix & Code
(Both)
X= [1001 110]
Similarly, other code words can be found.
Systematic form of Generator Matrix:
1. We know generator matrix in systematic form is
G= [Ik | Pkx(n-k)]kx(n-k)
2. This means there are ‘K’ no of rows in the generator matrix let us represents the row
of generator matrix is represented by.
Ith row of G=Dn-i = Ri(D)=.............where i=1,2,3------k
3. Now divide Dn-i by G[D]
 Dn-i / G[D] = Quitrent + Reminder/ G[D]
Dn-i/ G[D] = Qi + Ri[D] / G[D]
Simplify the epn we get
Dn-i = Qi (D). G(D) ⨁ Ri(D)
Where i=1,2,3,--------- k
∴ Dn-i ⨁ Ri(D) = Qi (D). G(D)
In mod 2 operation
This expression represents ith row
Addition 4
Of systematic generator matrix
Subtracted given result
Ex-
For systematic (7,4) cyclic code, find out generator matrix & Parity check Matrix.
Solution:
Given G[D] = D3+D+ 1
1. The ith row of the generator matrix is given as
Dn-i ⨁ Ri(D) = Qi (D). G(D) ........................ where i=1,2,3,........k.
2. It is given that the cyclic code is systematic (7,4) cod.
∴ n=7 , k=4 & (n-k) = 3
Substituting these values in expression.
 D7-i ⨁ Ri(D) = Qi (D). G(D)
 D7-i ⨁ Ri(D) = Qi (D). (D3+D+ 1)
3. For I=1
D6 ⨁ R1(D) = Q1 (D). (D3+D+ 1)
i=1,2,3,....4
Now find Q1(D) & R1 (D)
It is obtaind by dividing Dn-1 / G(D)
 Dn-1 / G(D)
D 3+ D + 1
D6
 D 3+ D + 1
D 3+ D + 1
D6
D 6+ D 4+ D 3
D 4+ D 3
D4+ D2+ D
D 3+ D 2+ D
D 3+
D+1
D2+ 1
Reminder Poly Ri(D)
So,
Qi (D)= D3+ 0.D2 + D + 1
Ri(D) = D2 + 0.D + 1
Substituting these values into epx (2), we get
D6 ⨁ Ri(D)
= Qi (D). G(D)
= (D3+ D2 + 1). (D3+ D2 + 1)
= D6+ 0D5 +0D4 +0D3+ D2 +0D+ 1
So, first row of polynomial is
= D6+ 0D5 +0D4 +0D3+ D2 +0D+ 1
1
0
0
0
1
0
1
1st row of Matrix
D6+ D4 +D3+ D4 +D2+D+D3+D+1
D6+ 0D5 +0D4 +0D3+D2+0D+1
Now,
2nd row of polynomial
D5 ⨁ Ri(D)= D5+D2+D+1
3rd row of polynomial
D4 ⨁ Ri(D)= D4+D2+D
4th row of polynomial
D3 ⨁ Ri(D)= D3+D+1
G=
D6
1
0
0
0
D5
0
1
0
0
D4
0
0
1
0
D3
0
0
0
1
I4x4
D2
1
1
1
0
D1
0
1
1
1
D0
1
1
0
1
4x7
P4x3
This is required generator matrix.
Now to obtain the parity check matrix [H]
H = [PT | I3x3]
1 1
P T = [0 1
1 1
1 0
1 1]
0 1
1 1
H = [0 1
1 1
1 0 1
1 1 0
0 1 0
1 0
I3= [0 1
0 0
0 0
1 0]
0 1
0
0]
1
This is required parity check matrix.
Ex: 13.12.6
A massage 101101 is to be transmitted in cyclic code with a generator polynomial
G(D) = D4+D3+1 , Obtain transmitted code word. Find out parity bits (count only).
Solution:
Following steps will be followed to solve this problem.
Step1: Obtain massage polynomial M(D).
M(D) = m0+m1D+m2D2+m3D3+m4D4+m5D5
Step2: Multiply M(D) by Dn-k to obtain Dn-k .M(D)
Step3: Divide Dn-k .M(D) by Generator Polynomial G(D)
Step4: Obtain code word X is
X = [m5 m4 m3 m2 m1 m0 | b3 b2 b1 b0 ]
(i)
The given massage is 101101  6 massage bits
∴ k=6=size of data word
(ii)
Degree of generator polynomial = 4 = parity bits
 n-k= 4
 n-6=4
 n=10
(iii)
Now, Obtain massage polynomial M(D)
The massage is 101101 = [m5 m4 m3 m2 m1 m0 ]
So poly is given as
M(D) = m0+m1D+m2D2+m3D3+m4D4+m5D5
---------------------------(I)
Substituting the value ew get massage Polynomial as:
= 1+0D+1D2+1D3+0D4+1D5
=
1+D2+D3+D5
---------------------------(II)
(iv)
Recall G(D) = 1+D3+D4
= 1+0D+0D2+1D3+1D4
(v)
--------------------------- (III)
Multiply massage Polynomial M(D) by Dn-k
n-k = 4  D4
Dn-k . M(D)
= D4 .M(D)
= D4 . (1+0D+D2+D3+0D4+D5)
= D4 +0D5+D6+D7+0D8+D9
(vi)
Now dividing D4 M(D) by Generator polynomial
Quotient poly Q(D)
D5 + D4 + D2
D4+D3 + 0D2 +0D + 1
D9 +0D8+D7+D6+0D5+D4
D9 +D8+0D7+0D6+D5
D8+D7+D6+D5+D4
D8+D7+0D6+0D5+D4
D6+D5
D6+D5+0D4+0D3+D2
D2
Reminder poly B(D)
(vii)
To obtain code Polynomial X(D) , we
Add Dn-k M(D) to reminder

X(D) = D4 M(D) = B(D)
But B(D) is
B(D) = b0 + b1D+ b2 D2+ b3 D3 ---------- + bn-k-1 Dn-k-1
Here n-k-1 = 4-1=3, so
B(D) = b0 + b1D+ b2 D2+ b3 D3
But we obtain B(D) = D2
 b0 =0, b1 =0, b2 =1, b3 =0
 so parity bits (b3 b2 b1 b0 ) = (0100)
so finally the code is
X = [m5 m4 m3 m2 m1 m0 | b3 b2 b1 b0 ]
X = [101101:0100] & the corresponding Polynomial is
X(D) = D9 +0D8+D7+D6+0D5+D4 +0D3 + 1D2 +0D + 0
Answer....
Ex 13.b.3:
Write the step to complete the checksum in CRC code.
Calculate CRC for frame 110101011 & the Generator polynomial = x4+x+1 & write the
transmitted frame.
Solution:
Here we have to convert Generator polynomial into equivalent bits pattern. [Generator
polynomial is nothing but divisor]
x4+x+1 = x4+ 0x3+ 0x2+x+1
10011
1
0
0
1
1
1
1
1
0
1
1
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
1
0
1
0
1
0
1
1
1
1
0
1
0
1
0
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
1
0
1
0
1
1
1
0
0
0
0
1
1
0
1
0
0
0
Que. 13.13.4 if the frame is 110101011 & Generator polynomial is x4+x2+1. What would be
transmitted frame?
Que. 13.13.5 Compute
(1) Reminder for data word x7+x5+1 using Generator polynomial x3+1. [Ans: x2+x+1]
(2) CRC
(3) CRC Polynomial
Ex 13 .13.6
A bit
Now Find CRC
1
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
1
1
0
1
0
1
0
1
1
1
1
0
1
0
1
0
1
1
1
1
0
1
0
1
0
1
1
0
0
1
1
0
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
1
0
1
0
1
1
0
1
0
0
0
x3 +1
x4 + x2 + x
x7 + 0x6 + x5 + 0x4 + 0x3 + 0x2 + 1
x7 + 0x6 + 0x5 + x4
x5 + x4 + 1
x5+ 0x4+ 0x3 + x2
x4+ x2 +1
x4+ 0x2 + 0x3 + x
0x4+ 0x3 + x2 + x + 1
00111
s
Download