Read More
Date: 17-11-2021
1244
Date: 1-9-2021
2369
Date: 11-9-2021
1226
|
The Codabar system is used by many credit card companies, and also by libraries, blood banks, and other companies.
A Codabar number has an even number of digits: an odd number of digits to identify the account, plus one check digit. There are five steps in calculating the check digit:
1. add together the digits in the odd-numbered positions (first, third, and so on) of the identity number;
2. multiply this sum by 2;
3. count how many of the odd-numbered digits are greater than 4, and add the answer to the product from step 2;
4. add the digits in the even-numbered positions of the identity number, and add this sum to the result of step 3;
5. the check digit is the number that, when added to the result of step 4, would make the total exactly divisible by 10.
Sample Problem 1.1What is the check digit that would be attached to the Codabar identity number 3125600196431?
Solution. The odd-position digits are 3,2,6,0,9,4,1, and their sum is 25. So the answer to step 1 is 25 and, to step 2, 50. Two of these digits are greater than 4, so the answer to step 3 is 52. The even-position digits, 1,5,0,1,6,3, have sum 16, giving total 68. So the check digit is 2.
To check whether a number is a legitimate Codabar number, we ignore the last digit and calculate the check digit for the remaining number.
Sample Problem 1.2 Is 3125700143750015 a legitimate Codabar number?
Solution. 3+2+7+0+4+7+0+1= 24; twice this is 48. There are two digits over 4, so the total becomes 50. The even digits add to 15, giving a total of 65.
So the check digit is 5, and the number is legitimate.
The Codabar method detects a lot more errors than the simpler methods we saw in the preceding question. In particular, if two adjacent digits are exchanged, the odd-position and even-position sums are changed, and in most cases the check digit will be altered. It has been estimated that Codabars catch about 98% of errors.
|
|
كل ما تود معرفته عن أهم فيتامين لسلامة الدماغ والأعصاب
|
|
|
|
|
ماذا سيحصل للأرض إذا تغير شكل نواتها؟
|
|
|
|
|
قسم الشؤون الفكرية يصدر العدد 112 من مجلة حيدرة للفتيان
|
|
|