0% found this document useful (0 votes)
7 views34 pages

ITC-09

The document provides an overview of linear block codes, focusing on error detection and correction mechanisms. It explains concepts such as parity bits, Hamming codes, generator and parity check matrices, and the properties of linear codes. Additionally, it discusses the importance of minimum distance and error correction capabilities in coding strategies.

Uploaded by

jivinanto2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views34 pages

ITC-09

The document provides an overview of linear block codes, focusing on error detection and correction mechanisms. It explains concepts such as parity bits, Hamming codes, generator and parity check matrices, and the properties of linear codes. Additionally, it discusses the importance of minimum distance and error correction capabilities in coding strategies.

Uploaded by

jivinanto2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Linear Block codes

Dr.A.Manikandan,
Associate Prof/ECE, Amrita School of Engineering.

AMRITA VISHWA VIDYAPEETHAM

1
Learning Objective

To understand error detecting and correcting mechanisms

To study about linear block codes.

AMRITA VISHWA VIDYAPEETHAM

2
Error detection

❖ Error-detecting codes are a sequence of numbers generated by specific


procedures for detecting errors in data that has been transmitted over computer
networks.

❖ When bits are transmitted over the channel, they are subject to get corrupted due
to interference and network problems.

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 3


Parity

❖ A parity bit, or check bit, is a bit added to a string of binary code. Parity bits are
used as the simplest form of error detecting code. Parity bits are generally
applied to the smallest units of a communication protocol

❖ Example : 1 0 1 1

❖ Encoded info using Odd parity: 1 0 1 1 0

❖ Encoded info using even parity: 1 0 1 1 1

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 4


Error Correction

• The basic idea behind error correcting codes is to add a certain amount of
redundancy to the message prior to its transmission through the noisy channel.
This redundancy is basically some extra symbols, added in a known manner.

• The encoded message when transmitted through the channel might get corrupted
due to the noise in channel.

• At the receiver, the original message can be recovered from the corrupted one if
the number of errors is within the limit for which the coding strategy has been
designed.

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 5


Hamming Codes

• Hamming code is useful for both detection and correction of error present in the
received data. This code uses multiple parity bits and we have to place these
parity bits in the positions of powers of 2.

• It is a (7,4) code.

• 4 bit message signal will be added with 3 bit redundant information.

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 6


Example- Encoding

• Let us take message d4d3d2d1 = 1000.

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 7


Decoding

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 8


Objectives of Error control coding

• Error correcting capability in terms of the number of errors that I can rectify.

• Fast encoding of the message, .i.e., an efficient encoding strategy

• Fast and efficient decoding of the received message

• Maximum transfer of information per unit.

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 9


Linear block codes -Terminologies

• A word is a sequence of symbols.

• A code is a set of vectors called codewords.

• Hamming weight of a codeword is equal to the number of non-zero elements in


the codeword.

• Hamming distance between two codewords is the number of places the


codewords differ.

• Block code consists of a set of fixed length codewords. The fixed length of these
codewords is called Block length.

• Code rate of an (n,k) is defined as the ration k/n, and reflects the fraction of the
codeword that consists of information symbols.
AMRITA VISHWA VIDYAPEETHAM 2/3/2025 10
Terminologies

• Minimum distance of a code is the minimum Hamming distance between two


codewords.

• Minimum weight of the code is the smallest weight of any non-zero codeword,
denoted by 𝜔*

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 11


Example

Here M=4, n=5, k=2

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 12


Linear Block Codes

• A linear code has the following properties


• Sum of two codewords belonging to the code is also a codeword belonging
the code.

• All-zero codeword is also a codeword.

• Minimum Hamming distance between two codewords of a linear code is


equal to the minimum weight of any non-zero codeword

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 13


Example - Linearity

• The code C={0000, 1010, 0101, 1111} is a linear block code of length n=4.
Codeword1 Codeword2 Sum
0000 0000 0000
0000 1010 1010
0000 0101 0101
0000 1111 1111
1010 0101 1111
1010 1010 0000
1010 1111 0101
0101 0101 0000
0101 1111 1010
AMRITA VISHWA VIDYAPEETHAM 2/3/2025 14
Hamming distance

Codeword1 Codeword2 distance


0000 1010 2
0000 0101 2
0000 1111 4
1010 0101 4
1010 1111 2
0101 1111 2

Minimum distance =2

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 15


Generator matrix

• The generator matrix converts (encodes) a vector of length k to a vector of length


n.
• Let the input vector represented by ‘I’.
• The coded symbols will be given by,
𝑐=𝑖𝐺
𝑐𝑚×𝑛 = 𝑖𝑚×𝑘 𝐺𝑘×𝑛
Where c is the codeword and G is generator matrix.

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 16


Example

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 17


Exercise

Determine the set of code words for the (7, 4) code with the generator matrix

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 18


Message or uncoded Codewords

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 Systematic 19

Codewords
Parity Check matrix

• Codewords are obtained by simply multiplying the input vector by generator


matrix. Similarly, it is possible to detect a valid codeword using a matrix called
Parity check matrix.

• Parity check matrix H of a linear code C the matrix whose columns form a base of
the subspace orthogonal to C, which is denoted C⊥. The subspace C⊥ is defined as
the set of all vectors of C (i.e., to all codewords).

• For a parity check matrix,


𝑐𝐻 𝑇 = 0

The size of the parity check matrix is (n-k) x n.

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 20


Contd…

• A parity check matrix provides a simple method of detection whether an error has
occurred or not.

• If the multiplication of the received codeword with the transpose of H yields a


non-zero vector, it implies that an error has occurred.

• This methodology, however will fail if the errors in the transmitted codeword
exceeds the number of error for which the coding scheme is designed.
• If G of an (n, k) linear code is expressed in systematic form, the parity-check
matrix H will be of the form:

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 21


Contd…

• Thus H may be presented as,

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 22


Example

• Determine the parity-check matrix of the (7, 4) code with the generator matrix

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 23


Solution

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 24


Error Syndrome

• consider an (n, k) linear code generated by the generator matrix G and


having parity-check matrix H.
• Let us consider that c is a transmitted (n, k) code word over a channel
and r is the corresponding received code word at the receiver end of the
channel.
• If the channel is noisy then the received code word r may be different
form the transmitted code word c.
r=c+e
• The receiver is unaware of either c or e. Hence, after receiving r, the decoder
must first determine whether there is any transmission error within r.

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 25


To remember

• A generator matrix for C is a check matrix for dual code C⊥

• The code C contains nonzero codeword of Hamming weight w or less if and only if a linearly
dependent set of w columns of H exists.

• A systematic encoder for a block code is one that maps each data-word into a codeword with
a k data symbols unmodified in the first k symbols of the codeword. The remaining symbols
are called as check symbols.

• The minimum distance of any linear (n,k) block code satisfies, 𝑑𝑚𝑖𝑛 ≤ 1 + 𝑛 − 𝑘

• Maximum number of errors that can be detected (with guarantee) is 𝑑𝑚𝑖𝑛 − 1

𝑑𝑚𝑖𝑛 −1
• Maximum number of errors that can be corrected (with guarantee) is
2

• For a valid Hamming code,


AMRITA VISHWA VIDYAPEETHAM 2/3/2025 26
Example

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 27


Solution

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 28


Solution(Contd)

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 29


Solution(Contd)

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 30


Solution(Contd)

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 31


Solution(Contd)

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 32


Exercise

Determine the parity-check matrix H for the (5, 3) code. Show that G · HT = 0

AMRITA VISHWA VIDYAPEETHAM 2/3/2025 33


AMRITA VISHWA VIDYAPEETHAM 2/3/2025 34

You might also like