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

Picture
Topics from the Cambridge IGCSE (9-1) Computer Science 0984 syllabus 2025 - 2027
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.
  • LEARN
  • TERMINOLOGY
  • QUESTIONS
  • FLASHCARDS
  • WORKBOOK
<
>
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,
signal attenuation​, electromagnetic interference or cross talk 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

SECTION 1 | PARITY CHECK

The parity bit is calculated based on the number of 1s in the data. There are two types of parity check: even parity and odd parity.

With even parity, the parity bit is set so that the total number of 1s in the data, including the parity bit, is even.
Example:
  • Data = 1010110
  • Number of 1s = 4
  • Since 4 is already even, the parity bit is 0.

If the data were 1010010, which has three 1s, the parity bit would be set to 1 to make the total number of 1s equal to four.

With odd parity, the parity bit is set so that the total number of 1s in the data, including the parity bit, is odd.
Example:
  • Data = 1010110
  • Number of 1s = 4
  • Since 4 is even, the parity bit is set to 1 to make the total number of 1s odd.

When the data is received, the receiving device recalculates the parity using the same method. If the parity does not match the expected result, an error is detected.
​
Parity checks can detect single bit errors but cannot detect all types of errors. For example, if two bits change during transmission, the parity may still appear correct and the error will not be detected.
Quick Check: Parity Check

A block of data uses even parity. The binary data sent is:

1010110

Which parity bit should be added before transmission?

A. 0
B. 1
C. No parity bit is needed
D. Either 0 or 1 would be valid

SECTION 2 | PARITY BYTE & PARITY BLOCK CHECK

A parity byte is an extension of the parity check method and is used to improve error detection when data is transmitted in blocks rather than as a single stream of bits.

Instead of adding one parity bit to an entire block of data, a parity byte adds a parity bit to each byte of data. A byte is a group of 8 bits, so each byte has its own parity bit calculated separately.

For each byte, the number of 1s is counted and a parity bit is added using either even parity or odd parity. This means every byte transmitted includes an extra bit that allows the receiver to check that individual byte for errors.

Example using even parity:
  • Byte of data = 10101100
  • Number of 1s = 4
  • Since the number of 1s is even, the parity bit added to this byte is 0.

If a different byte had an odd number of 1s, the parity bit would be set to 1 so that the total number of 1s in that byte becomes even.

When the data is received, the receiving device checks each byte separately by recalculating its parity. If a byte fails the parity check, an error is detected in that specific byte.

Using a parity byte makes it easier to identify which part of the data contains an error, compared to using a single parity bit for the whole block. However, like all parity methods, parity bytes can still fail to detect errors if an even number of bits change within the same byte during transmission.
​
Parity bytes are often mentioned alongside parity blocks in more advanced error detection methods, but at GCSE level they help reinforce the idea that parity checking can be applied to smaller units of data rather than just a whole message.
Parity Block Cross Reference (Even Parity)
Row parity checks each byte. Column parity checks each bit position. The incorrect bit is found where the failing row and column intersect.
Byte Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Bit 8 Row parity
Byte 1 1 0 1 0 1 1 0 0 0
Byte 2 1 1 0 1 0 0 1 1 0
Byte 3 0 0 0 1 1 1 1 0 1
Byte 4 0 1 0 0 1 0 0 1 0
Column parity 0 0 1 0 0 0 0 0
How to identify the incorrect bit: Byte 2 fails the row parity check and Bit 3 fails the column parity check. The incorrect bit is therefore Bit 3 of Byte 2, shown highlighted above. Parity blocks can detect and locate a single-bit error, but not multiple-bit errors.
Quick Check: Find the Incorrect Bit (Parity Block)

The data uses even parity for both rows and columns (a parity block). One data bit has changed during transmission. Click the bit you think is incorrect, then click Check answer.

Tip: Find the row (byte) that fails even parity, then find the column (bit position) that fails even parity. The incorrect bit is where they cross.

Byte Bit 1Bit 2Bit 3Bit 4 Bit 5Bit 6Bit 7Bit 8 Row parity
Byte 1 0
Byte 2 1
Byte 3 0
Byte 4 1
Column parity 0 0 1 0 1 0 0 0
In a parity block with even parity, a single-bit error causes one row and one column to fail. The incorrect bit is at their intersection.

SECTION 3 | CHECK SUM

A checksum is an error detection method used to check whether data has been changed during transmission. It works by performing a calculation on the data before it is sent and then repeating the same calculation when the data is received.
Before transmission, the data is split into blocks or bytes. These values are added together using a predefined method to produce a single value called the checksum. The checksum is then sent along with the original data.
​
Example process:
  • Data values = 12, 45, 7
  • Checksum calculation = 12 + 45 + 7 = 64
  • The checksum value 64 is sent with the data.

When the data arrives at the receiving device, the same calculation is carried out on the received data values. The newly calculated checksum is then compared with the checksum that was sent.

If the two checksum values match, the data is assumed to have been transmitted correctly. If the values do not match, an error is detected and the data may be requested again.

Checksums are more reliable than parity checks because they can detect a wider range of errors, including some multiple-bit errors. However, they cannot detect all possible errors. Different data values can sometimes produce the same checksum, meaning some errors may go undetected.

Checksums are commonly used in data transmission and storage systems where a simple but effective method of error detection is required.
Checksum Example: Block of Bytes + Checksum
Sender adds the byte values to create a checksum, then sends data plus checksum. The receiver repeats the calculation and compares results.
Byte position Byte (binary) Byte value (denary)
Byte 1 00001100 12
Byte 2 00101101 45
Byte 3 00000111 7
Checksum 01000000 64
How this works: The sender calculates the checksum by adding the denary values of the bytes: 12 + 45 + 7 = 64. The checksum value is sent with the data. The receiver adds the received bytes again and checks if the result still equals 64. If it does not match, an error is detected.
Quick Check: Checksum

A block of data is split into three values: 20, 15 and 5. A simple checksum is created by adding the values together. Which checksum value should be sent with the data?

A. 35
B. 40
C. 20
D. 60

SECTION 4 | CHECK DIGITS

A check digit is a simple error detection method used to detect mistakes when data is entered or transmitted. It works by adding an extra digit to a number, which is calculated from the other digits using a set rule.

The check digit is calculated before the data is used or transmitted and is stored or sent as part of the number. When the number is entered again or received, the same calculation is repeated. If the result does not match the check digit, an error is detected.

Check digits are mainly used to detect data entry errors rather than transmission errors. They are particularly useful for catching common mistakes such as typing the wrong digit or swapping two digits around.

A common example of a check digit is an ISBN used for books. The final digit of an ISBN is a check digit that is calculated from the other digits. When an ISBN is entered into a system, the check digit is checked to make sure the number has been entered correctly.

Another example is bar codes used on products in shops. The bar code includes a check digit that allows the checkout system to detect if the number has been scanned incorrectly.

Check digits can detect many common errors, such as a single incorrect digit or two digits being entered in the wrong order.

​However, they cannot detect all possible errors, and passing a check digit test does not guarantee the data is correct.
Check digits help improve accuracy and reliability when large amounts of numerical data are entered into computer systems.
Quick Check: Check Digit

What is the main purpose of using a check digit?

A. To detect errors when data is entered or scanned
B. To encrypt data before transmission
C. To compress data so it uses less storage space
D. To correct errors automatically without user input

SECTION 5 | 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.
Quick Check: Automatic Repeat Query (ARQ)

Which statement best describes how Automatic Repeat Query (ARQ) works?

A. The sender corrects errors automatically without checking the data.
B. The receiver requests that data is resent if an error is detected or no response is received.
C. The receiver ignores errors and continues processing the data.
D. Data is encrypted again if an error occurs during transmission.

SECTION 6 | ECHO CHECK

An echo check is an error detection method used to check that data has been transmitted correctly by sending the data back to the sender.

When data is sent from the sender to the receiver, the receiver immediately sends an exact copy of the received data back to the sender. This returned data is called the echo.

The sender then compares the echoed data with the original data that was sent. If both sets of data match exactly, the transmission is assumed to be correct. If there are any differences, an error is detected.
Example process:
  • A sender transmits the data 101101.
  • The receiver sends back 101101 as the echo.
  • The sender compares the original data and the echo.
  • If they are the same, the data is accepted.

If the echoed data does not match the original data, the sender knows that an error has occurred and can resend the data.

Echo checking is simple to understand and does not require complex calculations. However, it doubles the amount of data being transmitted because every message must be sent twice.
​
Echo checks can detect many transmission errors but are inefficient and not suitable for large amounts of data or high-speed networks. For this reason, they are mainly used in simple systems or to demonstrate basic error detection concepts.
Quick Check: Echo Check

How does an echo check detect errors in data transmission?

A. The receiver sends the data back to the sender for comparison
B. The sender adds an extra digit to the data before sending it
C. The receiver calculates a checksum and corrects any errors
D. The sender encrypts the data to prevent transmission errors
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.
YOU MAY ALSO BE INTERESTED IN
  • 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?
What is data loss in the context of data transmission errors?
Data loss occurs when some or all of the data being transmitted does not reach the receiving device, resulting in missing bits or packets.
What is data gain in the context of data transmission errors?
Data gain happens when extra bits or data are added during transmission, meaning the received data contains more information than was originally sent.
What is data change in the context of data transmission errors?
Data change occurs when one or more bits are altered during transmission, so the received data is different from the original data.
What is a parity byte check in data transmission and how does it work?
A parity byte check adds a parity bit to each byte of data. Each byte is checked individually to see if it follows the expected odd or even parity, allowing detection of errors within a specific byte.
What is a parity block check in data transmission and how does it work?
A parity block check adds parity bits to both rows and columns of a block of data. If a single bit error occurs, the incorrect bit can be identified where the failing row and column intersect.
How does interference impact data transmission and what are some common forms of interference?
Interference can corrupt data by changing, losing, or adding bits during transmission. Common forms include electrical noise, electromagnetic interference, and signal overlap on transmission media.
How does the use of parity checks help to detect and prevent data transmission errors?
Parity checks help detect errors by identifying when the number of 1s in transmitted data does not match the expected parity. This allows systems to detect errors and request retransmission.
What is the difference between parity byte checks and parity block checks in data transmission?
Parity byte checks detect errors within individual bytes but cannot locate the exact bit, while parity block checks can locate a single incorrect bit by using both row and column parity.
How can the use of error correction techniques help to reduce the impact of data transmission errors?
Error correction techniques allow systems to detect and correct errors automatically or request retransmission, improving reliability and reducing data corruption.
What is the role of redundancy in reducing the impact of data transmission errors during data transmission?
Redundancy involves sending extra bits or data, such as parity bits or checksums, so errors can be detected and corrected, increasing the accuracy of data transmission.
Picture
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.