- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Error-Detecting Codes - Cyclic Redundancy Checks (CRCs)
Errors and Error Detection
When bits are transmitted over the computer network, they are subject to get corrupted due to interference and network problems. The corrupted bits leads to spurious data being received by the receiver and are called errors.
Error detection techniques are responsible for checking whether any error has occurred or not in the frame that has been transmitted via network. It does not take into account the number of error bits and the type of error.
For error detection, the sender needs to send some additional bits along with the data bits. The receiver performs necessary checks based upon the additional redundant bits. If it finds that the data is free from errors, it removes the redundant bits before passing the message to the upper layers.
There are three main techniques for detecting errors in data frames: Parity Check, Checksum and Cyclic Redundancy Check (CRC).
Cyclic Redundancy Check (CRC)
Cyclic Redundancy Check (CRC) is a block code invented by W. Wesley Peterson in 1961. It is commonly used to detect accidental changes to data transmitted via telecommunications networks and storage devices.
CRC involves binary division of the data bits being sent by a predetermined divisor agreed upon by the communicating system. The divisor is generated using polynomials. So, CRC is also called polynomial code checksum.
The process is illustrated as follows −
Encoding using CRC
The communicating parties agrees upon the size of message block and the CRC divisor. For example, the block chosen may be CRC (7, 4), where 7 is the total length of the block and 4 is the number of bits in the data segment. The divisor chosen may be 1011.
The sender performs binary division of the data segment by the divisor.
It then appends the remainder called CRC bits to the end of data segment. This makes the resulting data unit exactly divisible by the divisor.
The receiver divides the incoming data unit by the divisor.
If there is no remainder, the data unit is assumed to be correct and is accepted.
Otherwise, it is understood that the data is corrupted and is therefore rejected. The receiver may then send an erroneous acknowledegment back to the sender for retransmission.
- Explain the Cyclic Redundancy Checks (CRCs)
- Error-Detecting Codes - Parity
- Error-Detecting Codes - Checksums
- What are Error-Detecting Codes?
- Python Program to Cyclic Redundancy Check
- Cyclic Redundancy Check (CRC) in Arduino
- Error Correcting Codes - Hamming codes
- Error Correcting Codes - Reed-Solomon codes
- Error Correcting Codes - Low-Density Parity Check Codes
- Error correcting codes in Computer Networks
- Error Correcting Codes - Binary Convolutional Code
- Explain the Hamming Codes in Error Correction
- How to write custom Python Exceptions with Error Codes and Error Messages?
- Error codes returned in the PositionError object HTML5 Geolocation
- Error codes, cause and example of deadlock in DB2