0% found this document useful (0 votes)
11 views

Coding-Part 5

Uploaded by

Love Badgoti
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Coding-Part 5

Uploaded by

Love Badgoti
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Dr. Asmita A.

Moghe
Professor, Department of Information Technology
UIT RGPV-Bhopal
 Linear Block Codes
 Linear Block Codes- If 2k codewords of a
systematic code can be expressed as a
linear combination of k linearly
independent code-vectors, the code is
called a linear block code or systematic
block code
 Generate Block Code-
 First information sequence is segmented
in k bit blocks.
 Each block is transformed into a large
block of n bits by encoder as per fix rules
 N-k additional bits are generated from
linear combination of message bits
 Encoding
 Let a message block be D = [d1d2…dk]

 Each message of k bits=> 2k possible


messages.

 Each message block is transformed into a


code word C of length n bits
C = [C1C2…Cn] with 2k code words.
• This entire set of codes is called (n,k)
block code
 In
systematic block code, Ci = di….(1)
i=1,2,…k

 Lastn-k bits in the code word are check


bits generaed fromk message bits as
below: C  p d  p d  ..... p d
k 1 11 1 21 2 k1 k

Ck 12  p12 d1  p22 d 2 2  ..... pk 2 d k


:
: Cn  p1,n k d1  p2,n k d 2  ..... pk ,n  k d k .......( 2)

 Coefficients pi,j are 0’s and 1’s so that Ck’s


are 0’s and 1’s . Addition is modulo 2
 Equation (1) and (2) can be combined to
give a matrix equation
1000....0 : p11 p12 p1 n  k 
0100....0 : p p p n  k 
 21 22 2 
0010....0 : p31 p3 2 p3 n  k 
[C1C2 ...Cn ]  [d1d 2 ...d k ]   ..(3)
... ... ... ... ... ... ... 
0000....1 p p p n  k 
 k ,1 k ,2 k 
 I kxk Pkx ( n  k ) 
  k n

C  DG......( 4)
 Or
 Where G is k x n matrix called Generator
matrix
G  [ I k : P]k n .......(4a)

 Where Ik is k x k Identity matrix and P is
arbitrary k x (n-k) matrix
 Generatormatrix for a (6,3) block code is
given below. Find all code vectors of this
code. 100 : 110 
G  010 : 011
001 : 111 

 (6,3)
=> n=6 and k = 3 => 3 bit code will
be generated , having 23 = 8 code words,
each of size k+r =n = 6 bits each.
 Since message size is 3 bits, there can be 8
possible messages from 000 to 111.

 Let message D=[101]


100 : 110 
 Then we apply C=DG= [101] 010 : 011
001 : 111 

 = [101001]

 Other code vectors can be found similarly .


The code vectors so generated are given as
Message Code vector
000 000 000
001 001 111
010 010 011
011 011 100
100 100 110
101 101 001
110 110 101
111 111 010

• Theparity check matrix H is associated with


each (n,k) block code given as
 p11 p21 ... pk1 : 100 ... 0 
 
p12 p22 p k 2 : 010 ...0 
H 
... ... ... : ... ... .. 
 
 p1,n  k p2,n  k . pk ,n  k : 000.....1 
 To verify if the code word C is generated
from Generator matrix, we use parity
check matrix =PT
 So C is the code word generated from
generator matrix G if and only if :
 CHT =0 where HT = transpose of H.
 If in an (n,k) code, G=[IK :p] and a parity
check matrix H =[ PT :In-k]
 If C and R be transmitted and received
code vectors respectively, in a noisy
commn. system
 Then vector R = C +E

 Receiver decodes C from R and D from


G.

 Receiver does decoding by by finding an


(n-k) vector S (called Syndrome of R) as

S = RHT
=(C + E) HT
= C HT + E HT
= E HT since C HT =0
 So , Syndrome of received vector is 0 if R
is a valid code vector.

 If error occurs in transmission, the


Syndrome of received vector is non-zero.

 Aso S is related to E and the decoder


uses S to detect and correct errors.
 Consider a(7,4) block code generated by
1 0 0 0 : 1 1 0 Explain how Syndrome S
0 1 0 0 : 0 1 1
  helps in correcting a single
G  0 0 1 0 : 1 0 1
  error.
 0 0 0 1:111

 I P 

• For (7,4) code, n=7, k=4, r=n-k =3


• Since G has a 4x4 identity matrix and a
4x3 , P matrix, the H matrix will be given
by H = [PT : In-k]
1 0 1 1 : 1 0 0 

H  1 1 0 1 : 0 1 0 
0 1 1 1 : 0 0 1
•For a message block D =[1 1 0 1], the code
vector C = DG = [1 1 0 1] 1 0 0 0 : 1 1 0 = [1101: 010]
0 1 0 0 : 0 1 1
•  
0 0 1 0 : 1 0 1
 
 0 0 0 1 : 1 1 1 
•For this code vector, the syndrome S is given as
• S = CHT = [0 0 0]
 If the third bit from left of the code vector
Csuffers an error in transmission, the
received vector R will be
 R = [1 1 1 1 0 1 0]
=[1 1 0 1 0 1 0]  [0 0 1 0 0 0 0]
=CE
• and the syndrome of R is S=RHT
or 11 0 
011 
 
1 01 
 
S 1111 01 0111   101  EH T
1 00 
 
 01 0 
001 
 
 Syndrome vector S for an error in the
third bit is equal to the third row of HT

 Also for this code, a single error in ith bit


of C leads to a syndrome vector that is
equal to the ith row of HT.

 Hence a single error can be corrected at


the receiver by comparing S with the
rows of HT and correcting the ith received
bit if S is equal to the ith row of HT.

 S=0 => no error has occured


 R. PSingh & S.D Sapre, Communication
Systems
 Taub & Schilling,Principles of
Communication

You might also like