SlideShare a Scribd company logo
1 of 15
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

What's hot

Error Detection N Correction
Error Detection N CorrectionError Detection N Correction
Error Detection N Correction
Ankan Adhikari
 
Error detection and correction
Error detection and correctionError detection and correction
Error detection and correction
Sisir Ghosh
 
Burst Error Correction
Burst Error CorrectionBurst Error Correction
Burst Error Correction
Aditi Singhal
 
Error detection and correction, flow and error control and trasmission media
Error detection and correction, flow and error control and  trasmission mediaError detection and correction, flow and error control and  trasmission media
Error detection and correction, flow and error control and trasmission media
PANKAJ333
 
11 chapter06 slc_int_float_mov_mvm_fa14
11 chapter06 slc_int_float_mov_mvm_fa1411 chapter06 slc_int_float_mov_mvm_fa14
11 chapter06 slc_int_float_mov_mvm_fa14
John Todora
 

What's hot (20)

Error detection in Data Communication System
Error detection in Data Communication SystemError detection in Data Communication System
Error detection in Data Communication System
 
Hamming code system
Hamming code systemHamming code system
Hamming code system
 
Error detection correction (CRC)
Error detection correction  (CRC)Error detection correction  (CRC)
Error detection correction (CRC)
 
Error Detection N Correction
Error Detection N CorrectionError Detection N Correction
Error Detection N Correction
 
Error control coding
Error control codingError control coding
Error control coding
 
Single-Bit Parity Detection and Correction using Hamming Code 7-Bit Model
Single-Bit Parity Detection and Correction using Hamming Code 7-Bit ModelSingle-Bit Parity Detection and Correction using Hamming Code 7-Bit Model
Single-Bit Parity Detection and Correction using Hamming Code 7-Bit Model
 
Coding Scheme/ Information theory/ Error coding scheme
Coding Scheme/ Information theory/ Error coding schemeCoding Scheme/ Information theory/ Error coding scheme
Coding Scheme/ Information theory/ Error coding scheme
 
SYBSC IT COMPUTER NETWORKS UNIT II Error Detection and Correction
SYBSC IT COMPUTER NETWORKS UNIT II Error Detection and CorrectionSYBSC IT COMPUTER NETWORKS UNIT II Error Detection and Correction
SYBSC IT COMPUTER NETWORKS UNIT II Error Detection and Correction
 
Error detection and correction
Error detection and correctionError detection and correction
Error detection and correction
 
Error detection and correction
Error detection and correctionError detection and correction
Error detection and correction
 
Burst Error Correction
Burst Error CorrectionBurst Error Correction
Burst Error Correction
 
Error detection & Correction of "Hamming Code"
Error detection & Correction of "Hamming Code"Error detection & Correction of "Hamming Code"
Error detection & Correction of "Hamming Code"
 
Error control
Error controlError control
Error control
 
Data communication & computer networking: Huffman algorithm
Data communication & computer networking:  Huffman algorithmData communication & computer networking:  Huffman algorithm
Data communication & computer networking: Huffman algorithm
 
Error detection and correction, flow and error control and trasmission media
Error detection and correction, flow and error control and  trasmission mediaError detection and correction, flow and error control and  trasmission media
Error detection and correction, flow and error control and trasmission media
 
Cyclic redundancy check
Cyclic redundancy checkCyclic redundancy check
Cyclic redundancy check
 
DCN Error Detection & Correction
DCN Error Detection & CorrectionDCN Error Detection & Correction
DCN Error Detection & Correction
 
Internet technology unit 4
Internet technology unit 4Internet technology unit 4
Internet technology unit 4
 
11 chapter06 slc_int_float_mov_mvm_fa14
11 chapter06 slc_int_float_mov_mvm_fa1411 chapter06 slc_int_float_mov_mvm_fa14
11 chapter06 slc_int_float_mov_mvm_fa14
 
Error detection & correctoin
Error detection    & correctoinError detection    & correctoin
Error detection & correctoin
 

Similar to error handling codes

Write the code in C, here is the template providedThe input used .pdf
Write the code in C, here is the template providedThe input used .pdfWrite the code in C, here is the template providedThe input used .pdf
Write the code in C, here is the template providedThe input used .pdf
sales223546
 
9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer
ZahouAmel1
 
Paper id 2520141232
Paper id 2520141232Paper id 2520141232
Paper id 2520141232
IJRAT
 

Similar to error handling codes (20)

Codes
CodesCodes
Codes
 
Digital Communication GRP1 (1).pptx
Digital Communication GRP1 (1).pptxDigital Communication GRP1 (1).pptx
Digital Communication GRP1 (1).pptx
 
Error detection and correction codes
Error detection and correction codesError detection and correction codes
Error detection and correction codes
 
Digital logic designing presentation
Digital logic designing presentationDigital logic designing presentation
Digital logic designing presentation
 
Design and implementation of single bit error correction linear block code sy...
Design and implementation of single bit error correction linear block code sy...Design and implementation of single bit error correction linear block code sy...
Design and implementation of single bit error correction linear block code sy...
 
Error dectation and correction
Error dectation and correctionError dectation and correction
Error dectation and correction
 
IRJET- FPGA Implementation of Orthogonal Codes for Efficient Digital Communic...
IRJET- FPGA Implementation of Orthogonal Codes for Efficient Digital Communic...IRJET- FPGA Implementation of Orthogonal Codes for Efficient Digital Communic...
IRJET- FPGA Implementation of Orthogonal Codes for Efficient Digital Communic...
 
crc_checksum.pdf
crc_checksum.pdfcrc_checksum.pdf
crc_checksum.pdf
 
Error detection and correction codes r006
Error detection and correction codes   r006Error detection and correction codes   r006
Error detection and correction codes r006
 
07 Data Link LayerError Control.pdf
07 Data Link LayerError Control.pdf07 Data Link LayerError Control.pdf
07 Data Link LayerError Control.pdf
 
Write the code in C, here is the template providedThe input used .pdf
Write the code in C, here is the template providedThe input used .pdfWrite the code in C, here is the template providedThe input used .pdf
Write the code in C, here is the template providedThe input used .pdf
 
9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer9-Lect_9-2.pptx DataLink Layer DataLink Layer
9-Lect_9-2.pptx DataLink Layer DataLink Layer
 
IRJET- Resolve Error with Detection & Correction Techniques in Computer Networks
IRJET- Resolve Error with Detection & Correction Techniques in Computer NetworksIRJET- Resolve Error with Detection & Correction Techniques in Computer Networks
IRJET- Resolve Error with Detection & Correction Techniques in Computer Networks
 
chapter-3-data-link-layer.ppt
chapter-3-data-link-layer.pptchapter-3-data-link-layer.ppt
chapter-3-data-link-layer.ppt
 
Unit 2 [autosaved]
Unit 2 [autosaved]Unit 2 [autosaved]
Unit 2 [autosaved]
 
Error correction and detection th
Error correction and detection thError correction and detection th
Error correction and detection th
 
Presentation for the Project on VLSI and Embedded
Presentation for the Project on VLSI and EmbeddedPresentation for the Project on VLSI and Embedded
Presentation for the Project on VLSI and Embedded
 
Programming with 8085.pptx
Programming with 8085.pptxProgramming with 8085.pptx
Programming with 8085.pptx
 
Paper id 2520141232
Paper id 2520141232Paper id 2520141232
Paper id 2520141232
 
Paper id 312201514
Paper id 312201514Paper id 312201514
Paper id 312201514
 

Recently uploaded

Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
dharasingh5698
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 

Recently uploaded (20)

Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 

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