From a long ago checkdigit is used in every important sequence of numbers, such as bank account, taxpayer number, etc.
Multiply each number in the sequence of numbers by the value called weight in specified algorithm. Figure out a sum of these numbers, and divide it by specified modulus. Then,
In the process of printing the barcode, bars sometimes get thick or thin illegally. Checkdigit is indispensable to avoid misreading caused by these errors. That is, when the sequence of numbers written in the barcode doesn't match with the checkdigit we had read, the computer refuses the sequence of numbers to input.
Barcode does/doesn't need the checkdigit by its type;
We'll take an example, frequently employed JAN(EAN) barcode (Modulus 10, Weight 3:1) and illustrate the relation of weight, modulus, etc.
|126 (sum) / 10 (modulus) = 12, remains 6|
|10 - 6 (remainder) = 4 (check digit)|
Moreover, dividing directly the sequence of numbers with the modulus, then
There are many type of checkdigit we cannot display here at once.
In detail, see "Barcode Haya-wakari (A Quick Guide to a Barcode)".