1 / 17

Error detection and correction codes

Error detection and correction codes. Objective of the lecture. (i)Undersatnd concept of parity (ii)Apply parity method of error detection (iii)Make use of various error detection codes (iv)Use Hamming code.

lei
Download Presentation

Error detection and correction codes

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Error detection and correction codes

  2. Objective of the lecture • (i)Undersatnd concept of parity • (ii)Apply parity method of error detection • (iii)Make use of various error detection codes • (iv)Use Hamming code

  3. When digital signals (group of 0’s and 1’s) are transmitted from one circuit or system to another circuit or system,error may occur during transmission. The change of a 1 to 0 or a 0 to 1 during transmission is known as error. It is necessary to detect and correct the error to obtain a correct message. • A number of codes exist for detection and correction of error in digital transmission. • The concept of parity of a group of bits or digital word is the key for error detection and correction.

  4. Parity method for error detection:-- • Many system use a parity bit as a means for bit error detection. • Any group of bits contain either even or an odd no. of 1’s. • A parity bit is attached to a group of bit to make the total no. of 1’s in a group always even or always odd. • An even parity bit makes the total no.of 1’s even, and an odd parity bit makes the total odd.

  5. The parity bit can be attached to the code at either the beginning or the end,depending on system design. • Notice that the total no.of 1’s including the parity bit,is always even for even parity and always odd for odd parity. • Detecting an error : A parity bit provides for the detection of a single bit error • Let us assume BCD code 0101 • (parity can be used with any no.of bits:we are using four for illustration) • The total code transmitted including parity bit,is • Let us assume the error occurs in the third • bit from the left

  6. Redundancy bit:To calculate the no. of redundancy bits(r) required to include in data bits(m). • 2r >= m+r+1 • For example for m=1 r= 2 • For m=2 r= 3 • For m=3 r = 3 • For m=4 r = 3 • For m=5 r=4

  7. Hamming codes • Q-Determine the single error correcting code for the BCD number 1001 using even parity. • Sol:- Step-1 Find the no of parity bit required :-- • that is = 3 • Step-2 Construct a bit position table,and enter the information bits.Parity bits are determined in the following steps.

  8. Step-3:Determine the parity bit as follows • Bit P1 checks bit position 1,3,5 and 7 and put 0 for an even no. of 1s in this group. • Bit P2 checks bit position 2,3,6,and 7 and put 0 for even no of 1s in this group • Bit P3 checks bit position 4,5,6 and7 and put 1 for even no of 1s in this group

  9. Q-2 Determinethe single error correcting code for the information code 10110 for odd parity. • Sol:---- Step-1 Find the no of parity bit required :-- that is = 5 • Step-2 Construct a bit position table,and enter the information bits.Parity bits are determined in the following steps.

  10. Step-3:Determine the parity bit as follows • Bit P1 checks bit position 1,3,5 ,7and 9 and put 1 for an odd no. of 1s in this group. • Bit P2 checks bit position 2,3,6,and 7 and put 0 for odd no of 1s in this group • Bit P3 checks bit position 4,5,6 and7 and put 1 for odd no of 1s in this group. • Bit P4 checks bit position 8 and 9 and must be 1 for there to be an odd no of 1s in the group

  11. Q-3 Assume that the code word in (0011001) is transmitted and 0010001 is received. Receiver does not know what is transmitted and must look for proper parities to determine if the code is correct. Designate any error that has occurred in transmission if even parity is used.

  12. First parity check • P1 for position1,3,5,7 • Parity check is good-------------------0(LSB) • Second parity check • P2 for position2,3,6,7 • Parity check is good-------------------0 • Third parity check • P3 for position4,5,6,7 • Parity check is bad-------------------1(MSB)

  13. RESULT: The error position code is 100.This says that bit in position 4 is in error.It is a zero and should be 1.The corrected code is 0011001,which agrees with the transmitted code.

  14. The code 101101010 is received.Correct any errors.There are four parity bits,and odd parity is used.

  15. First parity check • P1 for position1,3,5,7 and 9 • Parity check is bad-------------------1(LSB) • Second parity check • P2 for position 2,3,6,7 • Parity check is bad-------------------1 • Third parity check • P3 for position 4,5,6,7 • Parity check is bad-------------------1 • Fourth parity check: • Bit 4 checks positions 8 and 9. • Parity check is good-------------------0(MSB) • RESULT: • The error position code is 0111.This says that the bit in position 7 is in error.The corrected code is therefore 101101110

More Related