0% found this document useful (0 votes)
5 views20 pages

#4 Error Detection and Correction Codes

The document discusses error detection and correction codes, focusing on techniques such as parity bits and repetition codes to ensure data integrity during transmission. It highlights the limitations of single parity checks and introduces Hamming codes for more robust error detection and correction. Various examples illustrate how these codes can identify and correct errors in transmitted data.
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)
5 views20 pages

#4 Error Detection and Correction Codes

The document discusses error detection and correction codes, focusing on techniques such as parity bits and repetition codes to ensure data integrity during transmission. It highlights the limitations of single parity checks and introduces Hamming codes for more robust error detection and correction. Various examples illustrate how these codes can identify and correct errors in transmitted data.
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/ 20

#4 Error Detection and Correction Codes

AU Jibia
Introduction
 The movement of binary data and codes from one location to another is the most
frequent operation performed in digital systems.
 Examples:
 The transmission of digitized voice over a microwave link
 The storage of data in and retrieval of data from external memory devices such as
magnetic and optical disk
 The transmission of digital data from a computer to a remote computer over
telephone lines. This is one of the major ways of sending and receiving information
on the Internet.

2 Dept of Mechatronics Engineering, Bayero University Kano


Introduction
 Noise causes error along the line.

3 Dept of Mechatronics Engineering, Bayero University Kano


Introduction
 Error detection and correction involves the addition of extra bits, called
check bits, to the information-carrying bit stream to give the resulting bit
sequence a unique characteristic that helps in detection and localization of
errors.
 The additional bits are redundant and introduce inefficiency in transmission.

4 Dept of Mechatronics Engineering, Bayero University Kano


Parity Bit Coding Technique
 A parity bit is an extra bit included with a message to make the total number of 1s
either odd or even.

5
Parity Generator
 A parity generator is a combination logic system to generate the parity bit at the
transmitting side.

6
Parity Generator

7 Dept of Mechatronics Engineering, Bayero University Kano


Parity Checker
 The message bits with the parity bit are transmitted to their destination, where
they are applied to a parity checker circuit.
 The circuit that checks the parity at the receiver side is called the parity checker.
 The parity checker circuit produces a check bit and is very similar to the parity
generator circuit.
 If the check bit is 1, then it is assumed that the received data is incorrect. The check
bit will be 0 if the received data is correct.

8 Dept of Mechatronics Engineering, Bayero University Kano


Parity Checker

9 Dept of Mechatronics Engineering, Bayero University Kano


Parity Checker

10 Dept of Mechatronics Engineering, Bayero University Kano


Disadvantages of a single parity
 An even combination of errors is undetectable since an even number of errors will
not change the parity of the bits.
 It cannot detect the location of error.
 It has no error correction ability.

11 Dept of Mechatronics Engineering, Bayero University Kano


Repetition Code
 The repetition code makes use of repetitive transmission of each data bit in the bit
stream.
 In the case of threefold repetition, for example, ‘1’ and ‘0’ would be transmitted as
‘111’ and ‘000’ respectively.
 If, in the received data bit stream, bits are examined in groups of three bits, the
occurrence of an error can be detected.
 In the case of single-bit errors, ‘1’ would be received as 011 or 101 or 110 instead
of 111, and a ‘0’ would be received as 100 or 010 or 001 instead of 000.

12 Dept of Mechatronics Engineering, Bayero University Kano


Repetition Code
 Example
 A five-bit binary word is transmitted using a three-fold repetition
code. The following data was received at the receiving end:
111101110001000
 What is the original word if the errors encountered were
i. Single-bit errors.
ii. Double-bit errors.

13 Dept of Mechatronics Engineering, Bayero University Kano


Repetition Code
 Answer:
111 101 110 001 000
Note that there is no error in the first and the last bit which are 1 and 0
respectively. The errors are in the second, third and fourth bits.
 For single-bit errors (in which case only one of the three bits has changed)

Thus the original word is 11100

14 Dept of Mechatronics Engineering, Bayero University Kano


Repetition Code
 For double bit errors (in which case two of the three bits has changed)

Thus the original word is 10010

15 Dept of Mechatronics Engineering, Bayero University Kano


Hamming Code
 The generalized form of code is

where P and D respectively represent parity and data bits.


 We can see from the generalized form of the code that all bit positions that are
powers of 2 (positions 1, 2, 4, 8, 16, …) are used as parity bits.
 All other bit positions (positions 3, 5, 6, 7, 9, 10, 11, …) are used to encode data.
 Each parity bit is allotted a group of bits from the data bits in the code word, and
the value of the parity bit (0 or 1) is used to give it certain parity.

16 Dept of Mechatronics Engineering, Bayero University Kano


Hamming Code
 Groups are formed by first checking N− 1 bits and then alternately skipping and
checking N bits following the parity bit.
 Here, N is the position of the parity bit; 1 for P1, 2 for P2, 4 for P3, 8 for P4 and so
on.

17 Dept of Mechatronics Engineering, Bayero University Kano


Hamming Code
 Example:
 The following 9-bit data is to be transmitted
101110110
1. Derive the Hamming code for error detection and correction.
2. Assuming the last bit of the data is altered from 0 to 1 during transmission, show how
the derived code in (1) can be used to detect the error position.

18 Dept of Mechatronics Engineering, Bayero University Kano


Hamming Code

19 Dept of Mechatronics Engineering, Bayero University Kano


Hamming Code

20 Dept of Mechatronics Engineering, Bayero University Kano

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy