EX - NO: 3a Design and Performance Analysis of Error Date: Control Encoder and Decoder Using CRC
EX - NO: 3a Design and Performance Analysis of Error Date: Control Encoder and Decoder Using CRC
NO: 3a
DATE:
AIM
To design a CRC code error control encoder and decoder for detecting the transmission
error.
SOFTWARE TOOL REQUIRED
TYPES OF ERROR
ERROR DETECTION
Error detection is the ability to detect the presence of errors caused by noise or other
impairments during transmission from the transmitter to the receiver.
ERROR CORRECTION
Error correction is the additional ability to reconstruct the original, error free data. Error
correcting codes enable data to be sent through a noisy communication channel without
corruption. To accomplish this, the sender appends redundant information to the message. So that
even if some of the original data is corrupted during transmission, the receiver can still recover
the original message intact.
Various methods
Parity
Repetition
Hamming code
CRC CODES
A cyclic redundancy check (CRC) is an error-detecting code .. Blocks of data entering
these systems get a short check value attached, based on the remainder of a polynomial
division of their contents; on retrieval the calculation is repeated, and corrective action can be
taken against presumed data corruption if the check values do not match.
CRCs are so called because the check (data verification) value is a redundancy (it adds
no information to the message) and the algorithm is based on cyclic codes..The check value has a
fixed length, the function that generates it is occasionally used as a hash function.
CRCs
are
based
on
the
theory
of cyclic error-correcting
codes.
The
uses
of systematic cyclic codes, which encode messages by adding a fixed-length, check value, for the
purpose of error detection in communication networks. Cyclic codes are not only simple to
implement but have the benefit of being particularly well suited for the detection of burst errors,
contiguous sequences of erroneous data symbols in messages. This is important because burst
errors are common transmission errors in many communication channels, including magnetic
and optical storage devices.
Typically an n-bit CRC applied to a data block of arbitrary length will detect any single
error burst not longer than n bits and will detect a fraction 12n of all longer error bursts.
Specification of a CRC code requires definition of a so-called generator polynomial. This
polynomial resembles the divisor in a polynomial long division, which takes the message as
the dividend, and in which the quotient is discarded and the remainder becomes the result, with
the important distinction that the polynomial coefficients are calculated according to the carryless arithmetic of a finite field.
The length of the remainder is always less than the length of the generator polynomial,
which therefore determines how long the result can be.
ADVANTAGES
Mathematical analysis of CRC is very simple, & it is good at detecting common errors
caused by noise in transmission
DISADVANTAGE
CRC is not suitable for protecting against intentional alteration of data, and overflow of
data is possible in CRC.
APPLICATIONS
PROCEDURE
CODING
clc;
clear all;
close all;
msg=[1 1 0 0]
div=[1 0 1 0]
[r c]=size(msg);
x=[];
for i=1:c
if i==1
x=bitxor(msg,div);
x=[x(2) x(3) x(4) x(1)];
else
x=bitxor(x,div);
end
if x(1)==0
x=[x(2) x(3) x(4) x(1)];
end
end
syn=[x(1) x(2) x(3)]
msg1=[1 1 1 1];
received=[msg1 syn]
div=[1 0 1 0];
[r1 c1]=size(msg1);
x1=[];
for j=1:c1
if j==1
x1=bitxor(msg1,div);
x1=[x1(2) x1(3) x1(4) x(j)];
else
x1=bitxor(x1,div);
x1=[x1(2) x1(3) x1(4) x(j)];
end
if x1(1)==0
x=[x1(2) x1(3) x1(4) x1(1)];
end
end
syn1=[x1(1) x1(2) x1(3)]
if syn1==0
disp('Transmission Success')
else
disp('Transmission Error')
end
RESULT:
Thus a CRC code error control encoder and decoder for detecting the transmission error
was designed successfully.