COMPUTER SCIENCE CAFÉ
  • WORKBOOKS
  • BLOCKY GAMES
  • GCSE
    • CAMBRIDGE GCSE
  • IB
  • A LEVEL
  • LEARN TO CODE
  • ROBOTICS ENGINEERING
  • MORE
    • CLASS PROJECTS
    • Classroom Discussions
    • Useful Links
    • SUBSCRIBE
    • ABOUT US
    • CONTACT US
    • PRIVACY POLICY
  • WORKBOOKS
  • BLOCKY GAMES
  • GCSE
    • CAMBRIDGE GCSE
  • IB
  • A LEVEL
  • LEARN TO CODE
  • ROBOTICS ENGINEERING
  • MORE
    • CLASS PROJECTS
    • Classroom Discussions
    • Useful Links
    • SUBSCRIBE
    • ABOUT US
    • CONTACT US
    • PRIVACY POLICY

METHODS OF ERROR DETECTION

Topics from the Cambridge IGCSE (9-1) Computer Science 0984 syllabus 2023 - 2025
OBJECTIVES
​2.2.1 Understand the need to check for errors after data transmission and how these errors can occur
2.2.2 ​Describe the processes involved in each of the following error detection methods for detecting errors in data after transmission: parity check (odd and even), checksum and echo check.
2.2.3 Describe how a check digit is used to detect errors in data entry and identify examples of when a check digit is used, including international standard book numbers (ISBN) and bar codes
2.2.4 Describe how an automatic repeat query (ARQ) can be used to establish that data is received without error.
ALSO IN THIS TOPIC
2.1.1 METHODS OF DATA TRANSMISSION
2.1.2 METHODS OF DATA TRANSMISSION
2.1.3 METHODS OF DATA TRANSMISSION
YOU ARE HERE | 2.2 METHODS OF ERROR DETECTION
2.3 ENCRYPTION
TOPIC 2 KEY TERMINOLOGY
TOPIC 2 ANSWERS
TOPIC 2 TEACHER RESOURCES (CIE)


Picture
WHAT IS ERROR CHECKING
When data is sent from one device or component to another there is always a chance that the data might become corrupt/damaged during transfer. Computer have various methods of checking is the data received is correct, method covered in this section include Parity Checks, Checksums and ARQs.
DATA INTEGRITY
Data integrity refers ensuring the data is correct and as it was intended to be. Various methods are used to help ensure data accuracy at the data input stage and at the data transmission stage and receiving stage.

Data accuracy/integrity during data transmission:
During data transmission it is possible that data can be damaged through circuitry  issues, electromagnetic interference when the signal is travelling via cables. Data could also be deliberately changed or corrupted during data transmission. In some stages data might be completely unreadable in other cases it is possible that binary representations of 1 is changed to a 0 and 0s to 1s. There are three common methods of checking if data has been received with all BIT's still as original. 
  • Parity Check
  • Checksum
  • ARQ
PARITY CHECK
There are two type of parity checks, odd parity and even parity. The even parity check adds another BIT to each string of BITs to either make the number of 1s within that string even.  For example:
Parity bit added   1  1101000
As seen above; at stage of transmission by adding a Parity BIT of 1 in front of the string 1101000 makes the total number of 1s even, when this is checked by the receiver if there was not an even number of 1s with an even parity check the a request to resend the data might be made.

To cross check this a parity byte is added, by doing this we can often work out which BIT has been changes during the transmission period.
Picture
As can be seen in the diagram above there is an odd number of 1s on row five meaning there must be an issue with one of the bits. A parity byte has been sent during transmission (bottom row) and it shows that one of the columns also has an odd number of BITs therefore we know that the issue is with the BIT in the intersection as shown in the diagram.

Where the incorrect BIT can be detected it will be changed and the data accepted, if the incorrect BIT cannot be detected then a ARQ request to resend the data will be made.
CHECKSUM
The checksum method looks at the numeric value of each byte in a block of bytes and sums the total of the predefined block of bytes, that total is then sent with the block of bytes and the check is then made on the receiving end to ensure the sum of the bytes matches the value of the checksum sent.
Block of bytes
0 1 0 1 0 1 1 0 = 86
0 0 1 0 0 1 1 0 = 38
0 0 1 1 0 1 1 0 = 54
0 0 1 0 0 1 0 1 = 37
Checksum
1 1 0 1 0 1 1 1 = 215
Above gives an example of a checksum for a block of four bytes. In practice the block of bytes would be much larger. For the purpose of using the checksum method the computers ignore what the actual byte represents and just looks at its numerical value.
CHECK DIGITS
​A check digit is a digit that is added to a string of numerical digits to help detect errors in data entry. It is calculated based on a mathematical formula applied to the digits in the string. The check digit is then appended to the end of the string, forming a complete code. When the code is entered into a system, the system can then use the check digit to verify that the code was entered correctly. If the code does not match the check digit, it indicates that an error has occurred during data entry.

International Standard Book Numbers (ISBN) are a well-known example of the use of check digits. An ISBN is a unique identifier assigned to books and other publications. The ISBN consists of a string of 10 digits, with the last digit being the check digit. The check digit is calculated based on a formula applied to the first 9 digits of the ISBN. This allows the ISBN to be verified for accuracy, ensuring that the book can be identified correctly.

Bar codes are another example of the use of check digits. Bar codes are used to encode product information, such as price, in a machine-readable format. The bar code consists of a series of bars and spaces of different widths, representing different digits. The last digit in the bar code is the check digit, which is calculated based on a formula applied to the other digits in the bar code. The check digit helps to ensure that the bar code is read accurately by the scanner, so that the correct information is associated with the product.
ARQ - AUTO REPEAT REQUEST
An Auto Repeat Request (ARQ) is a protocol/rule used with data transfer to check for data transmission errors. It uses to factors, an acknowledgement and a timeout. The acknowledgment works by the receiver sending a message to the sender to acknowledge the data has been received without any known errors. The timeout is the time permitted by the sender for the acknowledgement from the receiver, if a timeout occurs then the sender knows the data may not have been received.

Positive and negative acknowledgements, and timeouts are used when a sender transmits a data packet, it waits for an acknowledgement from the receiver. If the receiver successfully receives the data packet, it sends a positive acknowledgement (ACK) back to the sender. The sender can then send the next packet.

If the sender does not receive an acknowledgement within a certain time period, known as a timeout, it assumes that the data packet was lost or corrupted during transmission. The sender then retransmits the data packet. This process of retransmission continues until the sender receives a positive acknowledgement from the receiver.

In the case where the receiver detects an error in the received data packet, it sends a negative acknowledgement (NAK) back to the sender. The sender then retransmits the data packet.

By using positive and negative acknowledgements and timeouts, ARQ is able to ensure reliable data transmission even in the presence of errors or losses in the communication channel. The protocol can also adjust to changes in the communication channel conditions, such as increased packet loss or delay, by adjusting the timeout value and retransmission parameters.
ECHO CHECK
​An echo check is a method used in data transmission to ensure that data is transmitted accurately and completely from one device to another. In an echo check, the sending device sends a small amount of data, known as a test packet, to the receiving device. The receiving device then sends back a copy of the test packet, which is referred to as an echo, to the sending device. The sending device then compares the received echo with the original test packet. If the two are the same, it indicates that the data was transmitted accurately and completely, and the transmission can continue. If the two are different, the sending device will send the test packet again until the echo matches the original test packet. This process is repeated at regular intervals to ensure that data transmission remains error-free.
DATA GAIN, DATA LOSS AND DATA CHANGE
​Data gain, data loss, and data change are three common issues that can occur during data transmission.
  • Data gain: Data gain refers to the situation where the signal power received at the receiver is higher than what was transmitted. This can lead to the receiver interpreting the signal as containing more data than was actually transmitted, resulting in data corruption or loss. Data gain can be caused by factors such as signal amplification, changes in the transmission medium, or the use of different equipment at the transmitter and receiver.
  • Data loss: Data loss occurs when data is not received by the receiver, either because the signal power is too low or because the data has been corrupted during transmission. Data loss can be caused by a variety of factors, including signal attenuation, network congestion, or errors in the transmission equipment.
  • Data change: Data change occurs when the transmitted data is received by the receiver, but it has been altered in some way during transmission. This can be caused by errors in the transmission equipment, interference from other signals in the network, or intentional tampering by a malicious actor. Data change can lead to errors or inconsistencies in the received data, potentially causing significant problems for the recipient.

To mitigate these issues, various techniques are used in data transmission, such as error correction codes, signal amplification, and encryption to protect the data and ensure that it is transmitted accurately and securely.
TERMINOLOGY
  • Error Checking | A process to ensure that data transmitted from one device or component to another is not corrupt or damaged during transfer.
  • Data Integrity | The accuracy and consistency of data over its lifecycle, particularly during input, transmission, and reception.
  • Parity Check | A method used to detect errors in data transmission. It involves adding an extra bit (parity bit) to make the number of 1s in a string of bits either even (even parity) or odd (odd parity).
  • Parity Bit | A parity bit is an extra bit added to a set of data bits to ensure parity, a form of error detection. It is used to make the total count of 1s in the data either even (even parity) or odd (odd parity). When data is transmitted, the parity bit helps in detecting single-bit errors by comparing the parity of the received data with the expected parity.
  • Parity Byte | Similar to a parity bit, a parity byte is an additional byte added to data for error detection. Instead of just adding a single bit, a parity byte extends the concept to eight bits. It is often used in more complex data structures or transmission protocols where a single bit of error checking might not be sufficient.
  • Parity Block | A parity block refers to a block of data (which could be several bits or bytes in size) used specifically for parity-based error checking in larger data transmissions. In systems where data is transmitted in blocks, a parity block is added to these data blocks. This method is more robust and is typically used in storage systems and advanced communication protocols to ensure the integrity of a large set of data, as it can detect and sometimes correct more complex error patterns.
  • Checksum | A technique where the numeric values of bytes in a data block are summed. This total is sent along with the data, allowing the receiver to check if the sum of received bytes matches the checksum value, indicating whether the data is intact.
  • Check Digits | A digit added to a string of numerical digits (like in ISBNs or barcodes) to detect errors in data entry. It is calculated using a specific formula and helps verify the accuracy of the entered data.
  • ARQ (Auto Repeat Request) | A protocol in data transmission that involves the use of acknowledgments and timeouts to ensure error-free data reception. It includes positive and negative acknowledgments from the receiver and retransmissions by the sender in case of detected errors or no acknowledgment.
  • Echo Check | A method where a test packet of data is sent and then echoed back by the receiver for comparison, ensuring accurate and complete data transmission.
  • Data Gain | An increase in signal power at the receiver's end compared to what was transmitted, potentially leading to data corruption.
  • Data Loss | Occurs when data is not received or is received incompletely due to low signal power or data corruption during transmission.
  • Data Change | Happens when transmitted data is altered in some way during transmission, leading to errors or inconsistencies in the received data.
  • Timeout (Auto Repeat Request) | In the context of ARQ, a timeout is a predefined time period set by the sender of a data packet. If the sender does not receive an acknowledgment (ACK) or a negative acknowledgment (NAK) from the receiver within this time period, it assumes that the data packet was lost, corrupted, or not received. As a result, the sender will automatically retransmit the data packet. The concept of a timeout is crucial in ARQ protocols to handle situations where acknowledgments are delayed or lost, ensuring reliable data transmission even in unstable or error-prone communication channels.
Picture
  1. What is data loss in the context of data transmission errors?
  2. What is data gain in the context of data transmission errors?
  3. What is data change in the context of data transmission errors?
  4. What is a parity byte check in data transmission and how does it work?
  5. What is a parity block check in data transmission and how does it work?
  6. How does interference impact data transmission and what are some common forms of interference?
  7. How does the use of parity checks help to detect and prevent data transmission errors?
  8. What is the difference between parity byte checks and parity block checks in data transmission?
  9. How can the use of error correction techniques help to reduce the impact of data transmission errors?
  10. What is the role of redundancy in reducing the impact of data transmission errors during data transmission?
Picture
YOU MAY ALSO BE INTERESTED IN
Picture
​1: What is the main purpose of ARQ protocols in data communication?
A. To ensure that data is transmitted accurately and efficiently
B. To encrypt data for security purposes
C. To compress data for faster transmission
D. To prioritize data based on importance

2: What type of errors can ARQ protocols detect and correct?
A. Only transmission errors
B. Only encoding errors
C. Only decoding errors
D. Both transmission and decoding errors

3: How does an ARQ protocol work in the event of an error in data transmission?
A. The receiver sends a request to the sender to resend the data
B. The sender automatically resends the data without a request from the receiver
C. The data is discarded and not resent
D. The receiver attempts to correct the error using error correction algorithms

4: Which of the following is a common type of ARQ protocol?
A. Stop-and-wait ARQ
B. Go-back-N ARQ
C. Selective repeat ARQ
D. All of the above

5: How do ARQ protocols impact the speed of data transmission?
A. They increase the speed of data transmission
B. They decrease the speed of data transmission
C. They have no impact on the speed of data transmission
D. They increase the speed of data transmission under certain conditions and decrease it under others.
Picture
ALSO IN THIS TOPIC
2.1.1 METHODS OF DATA TRANSMISSION | Data Packets
2.1.2 METHODS OF DATA TRANSMISSION | Serial, Parallel, Simplex, Duplex
2.1.3 METHODS OF DATA TRANSMISSION | The Universal Serial Bus
2.2 METHODS OF ERROR DETECTION | Parity Checks, Check Sum, Check Digit, ARQ
2.3 ENCRYPTION | Symmetric and Asymmetric Encryption
TOPIC 2 KEY TERMINOLOGY
TOPIC 2 ANSWERS
TOPIC 2 TEACHER RESOURCES (CIE)
Picture
SUGGESTIONS
We would love to hear from you
SUBSCRIBE 
To enjoy more benefits
We hope you find this site useful. If you notice any errors or would like to contribute material then please contact us.