0% found this document useful (0 votes)
113 views

Error Checking Method

There are three main types of error checking methods: parity checks, checksums, and echo checks. Parity checks use even or odd parity bits to detect errors. Checksums calculate a value based on the data block and sender/receiver must match this value to ensure no errors. Echo checks resend the data back to sender to compare the original and echoed versions. Additional methods discussed include check digits used for codes/barcodes and Automatic Repeat Requests used in data transmission.

Uploaded by

Annihilator
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
113 views

Error Checking Method

There are three main types of error checking methods: parity checks, checksums, and echo checks. Parity checks use even or odd parity bits to detect errors. Checksums calculate a value based on the data block and sender/receiver must match this value to ensure no errors. Echo checks resend the data back to sender to compare the original and echoed versions. Additional methods discussed include check digits used for codes/barcodes and Automatic Repeat Requests used in data transmission.

Uploaded by

Annihilator
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Three Types

of
Error Checking Methods

Sayar Wai Phyo Aung

B.C.Sc, ME (ICT), PhD (Thesis)

Cyber Security Expert & CS/ICT Instructor


There are a number of ways data can be checked for errors following transmission:
 parity checks

 checksum

 echo check.
Parity checks Method

Parity checking is one method used to check whether data has been changed or
corrupted following data transmission.

 The parity can be either called EVEN (that is, an even number of 1-bits in the byte) or
ODD (that is, an odd number of 1-bits in the byte).

 One of the bits in the byte (usually the most significant bit or left-most bit) is reserved
for a parity bit.
In this example, if the byte is using even parity, then the parity bit needs to be set to 0,
since there is already an even number of 1-bits in the byte (four 1-bits).

 In this example, if the byte is using odd parity, then the parity bit needs to be set to 1,
since we need to have an odd number of 1-bits in the byte.
Error Detection with Parity checks
 If a byte has been transmitted from ‘A’ to ‘B’, and if even parity is used, an error would be flagged if
the byte now had an odd number of 1-bits at the receiver’s end.

 In this case, the byte received has three 1-bits, which means it now has odd parity; while the sender’s byte was using even
parity (four 1-bits).
 This means an error has occurred during the transmission of the byte. The error is detected by the recipient’s computer re-
calculating the parity of the byte sent.
 If even parity had been agreed between sender and receiver, then a change in parity in the received byte indicates that a
transmission error has occurred.
Drawbacks of parity checks
 If two bits are transposed (change places) then the computer could be fooled into thinking
the data is correct and not corrupted
 If two random bits change state then the system could also be fooled
Checksum Methods

A checksum is a method used to check if data has been changed or corrupted following data transmission.
Data is sent in blocks, and an additional value, called the checksum, is sent at the end of the block of data.

The checksum process is as follows:

1) when a block of data is about to be transmitted, the checksum is calculated from the block of data

2) the calculation is done using an agreed algorithm (this algorithm has been agreed by sender and
receiver)

3) the checksum is then transmitted with the block of data at the receiving end, the checksum is
recalculated by the computer using the block of data (the agreed algorithm is used to find the
checksum)

4) the re-calculated checksum is then compared to the checksum sent with the data block

5) if the two checksums are the same, then no transmission errors have occurred; otherwise a request is
made to re-send the block of data.
Echo Check Method
 Echo check, when data is sent to another device, this data is sent back again to the sender.

 The sender’s computer compares the two sets of data to check if any errors occurred during the
transmission process

1) a copy of the data is sent back to the sender

2) the returned data is compared with the original data by the sender’s computer

3) if there are no differences, then the data was sent without error

4) if the two sets of data are different, then an error occurred at some stage during the data
transmission
Drawback of echo checks
 If the two sets of data are different you will have no way of knowing
whether the error occurred when originally sent, or when it was sent back

 Echo checks require a lot of extra data to be transmitted


Check Digit
 A check digit is the final digit included in a code; it is calculated from all the other digits in the code.
 Check digits are used for barcodes on products, such as International Standard Book Numbers (ISBN)
and Vehicle Identification Numbers (VIN).

There are a number of different methods used to generate a check digit.

 ISBN 13
 Modulo-11
Benefits
 Good for spotting human errors such as:

 Incorrect digit entered

 Transposition error (two numbers change order)

 Omitted digit or extra digit


Usage for check digits
Check digits are used to identify errors in data entry caused by mis-typing or mis-scanning
a barcode. They can usually detect the following types of error:
 an incorrect digit entered, for example 5327 entered instead of 5307

 transposition errors where two numbers have changed order, for example 5037
instead of 5307
 omitted or extra digits, for example 537 instead of 5307 or 53107 instead of 5307

 phonetic errors, for example 13 (thirteen), instead of 30 (thirty).


ISBN 13 - The check digit in ISBN 13 is the thirteenth digit in the number.

Calculation 1 – Generation of the check digit from the other 12 digits in a number

The following algorithm generates the check digit from the 12 other digits:

1) add all the odd numbered digits together

2) add all the even numbered digits together and multiply the result by 3

3) add the results from 1 and 2 together and divide by 10

4) take the remainder, if it is zero then use this value, otherwise subtract the remainder
from 10 to find the check digit.
Using the ISBN 9 7 8 0 3 4 0 9 8 3 8 2

1) 9 + 8 + 3 + 0 + 8 + 8 = 36
2) 3 × (7 + 0 + 4 + 9 + 3 + 2) = 75
3) (36 + 75)/10 = 111/10 = 11 remainder 1
4) 10 – 1 = 9 the check digit
Calculation 2 – Re-calculation of the check digit from the thirteen-digit number (which now
includes the check digit)

To check that an ISBN 13-digit code is correct, including its check digit, a similar process is
followed:

1) add all the odd numbered digits together, including the check digit

2) add all the even number of digits together and multiply the result by 3

3) add the results from 1 and 2 together and divide by 10

4) the number is correct if the remainder is zero.


Using the ISBN 9 7 8 0 3 4 0 9 8 3 8 2 9 (including its check digit)

1) 9 + 8 + 3 + 0 + 8 + 8 + 9 = 45

2) 3 × (7 + 0 + 4 + 9 + 3 + 2) = 75

3) (45 + 75)/10 = 120/10 = 12 remainder 0

4) remainder is 0, therefore number is correct.


Modulo-11

 The modulo-11 method can have varying lengths of number which makes it suitable
for many applications, such as product codes or VINs.

 The first calculation is the generation of the check digit.

 The second calculation is a verification of the check digit (that is, a recalculation).
Calculation 1 – Generation of the check digit from the other digits in a number

The following algorithm generates the check digit from the other 7 digits:

1) each digit in the number is given a weighting of 8, 7, 6, 5, 4, 3 or 2 starting from the left (weightings start from 8
since the number will become eight-digit when the check digit is added)

2) the digit is multiplied by its weighting and then each value is added to make a total

3) the total is divided by 11

4) the remainder is then subtracted from 11 to find the check digit (note if the remainder is 10 then the check digit ‘X’ is

used).
The example to be used has the following seven-digit number:

1) 7-digit number: 4 1 5 6 7 1 0

weighting values: 8 7 6 5 4 3 2

2) sum: (8 × 4) + (7 × 1) + (6 × 5) + (5 × 6) + (4 × 7) + (3 × 1) + (2 × 0)

= 32 + 7 + 30 + 30 + 28 + 3 + 0

total = 130

3) divide total by 11: 130/11 = 11 remainder 9

4) subtract remainder from 11: 11 – 9 = 2 (check digit)

So we end up with the following eight-digit: 4 1 5 6 7 1 0 2


Calculation 2 – Re-calculation of the check digit from the eight-digit number (which now includes
the check digit)
To check that the eight-digit number is correct, including its check digit, a similar process is followed:

1) each digit in the number is given a weighting of 8, 7, 6, 5, 4, 3, 2 or 1 starting from the left

2) the digit is multiplied by its weighting and then each value is added to make a total

3) the total is divided by 11

4) the number is correct if the remainder is zero

Using the 8-digit number: 4 1 5 6 7 1 0 2

5) weighting values: 8 7 6 5 4 3 2 1

6) sum = (8 × 4) + (7 × 1) + (6 × 5) + (5 × 6) + (4 × 7) + (3 × 1) + (2 × 0) + (1 × 2)

= 32 + 7 + 30 + 30 + 28 + 3 + 0 + 2

total = 132

3) divide total by 11: 132/11 = 12 remainder 0

4) remainder is 0, therefore number is correct


Automatic Repeat Requests (ARQs)
 Parity checks and echo checks as methods to verify that data has arrived at its destination unchanged

 Automatic Repeat Request (ARQ) is a third way used to check data following data transmission

ARQ uses positive and negative acknowledgements (messages sent to the receiver indicating that data has/has
not been received correctly) and timeout (this is the time interval allowed to elapse before an acknowledgement
is received)
 the receiving device receives an error detection code as part of the data transmission (this is typically a Cyclic
Redundancy Check – refer to Section 2.1.1); this is used to detect whether the received data contains any
transmission errors
 if no error is detected, a positive acknowledgement is sent back to the sending device
 however, if an error is detected, the receiving device now sends a negative acknowledgement to the sending
device and requests re-transmission of the data a time-out is used by the sending device by waiting a pre-
determined amount
of time and if no acknowledgement of any type has been received by the sending device within this time limit, it
automatically re-sends the data until a positive acknowledgement is received or until a pre-determined number
of re-transmissions has taken place
 ARQ is often used by mobile phone networks to guarantee data integrity.
 Each of these error-checking techniques has its advantages and limitations.

 More complex error-detection and error-correction methods, such as Cyclic


Redundancy Check (CRC) and Hamming code, are often used in modern
communication systems to provide more robust and reliable error detection
and correction capabilities.

You might also like