Error Detection & Correction Codes: Contents

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 13

ERROR DETECTION &

CORRECTION CODES
C O N T E NTS :
 Introduction
 Parity bit
 Hamming code

1
ERROR DETECTION AND CORRECTION CODES
 When the digital information in the binary form is
transmitted from one circuit or system to another
circuit or system an error may occur.
 This means the signal corresponding to 0 may
change to 1 or vice-versa due to presence of noise
 To maintain data integrity between transmitter
and receiver, extra bit or more than one bit are
added in the data.
 These extra bits allow the detection and sometimes
the correction of error in the data.

2
Contd…
• The data along with the extra bit /bits form
the code
• Codes which allow only error detection are called
error detecting codes and codes which allow
error detection and correction are called error
detecting and correcting codes
Parity bit
• A parity bit is used for the purpose of
detecting errors during transmission of binary
information.
• A parity bit is an extra bit included with a binary
message to make the number of 1s either odd or 3
even. KONGUNADU COLLEGE OFENGINEERING &TECHNO
LOGY
Contd….
• The message including the parity bit is transmitted and
then checked at the receiving end for errors.
• An error is detected if the checked parity does not
correspond with the one transmitted.
• The circuit that generates the parity bit in the transmitter
is called a parity generator and the circuit that checks the
parity in the receiver is called a parity checker.
• In even parity the added parity bit will make the total
number of 1s an even amount. In odd parity the added
parity bit will make the total number of 1s an odd
amount.
• As a general rule in the digital system where the
transmission system is relatively short, it may be assumed
that probability of a single-bit error is small and that of a
double-bit error and higher order errors is extremely
small.
4
Contd…
 The parity error detection system just described detects any odd
number of errors.
 However, it cannot detect an even number of error because such
errors will not destroy the parity of the transmitted group of bits
Block parity:
 When several binary words are transmitted or received in
succession, the resulting collection of bits can be regarded as a
block of data, having rows and columns.
 Example: four eight bit words in succession form an 4x8 block.
 Parity bits can then be assigned to both rows and columns.
 This scheme is known as block parity
 It makes it possible to correct any single error occurring in a
data word and to detect any two errors in a word.

5
KONGUNADU COLLEGE OFENGINEERING&TECHNO
LOGY
HAMMING CODE
 Hamming code not only provides the detection of a bit
error, but also identifies which bit is in error so that it can
be corrected.
 Thus hamming code is called error detecting and
correcting code.
 The code uses a number of parity bits(dependent on the
number of information bits) located at certain position in a
group.
 Number of parity bits:
 The number of parity bits depends on the number of
information bits
 If the number of bits is designated as x, then the number of
parity bits P is determined using the relation
2≥𝑝 𝑥+ 𝑃+ 1
CONTD…
Location of the parity bits in a code:
• The parity bits are located in the positions that are
numbered corresponding to ascending powers of
two(1,2,4,8,….).
• Therefore, for 7-bit code, locations for parity bits
and
information bits are as follows:
D4, D3,D2,P3, D1,P2,P1
Assigning values to parity bit:
• In hamming code , each parity bit provides a check on
certain other bits in the total code, therefore we must
know the value of these others in order to assign the
parity bit value.
Bit Location Table:
Bit Designation D4 D3 D2 P3 D1 P2 P1
Bit Location 7 6 5 4 3 2 1
Binary Location
111 110 101 100 011 010 001
Number
Information Bits
Parity Bits
CONTD…
Assignment of P1:
 This parity bit checks all bit locations, including itself, that
have 1s in the same location in the binary location
numbers.
Assignment of P2:
 This parity bit checks all bit locations, including itself, that
have 1s in the middle bit.
Assignment of P3:
 This parity bit checks all bit locations, including itself, that
have 1s in the left-most bit.
SINGLE ERROR CORRECTION AND
DOUBLE ERROR DETECTION
 With the light modification, it is possible to construct
hamming code for single error correction and double
error detection.
 A one more parity bit is added in the hamming code to
ensure hamming code contains an even number of
ones.
 The resulting hamming code enables single error
correction and double error detection.
 When overall parity bit is correct, there is no single
error during the transmission of the code.
 If overall parity bit is incorrect, then there is single
error and the bit position of the error can be indicated
by binary number formed after checking the parity
bits.
CONTD….
 Hence, single error correction can be
achieved.
 If overall parity bit is correct and binary
number formed after checking the parity bits
is other than 0-0-0, there are two errors.
 In this case, double error detection is
achieved.
 However, no correction is possible.
Conclusion:
The various types of error detecting and correcting methods are discussed
in brief manner.
References:
• Mandal, “Digital Electronics Principles & Application, McGraw Hill
Edu, 2013.
• William Keitz, Digital Electronics-A Practical Approach with VHDL,
Pearson, 2013.
• Thomas L.Floyd, ‘Digital Fundamentals’, 11th edition,
Education, 2015.
Pearson
• Charles H.Roth, Jr, Lizy Lizy Kurian John, ‘Digital System Design
using VHDL, Cengage,2013.
• D.P.Kothari,J.S.Dhillon, ‘Digital circuits and
Design’,Pearson
Education, 2016.
• A.P.Godse., Dr.D.A.Godse, ‘Digital Logic Circuits’ ,
Technical KONGUNADU COLLEGE OFENGINEERING &TECHNO 13
• Other Web Sources LOGY
Publications Third Edition 2016

You might also like