Professional Documents
Culture Documents
1
1. Introduction
4
2. Finite fields
2.3. Irreducible and primitive polynomials
f(p): polynomial the coefficients of which are elements of F2
f(p) = f0 + f1p + f2p2 + … + fmpm with fi ∊ F2
degree of the polynomial = highest non-zero power of p
m ≠ 0 ⇒ polynomial is of degree = m
Definition 3.1.
A polynomial is irreducible (tối giản) in if it cannot be written
as a product of polynomials b(p)c(p) with b(p) and c(p) of degree
higher or equal to 1.
Theorem 3.1.
All irreducible polynomials in F2 of degree m divide (p2m -1 −1).
5
2. Finite fields
2.3. Irreducible and primitive polynomials
Definition 3.2: An irreducible polynomial f(p) of degree m is a
primitive (nguyên thủy) polynomial if the smallest positive integer n
for which f(p) divide pn+ 1 is n = 2m − 1
Example: List of primitive polynomials for m ≤ 16
6
2. Finite fields
2.3. Finite field with 2m elements
Finite field: Fq (q = 2m)
Basis field: F2
Irreducible polynomial in F2: f(p) (f(α) = 0)
Successive powers of α generate the 2m − 1 non-zero elements of
the finite field Fq
Example 1– Addition and multiplication in F4
• F4 (m = 2)
• primitive polynomial: f(p)= 1 + p + p2
• f(α) = 1 + α + α2 = 0
• successive powers of α → 22 − 1 non-zero elements of F4 (see
Ex. in 3.2.2.)
7
2. Finite fields
2.3. Finite field with 2m elements
Addition and multiplication in F4
α2 = 1 + α, α3 = α + α2 = 1 and α4 = α
⇒ F4: finite field
Example 2:
• F16 ( m = 4)
• irreducible polynomial: f(p) = 1 + p+ p4
• f(α) =1 + α + α4 = 0
• successive powers of α generate the 24 − 1 = 15 non-zero
elements of F16
8
2. Finite fields
2.3. Finite field with 2m elements
List of elements of finite field F16 built from the irreducible polynomial
1 + p + p4
9
2. Finite fields
2.3. Finite field with 2m elements
At each non-zero element of the finite field with q = 2m, we
associate a minimal polynomial.
Definition 3.3. The minimal polynomial mi(p) is the polynomial with
the lowest degree for which αi is a root.
For the previous example, the 15 minimal polynomials are the
following:
IK: identity matrix (KxK); c = [u0, u1, …, uK-1, cK, cK+1,…, cN-1] 12
3. Linear block codes
3.1. Introduction
Example 1:
Repetition code C1 (3, 1) in F2
G = (1 1 1)
The information bit is repeated three times:
Example 2:
Parity check code C2 (3, 2) in F2
15
3. Linear block codes
3.1. Introduction
Definition 3.4. The rate R of a block code (N, K) is equal to:
𝑵
𝑹=
𝑲
16
3. Linear block codes
3.2. Minimum distance of a code
Definition 3.6. Let c1 and c2 be two codewords of length N of the
code C, the Hamming distance dH(c1, c2) is equal of the number of
elements which are different.
17
3. Linear block codes
3.2. Minimum distance of a code
Definition 3.8. The minimum distance dmin of the code C is the
Hamming distance between the pair of codewords with the
smallest Hamming distance:
𝒅𝒎𝒊𝒏 = min 𝒅𝑯 𝒄𝒊 , 𝒄𝒋
𝒊,𝒋,𝒊≠𝒋
When the code is linear:
Minimum distance dmin is equal to the minimum Hamming weight of
the code C (by excluding the null codeword c0):
𝒅𝒎𝒊𝒏 = min 𝒘 𝒄𝒊
𝒊,𝒊≠𝟎
Note: The minimum distance was the unique criterion to evaluate
the performance of error correcting codes
18
3. Linear block codes
3.3. Parity check matrix
Block linear code (N, N − K) associated with each block linear code
C (N, K).
H: generator matrix of this dual code
Each of the codewords c of the code C is orthogonal to all the
codewords of the dual code
𝐜. 𝐇𝐓 = 𝟎
Relation between the generator matrix G of the code C and H:
𝐆. 𝐇𝐓 = 𝟎
G: systematic ⇒ H: parity check matrix of the code C.
19
3. Linear block codes
3.3. Parity check matrix (cont.)
Example: The parity check matrix of the Hamming code C3 (7, 4)
20
3. Linear block codes
3.4. Hamming codes
Hamming codes: perfect binary linear block codes (N, K)
N = 2J − 1; K = 2J− 1 − J
Parity check matrix H: dimension J × N (J = N − K)
Columns of H: N binary non-null vectors containing J elements
For example, for J = 3:
• Hamming code: (7, 4) code
• parity check matrix
21
3. Linear block codes
3.5. Decoding of binary linear block codes
r=c+e
• r: received word
• c: transmitted codeword
• e: error vector
Straightforward approach: compare the received word r with all
the 2K codewords of the code C
Error syndrome s: dimension 1 × (N − K)
s = rHT = cHT + eHT = eHT (since: cHT = 0)
If there is no transmission error, the error syndrome s is the
null vector
Decoding methods:
• the standard array,
• the syndrome decoding
• and the Viterbi algorithm.
22
3. Linear block codes
3.5. Decoding of binary linear block codes
Syndrome decoding
error syndrome: 2N-K different values
s = rHT
syndrome → vector ê.
This method only requires a look-up table that associates the error
syndromes with the error vectors.
Syndrome table
Estimated codeword:
𝐜=𝐫+𝐞
⇒ Having to perform the product rHT
and memorize 2N-K error vectors
23
3. Linear block codes
3.5. Decoding of binary linear block codes
Syndrome decoding (cont.)
Example:
code C4 (5, 2)
generator matrix:
24
3. Linear block codes
3.5. Decoding of binary linear block codes
Syndrome decoding (cont.)
Example (cont.):
code C4 (5, 2)
information word u = [1 1]
associated codeword: c = [1 1 1 1 0]
received vector: r = [1 1 1 0 0]
calculate error syndrome → Syndrome decoding
table for the (5, 2) code
Syndrome associated with the received word r:
s = rHT = [0 1 0]
Syndrome decoding table ⇒ ê = [0 0 0 1 0]
𝐜 = 𝐫 + 𝐞 ⇒ ĉ = [1 1 1 1 0]
25
4. Cyclic codes
4.1. Definition and properties
Note. – In this section, the most significant bit (MSB) of the vectors is
on the right.
Cyclic codes: subset of the linear block codes
For linear block codes: K codewords are required to determine the
set of 2K codewords
For cyclic codes, only one codeword is enough.
Cyclic codes: finite field F2 (Fq)
Main property of the cyclic codes:
• codeword: c = [c0 c1 … cN - 2 cN – 1]
• right cyclic shift of one position: c’ = *cN - 1 c0 … cN - 3 cN - 2]
c’: is also a codeword
• cyclic code (N, K)
• associate a polynomial c(p)
26
4. Cyclic codes
4.1. Definition and properties (cont.)
Properties of the cyclic codes can be obtained easily using the
algebra of the polynomials modulo pN − 1.
pc(p) modulo pN − 1:
28
4. Cyclic codes
4.2. Properties of the cyclic codes (cont.)
The set of the 2K polynomials associated with the 2K codewords of
a cyclic code (N, K) can be obtained by performing the
multiplication of g(p) by the 2K polynomials of degree lower or
equal to K − 1.
u(p): associated with the information word u
u = [u0 u1 … uK-2 uK-1]
30
4. Cyclic codes
4.2. Properties of the cyclic codes (cont.)
Systematic code:
• information word: u = [u0 u1 … uK-2 uK-1]
• associated polynomial: u(p) = u0 + u1p + … + uK-2pK-2 + uK-1pK-1
31
4. Cyclic codes
4.2. Properties of the cyclic codes (cont.)
Example: Hamming code C (7,4)
• generator polynomial: g(p) = 1 + p + p3
• information word: u = [1 1 1 0]
• polynomial associated with u:
u(p) = 1 + 1p + 1p2 + 0p3
pN-Ku(p) = p3 + p4 + p5
t(p) = p
⇒ associated codeword:
32
4. Cyclic codes
4.3. Encoding of cyclic codes
Cyclic encoder: modulo 2 adders and shift registers
Implementation of a division of polynomials
a(p) = g(p)q(p) + t(p)
a(p): dividend polynomial
g(p): divisor polynomial
q(p): quotient
t(p): remainder
Ex: Division of
1 + p2 + p6 by 1 + p + p2
33
4. Cyclic codes
4.3. Encoding of cyclic codes
Hardware structure of the division by 1 +p + p2 :
34
4. Cyclic codes
4.3. Encoding of cyclic codes
Sequencing of the division
35
4. Cyclic codes
4.4. Decoding of cyclic codes
The decoding of cyclic codes is composed of two phases:
– syndrome calculation;
– error localization.
Syndrome calculation: dividing the polynomial associated with the
received word r(p) by g(p)
r(p) = q(p)g(p) + s(p)
The syndrome is the remainder of this division:
– if s(p) = 0, then the received word r(p) is a codeword;
– the syndrome s(p) is a polynomial of degree less or equal to N − K − 1.
From the value of s(p) it is possible to estimate the error vector ê(p).
𝑐 𝑝 = 𝑟 𝑝 + 𝑒(𝑝)
𝑐 𝑝 : error vector
r(p): received vector
𝑒 𝑝 : estimated error vector
36
4. Cyclic codes
4.4. Decoding of cyclic codes
Correction of a single error
Single error: e(p) = pj
Syndrome:
s(p) = pj mod g(p)
Hardware structure of the decoder for the Hamming code (7, 4):
37
4. Cyclic codes
4.4. Decoding of cyclic codes
Correction of a single error
Generator polynomial: g(p) = 1 + p + p3
The result of the multiplication of the Syndrome table
syndrome s(p) by pN-j is equal to 1:
s(p)pN-j = pjpN-j = pN = 1
⇒ To determine the position of the error,
we just have to successively multiply s(p)
by p until the result is equal to 1.
38
4. Cyclic codes
4.4. Decoding of cyclic codes
Correction of a single error (cont.)
Example:
• Codeword: c = [1 1 1 1 1 1 1]
• Error vector e = [0 0 0 0 1 0 0]
• e(p) = p4 (a single error occurs on the fifth bit from the LSB)
39