SlideShare a Scribd company logo
Error Handling
Codes
© 2020 APARNA LAL
We can minimize effect of noise signals by using various
modulation and demodulation technique but still noise can cause
errors. To further reduce effects of noise especially in data
communication channel coding is used the use of various coding
technique enables us to detect and even correct errors. There are
two error control coding techniques
© 2020 APARNA LAL
1.Forward error correction code (FEC)
Here large amount of controlled redundancy that is extra bit is added to a
message before transmission. This redundancy bits enable the receiver
to make a reliable guess of the transmitted information when an error is
detected the redundancy bits are used to determine which bit as an error
by complementing it. This system of error detection and correction is
called as FEC. In simplex system there is no return path for the receiver
to automatically request retransmission in the event of an error.
Therefore in such system FEC coding system is more useful.
© 2020 APARNA LAL
2. Automatic repeat request scheme ( ARQ)
A small amount of controlled redundancy is added to a
message to allow the receiver to detect if an error
is detected, the user can either ignore the message or
request a source to reset the message. Note that in order
to request for the user retransmission the communication
link must be two way. This method is called as automatic
retransmission request. Duplex system use this method
since it is more reliable than FEC
© 2020 APARNA LAL
Hamming Code:-
In communication one of the most common FEC type error
detection and correction code is hamming code It makes the use
of concept of addition of extra parity bits called error correction
bits in the data information to be communicated. Here first
message called hamming code words is generated consisting of
data information and parity bits. Constructed message is
transmitted. When Hamming code word is received at receiver,
adding parity bit helps not only in identifying an error during
transmission but also in its location in the message. Once
location is known that it can be inverted to generate correct data
information.
© 2020 APARNA LAL
Number of parity bits
If length is ‘ m’ then number of extra parity bits required, ‘ P’ is calculated
by the hamming rule:
m+P+1<=2^P.
Mostly P is determined by trial and error method using above rule.
For example: if we want to transmit 4 bit data information then M=4.
Let P=2 then m+P+1= 2+4+1=7. Since 2^P=2^2=4.
Here P cannot be equal to 2. Therefore hamming rue is not satisfied.
Let P=3 then m+P+1= 3+4+1=8. Since 2^P=2^3=8.
Here P is equal to 3. Therefore hamming rule is satisfied.
Thus hamming code word in this case will have 4 bits data information
and additional 3 parity bits. The length of hamming code word is 4 + 3= 7.
© 2020 APARNA LAL
7 Bit Hamming Code
Note that the parity bits are inserted at each 2n Bit where n=0,1,2,3…… Thus P1 is at 20
=1 and so on
© 2020 APARNA LAL
Computing of Parity Bits
Computing parity involves counting the number of ones in a unit
of data and adding either a 0 or a one (called the parity bit) to
make the count odd( for odd parity) or even ( for even parity); for
example 1001 is a 4- bit data unit containing two one
bits; since that is an even number zero would be added to
maintain even parity. To maintain odd parity one would be added
in original no 1001.
© 2020 APARNA LAL
Construction of Hamming Code
The algorithm to generate, Hamming Code for any
number of bits is given in below :
• Number bits starting from 1: bit 1,2,3,4,5,etc.
• Write the bit numbers in binary: 1, 10, 11, 100, 101,
etc
• Mark all bit positions that are powers of 2 as parity
bits. Positions : 1,2,4,8,16,32,etc .
(have only 1 bit in the binary form of their position i.e
1,10,100,1000)
• Mark all other bit positions as data bits.
© 2020 APARNA LAL
5. Parity bits are computed as follows:
1. Parity Bit 1 covers all bit position which have the least significant bit set.
2. Parity Bit 2 covers all bit position which have the second least significant bit set.
3. Parity Bit 4 covers all bit position which have the third least significant bit set.
4. Parity Bit 8 covers all bit position which have the fourth least significant bit set.
© 2020 APARNA LAL
Parity Bit Bits to be checked
P1 1,3,5,7,9,11,13,15,….
P2 2,3,6,7,10,11,14,15,…
P3 4,5,6,7,12,13,14,15,…
P4 8,9,10,11,12,13,14,15,…..
© 2020 APARNA LAL
Example:1
A bit word 1011 is to be transmitted. Construct the even parity seven-bit hamming Code for this data.
The code word format:
D7
1
D6
0
D5
1
P4 D3
1
P2 P1
Step 2: Decide P1
D7
1
D6
0
D5
1
P4 D3
1
P2 P1
1
© 2020 APARNA LAL
Step 3: Decide P2
D7
1
D6
0
D5
1
P4 D3
1
P2
0
P1
1
Step 4: Decide P4
D7
1
D6
0
D5
1
P4
0
D3
1
P2
0
P1
1
D7
1
D6
0
D5
1
P4
0
D3
1
P2
0
P1
1
Complete Code word
© 2020 APARNA LAL
2. Encode the data bit 0 1 0 1 into a seven bit even parity Hamming Code .
3. Encode the data bit 0 1 0 1 into a seven bit odd parity Hamming Code .
4. A bit word 1011 is to be transmitted. Construct the odd parity seven-bit
hamming Code for this data.
© 2020 APARNA LAL
Cyclic Redundancy Check-
• Cyclic Redundancy Check (CRC) is an FEC error detection method.
• It is based on binary division.
CRC Generator-
• CRC generator is an algebraic polynomial represented as a bit
pattern.
• Bit pattern is obtained from the CRC generator using the following
rule-
The power of each term gives the position of the bit and the
gives the value of the bit.
© 2020 APARNA LAL

More Related Content

PPTX
Satellite error detection and correction presentation
PPTX
Error Detection and Correction presentation
PPT
Error Correction And Hamming Code Ibrar
PPT
Lecture 22
PDF
Error detection & correction codes
PPT
Full error detection and correction
DOCX
Error detecting and correcting codes
PPT
Error Detection And Correction
Satellite error detection and correction presentation
Error Detection and Correction presentation
Error Correction And Hamming Code Ibrar
Lecture 22
Error detection & correction codes
Full error detection and correction
Error detecting and correcting codes
Error Detection And Correction

What's hot (20)

PPTX
Error detection in Data Communication System
PPTX
Hamming code system
PPT
Error detection correction (CRC)
PPTX
Error Detection N Correction
PPTX
Error control coding
PDF
Single-Bit Parity Detection and Correction using Hamming Code 7-Bit Model
PPTX
Coding Scheme/ Information theory/ Error coding scheme
PPTX
SYBSC IT COMPUTER NETWORKS UNIT II Error Detection and Correction
PPT
Error detection and correction
PDF
Error detection and correction
PDF
Burst Error Correction
PPTX
Error detection & Correction of "Hamming Code"
PPSX
Error control
PDF
Data communication & computer networking: Huffman algorithm
PPTX
Error detection and correction, flow and error control and trasmission media
PPTX
Cyclic redundancy check
PPTX
DCN Error Detection & Correction
PDF
Internet technology unit 4
PPTX
11 chapter06 slc_int_float_mov_mvm_fa14
PPTX
Error detection & correctoin
Error detection in Data Communication System
Hamming code system
Error detection correction (CRC)
Error Detection N Correction
Error control coding
Single-Bit Parity Detection and Correction using Hamming Code 7-Bit Model
Coding Scheme/ Information theory/ Error coding scheme
SYBSC IT COMPUTER NETWORKS UNIT II Error Detection and Correction
Error detection and correction
Error detection and correction
Burst Error Correction
Error detection & Correction of "Hamming Code"
Error control
Data communication & computer networking: Huffman algorithm
Error detection and correction, flow and error control and trasmission media
Cyclic redundancy check
DCN Error Detection & Correction
Internet technology unit 4
11 chapter06 slc_int_float_mov_mvm_fa14
Error detection & correctoin
Ad

Similar to error handling codes (20)

PPT
Error detection and correction codes
PPTX
5.Error correction-Hamming Code.pptx
PPTX
Computer_Communication_Networking_L07Data_Link_Error_control.pptx
PPTX
Lecture7.pptxhfjgjgjghcgzgzfzfzvzgxhchchc
PPTX
Presentation for the Project on VLSI and Embedded
DOCX
Calculating the hamming code
DOCX
Calculating the hamming code (tutorial)
PPTX
Digital logic designing presentation
PPTX
PPTX
docker docker docker docker docker docker docker docker docker docker docker ...
PPT
3288940.ppt
PDF
Hamming code checksum
PPT
The Data Link Layer
PPTX
Linear Block Codes
PDF
Error decting and correcting codes
PDF
B041306015
PPTX
Digital Communication GRP1 (1).pptx
PPTX
Wireless digital communication and coding techniques new
PPT
3F4ecc.ppten cje cen cne cdn en c e cnec cen
PPT
3F4ecc.ppt
Error detection and correction codes
5.Error correction-Hamming Code.pptx
Computer_Communication_Networking_L07Data_Link_Error_control.pptx
Lecture7.pptxhfjgjgjghcgzgzfzfzvzgxhchchc
Presentation for the Project on VLSI and Embedded
Calculating the hamming code
Calculating the hamming code (tutorial)
Digital logic designing presentation
docker docker docker docker docker docker docker docker docker docker docker ...
3288940.ppt
Hamming code checksum
The Data Link Layer
Linear Block Codes
Error decting and correcting codes
B041306015
Digital Communication GRP1 (1).pptx
Wireless digital communication and coding techniques new
3F4ecc.ppten cje cen cne cdn en c e cnec cen
3F4ecc.ppt
Ad

Recently uploaded (20)

PPTX
Construction Project Organization Group 2.pptx
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPT
introduction to datamining and warehousing
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
DOCX
573137875-Attendance-Management-System-original
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Safety Seminar civil to be ensured for safe working.
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
Digital Logic Computer Design lecture notes
PPT
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Construction Project Organization Group 2.pptx
OOP with Java - Java Introduction (Basics)
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
introduction to datamining and warehousing
UNIT-1 - COAL BASED THERMAL POWER PLANTS
573137875-Attendance-Management-System-original
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Safety Seminar civil to be ensured for safe working.
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Embodied AI: Ushering in the Next Era of Intelligent Systems
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Digital Logic Computer Design lecture notes
Introduction, IoT Design Methodology, Case Study on IoT System for Weather Mo...
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
CH1 Production IntroductoryConcepts.pptx
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Internet of Things (IOT) - A guide to understanding
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...

error handling codes

  • 2. We can minimize effect of noise signals by using various modulation and demodulation technique but still noise can cause errors. To further reduce effects of noise especially in data communication channel coding is used the use of various coding technique enables us to detect and even correct errors. There are two error control coding techniques © 2020 APARNA LAL
  • 3. 1.Forward error correction code (FEC) Here large amount of controlled redundancy that is extra bit is added to a message before transmission. This redundancy bits enable the receiver to make a reliable guess of the transmitted information when an error is detected the redundancy bits are used to determine which bit as an error by complementing it. This system of error detection and correction is called as FEC. In simplex system there is no return path for the receiver to automatically request retransmission in the event of an error. Therefore in such system FEC coding system is more useful. © 2020 APARNA LAL
  • 4. 2. Automatic repeat request scheme ( ARQ) A small amount of controlled redundancy is added to a message to allow the receiver to detect if an error is detected, the user can either ignore the message or request a source to reset the message. Note that in order to request for the user retransmission the communication link must be two way. This method is called as automatic retransmission request. Duplex system use this method since it is more reliable than FEC © 2020 APARNA LAL
  • 5. Hamming Code:- In communication one of the most common FEC type error detection and correction code is hamming code It makes the use of concept of addition of extra parity bits called error correction bits in the data information to be communicated. Here first message called hamming code words is generated consisting of data information and parity bits. Constructed message is transmitted. When Hamming code word is received at receiver, adding parity bit helps not only in identifying an error during transmission but also in its location in the message. Once location is known that it can be inverted to generate correct data information. © 2020 APARNA LAL
  • 6. Number of parity bits If length is ‘ m’ then number of extra parity bits required, ‘ P’ is calculated by the hamming rule: m+P+1<=2^P. Mostly P is determined by trial and error method using above rule. For example: if we want to transmit 4 bit data information then M=4. Let P=2 then m+P+1= 2+4+1=7. Since 2^P=2^2=4. Here P cannot be equal to 2. Therefore hamming rue is not satisfied. Let P=3 then m+P+1= 3+4+1=8. Since 2^P=2^3=8. Here P is equal to 3. Therefore hamming rule is satisfied. Thus hamming code word in this case will have 4 bits data information and additional 3 parity bits. The length of hamming code word is 4 + 3= 7. © 2020 APARNA LAL
  • 7. 7 Bit Hamming Code Note that the parity bits are inserted at each 2n Bit where n=0,1,2,3…… Thus P1 is at 20 =1 and so on © 2020 APARNA LAL
  • 8. Computing of Parity Bits Computing parity involves counting the number of ones in a unit of data and adding either a 0 or a one (called the parity bit) to make the count odd( for odd parity) or even ( for even parity); for example 1001 is a 4- bit data unit containing two one bits; since that is an even number zero would be added to maintain even parity. To maintain odd parity one would be added in original no 1001. © 2020 APARNA LAL
  • 9. Construction of Hamming Code The algorithm to generate, Hamming Code for any number of bits is given in below : • Number bits starting from 1: bit 1,2,3,4,5,etc. • Write the bit numbers in binary: 1, 10, 11, 100, 101, etc • Mark all bit positions that are powers of 2 as parity bits. Positions : 1,2,4,8,16,32,etc . (have only 1 bit in the binary form of their position i.e 1,10,100,1000) • Mark all other bit positions as data bits. © 2020 APARNA LAL
  • 10. 5. Parity bits are computed as follows: 1. Parity Bit 1 covers all bit position which have the least significant bit set. 2. Parity Bit 2 covers all bit position which have the second least significant bit set. 3. Parity Bit 4 covers all bit position which have the third least significant bit set. 4. Parity Bit 8 covers all bit position which have the fourth least significant bit set. © 2020 APARNA LAL
  • 11. Parity Bit Bits to be checked P1 1,3,5,7,9,11,13,15,…. P2 2,3,6,7,10,11,14,15,… P3 4,5,6,7,12,13,14,15,… P4 8,9,10,11,12,13,14,15,….. © 2020 APARNA LAL
  • 12. Example:1 A bit word 1011 is to be transmitted. Construct the even parity seven-bit hamming Code for this data. The code word format: D7 1 D6 0 D5 1 P4 D3 1 P2 P1 Step 2: Decide P1 D7 1 D6 0 D5 1 P4 D3 1 P2 P1 1 © 2020 APARNA LAL
  • 13. Step 3: Decide P2 D7 1 D6 0 D5 1 P4 D3 1 P2 0 P1 1 Step 4: Decide P4 D7 1 D6 0 D5 1 P4 0 D3 1 P2 0 P1 1 D7 1 D6 0 D5 1 P4 0 D3 1 P2 0 P1 1 Complete Code word © 2020 APARNA LAL
  • 14. 2. Encode the data bit 0 1 0 1 into a seven bit even parity Hamming Code . 3. Encode the data bit 0 1 0 1 into a seven bit odd parity Hamming Code . 4. A bit word 1011 is to be transmitted. Construct the odd parity seven-bit hamming Code for this data. © 2020 APARNA LAL
  • 15. Cyclic Redundancy Check- • Cyclic Redundancy Check (CRC) is an FEC error detection method. • It is based on binary division. CRC Generator- • CRC generator is an algebraic polynomial represented as a bit pattern. • Bit pattern is obtained from the CRC generator using the following rule- The power of each term gives the position of the bit and the gives the value of the bit. © 2020 APARNA LAL