Methods of Error Detection | O Level Computer Science 2210 & IGCSE Computer Science 0478 | Detailed Free Notes To Score An A Star (A*)
- Data transferring from one device to another may not be perfect.
- Here, interference can occur
- Data loss
- Data gained
- Data changed
- Password not transmitted correctly, it won’t work
- Address not transmitted correctly, things won’t be received
- Accuracy of data is extremely important
- Types of error detection
- Parity Check
- Here, an odd or even methods is used
- Each byte of data has 7 bits and 1 extra bit called the parity bit
- It is the left most bit of the data.
- Can be the first or last bit
- Before transmission starts, it is set to either odd or even parity
- Then, we total how many 1s are in the data. If they do not meet that odd or even number, we add an extra one for this purpose
- Once the data has been transmitted, the bits are recounted.
- If the count is the same, then we know there has been no error in transmission
- If the count is not the same, we know there has been a problem in the transmission.
- Checksum
- A calculated value is used to check for errors
- Usually, the value is calculated from the transmitted data.
- Modulus 11, for example, can be used.
- Checksum is added to the data before transmission
- After transmission, the same checksum is calculate again.
- If both checksums are the same, it means data bas been transmitted correctly
- If the values do not match, then an error has occurred
- Echo Check
- Simple comparison of data
- The entire data is sent back from the receiving to the sending device
- Both devices check if the data is the same
- If yes, then data transmission was correct
- Otherwise, the data is sent again.
- Parity Check
- Automatic Repeat Request (ARQ)
- Once the error has been detected, retransmission of the data is reqired
- Sending device asks receiving device if the data bas been received correctly
- If not, the receiving device will often use ARQ
- Here, 2 main wys
- Positive or negative acknowledgement/ time out
- In positive acknowledgement
- Sending device sends the first packet of data
- Receiving device checks it for errors
- Once data is error free, positive acknowledgement sent,
- Here, the next packet of data is then transmitted
- If no acknowledgement received for the set time limit, a timeout occurs and the data is resent
- If the limit on the number of times is reached, data will no longer be sent again.
- In positive acknowledgement
- Negative acknowledgement uses the opposite method of telling when the data was not correct.
- Positive or negative acknowledgement/ time out
- Check Digit
- Errors can occur
- They can occur due to interference
- Errors can occur when data entry is performed
- Manual entry error
- Scanning error
- Check digit can be a method to check for errors with data entry
- Previously calculated from the data entered
- For example a barcode or ISBN number
- When data is entered, the check digit is recalculated from the data
- Stored check digit must match the new calculated check digit
- If no match, then data is incorrect.
- Checksum and check digit are different things
- Encryption
- Data before encryption is called plain data
- Once the encryption algorithm has been used on the data, it makes it meaningless and difficult to understand
- It is called cipher text once encrypted
- The encryption algorithm is called encryption key
- The key is then used by the receiving device to decrypt the data.
- Hacker will not be stopped by encryption from stealing the data.
- However, the data is no longer meaningful for the hacker even if he steals it
- Two types
- Symmetric
- Plain text is converted to cipher text using encryption key
- Both the cipher text and the encryption key are sent separately to the receiving device
- Same key is then used for decryption of the cipher text to the plain text
- Simplest method of encryption
- Not very safe
- Asymmetric
- Plain text converted to cipher text using public key
- Then, cipher text sent to receiving device
- Cipher text can only be decrypted using a private key
- Person sending the data has pubic key
- The person receiving the data has the private key
- They both act as pairs
- Private key is not sharded with anyone.
