Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Communications Systems II-Lec.

9 Fourth stage 2020-2021

Example 9.1

A linear (6,3) code is generated according to the generation matrix in Example 8.2 . The
receiver receives r = 100011. Determine the syndrome and the position of the error ?

Following the steps in the last section in Lec.8

1. Find the syndrome

2. By comparing S by the rows of 𝐻𝑇 , we will find that S has the same bits as the third
row. Therefore, we can say that an error in the third bit of r.
e = [0 0 1 0 0 0]

𝐶𝑐𝑜𝑟𝑟𝑒𝑐𝑡 = r e = [1 0 1 0 1 1].

Now, you can check other errors can happened due to the value of S , below :

The syndrome indicates no error if S =0, or the position of the single error providing all rows
of 𝐻𝑇 are different and non zero.

Dr. Hasanain A. Hasan Department of Electrical Engineering, University of Misan


Communications Systems II-Lec.9 Fourth stage 2020-2021

As a review, in order to test the received code we need to evaluate the matrix (H) comping
from (p) and (I) which originated G (the generation matrix).
A- When the received code (given code)(R) with H, this will result the syndrome (S).
B- If all syndrome bits are (0) means no error.
C- If any of syndrome bits having logic (1) means there is an error.
D- Then, we need to look at rows of H transpose matrix to see if there is any of them
equal to S. The order of this row (first, second….etc.) is the order of the bit in the
received code that has an error which can be corrected.

9.1 Hamming Weight and Hamming distance


Weights is called (weight of a code). It can be defined as the total number of logic (1’s) (non
zero) components in the code.

C = 1001011 , the weight of C is 4.

Hamming distance OR distance between two codes is the number of bits (places) where
codes are different.
If C1 = 1001011 and C2=0100011,
Means Hamming distance is = 3.

Then, the minimum distance of a block code (𝑑𝑚𝑖𝑛 ) can be defined as the smallest distance
between any pair of code words. The reason to find the minimum distance (𝑑𝑚𝑖𝑛 ) is the
usage of it in finding error capabilities of the code.

𝐸𝐷 = 𝑑𝑚𝑖𝑛 − 1 (9.1)

𝐸𝐷 : the number of errors that can be detected.

And the number of errors that can be corrected 𝐸𝑐 :

𝑑𝑚𝑖𝑛 −1
𝐸𝑐 = (9.2)
2

Example 9.2
From examples 8.2 and 9.1
𝑑𝑚𝑖𝑛 = 3.

𝐸𝐷 =3 − 1= 2.

3−1
𝐸𝑐 = =1
2

Example 9.3

Find Hamming distance between codes C1 and C2 below

C1 100111001
C2 010110010 , HD = 5

Dr. Hasanain A. Hasan Department of Electrical Engineering, University of Misan


Communications Systems II-Lec.9 Fourth stage 2020-2021

Example 9.4

A (7,4) linear block code (LBC) with a parity check matrix of (4X3) . The first and the third
rows of P are different in only 1 bit position. The second and fourth rows are representations
of OR and NAND gate functions respectively.
a- Find the code words.
b- Check its capability of error detection.
Solution:

C = DG.

[1 x n] = [1 x K] [K x K : K x (n-k)]

K = 4, n= 7,

[1 x 7] = [1 x 4] [(4,4) : (4*3)]

10 00 .11 0
01 00 .01 1
G= [ ]
00 10 .01 0
00 01 .11 1

Sequence Data Code words Weights 𝐇𝐃


0 0000 0000000 0 -
1 0001 0001111 4 4
2 0010 0010010 2 4
3 0011 0011101 4 4
4 0100 0100011 3 5
5 0101 0101100 3 4
6 0110 0110001 3 5
7 0111 0111110 5 4
8 1000 1000110 3 4
9 1001 1001001 3 4
10 1010 1010100 2 4
11 1011 1011011 5 4
12 1100 1100101 4 5
13 1101 1101010 4 4
14 1110 1110111 6 4
15 1111 1111000 4 4

The, 𝑑𝑚𝑖𝑛 = 4.

𝐸𝐷 =4 − 1= 3.

4−1
𝐸𝑐 = = 1.5 ≅ 2.
2

Dr. Hasanain A. Hasan Department of Electrical Engineering, University of Misan


Communications Systems II-Lec.9 Fourth stage 2020-2021

Example 9.5

Consider a linear block code with a following generation matrix

100111
G= [0 1 0 0 1 1]
001110

a- Find 𝐸𝑐 of this code.


b- What is error bit in the received code word [0 1 0 1 1 1]

LEFT FOR NEXT HOME WORK

9.2 Hamming Bound


In syndrome decoding, an (n,k) linear block code can correct upto (t) errors per codeword if
(n) and (k) satisfy the following bound :

2𝑛−𝑘 ≥ ∑𝑡𝑖=0(𝑛𝑖) (9.3)

𝑛 𝑛!
Where ( 𝑖 ) is
(𝑛−𝑖)!𝑖!

Then, a perfect code is the code that satisfy Equation (9.3).

9.3 Burst and random error correcting codes


There are two types of errors; burst (in burst order) and random (occur in a random order)-

For channel in which both of error occur (burst and random) it is better to design codes
capable of correcting random error or single and multiple burst errors. One of the most
effective method is to use interlaced coding and you are eligible to study that in future.

Dr. Hasanain A. Hasan Department of Electrical Engineering, University of Misan

You might also like