0% found this document useful (0 votes)
151 views17 pages

Check Digits

Check digits are used for error detection in identification numbers that are manually entered. A check digit is calculated from the other digits in a code using an algorithm, and is the final digit in the code. This allows detection of errors like incorrect, transposed, missing or extra digits. Common methods for generating check digits are ISBN-13, which calculates the check digit based on weighted digit sums, and Modulo-11, which weights each digit before taking the remainder of the total divided by 11.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
151 views17 pages

Check Digits

Check digits are used for error detection in identification numbers that are manually entered. A check digit is calculated from the other digits in a code using an algorithm, and is the final digit in the code. This allows detection of errors like incorrect, transposed, missing or extra digits. Common methods for generating check digits are ISBN-13, which calculates the check digit based on weighted digit sums, and Modulo-11, which weights each digit before taking the remainder of the total divided by 11.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Data Transmission

Made by: Mam Noor-ul-Ain


Check digits
• A check digit is a form of redundancy check used for error detection on
identification numbers, such as bank account numbers, which are used in an
application where they will at least sometimes be input manually.
• It is analogous to a binary parity bit used to check for errors in computer-
generated data.
• It consists of one or more digits (or letters) computed by an algorithm from
the other digits (or letters) in the sequence input.
Check Digits
• 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).
• Check digits are used to identify errors in data entry caused by mis-typing or
mis-scanning a barcode.
Check Digits
• 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).
Check digits
• Methods to generate the check digits:
• There are a number of different methods used to generate a check digit.
• Two common methods will be considered here:
• » ISBN 13
• » Modulo-11
ISBN 13
• The check digit in ISBN 13 is the thirteenth digit in the number.
• We will now consider two different calculations.
• The first calculation is the generation of the check digit.
• The second calculation is a verification of the check digit (that is, a
recalculation).
ISBN 13
• 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:
• Add all the odd numbered digits together
• Add all the even numbered digits together and multiply the result by 3
• Add the results from 1 and 2 together and divide by 10
• Take the remainder, if it is zero then use this value, otherwise subtract the
remainder from 10 to find the check digit.
ISBN 13
ISBN 13
ISBN 13
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(Vehicle
Identification Number ).
• The first calculation is the generation of the check digit.
• The second calculation is a verification of the check digit (that is, a
recalculation).
Modulo-11
• Calculation 1 – Generation of the check digit from the other digits in a number (In this
example, we will assume the original number contained only 7 digits.)
• The following algorithm generates the check digit from the other 7 digits:
• 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)
• The digit is multiplied by its weighting and then each value is added to make a total
• The total is divided by 11
• 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).
Modulo-11
Modulo-11
Automatic Repeat Requests (ARQs)
• We have already considered parity checks and echo checks as methods to
verify that data has arrived at its destination unchanged.
• An Automatic Repeat Request (ARQ) is a third way used to check data
following data transmission.
Automatic Repeat Requests (ARQs)
• This method can best be summarized as follows:
• » 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
Automatic Repeat Requests (ARQs)
• 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.

You might also like