|
Carl, >1. Starting from the left, add all the ODD positions into SUM1. >2. Multiply SUM1 * 3 >3. Starting from the left, add all the EVEN positions into SUM2 >4. Add the product from step 2 above + SUM2 (ie (SUM1*3) + SUM2) >5. The modulo 10 check digit is the number when added to the result in step >4 gives the next higest multiple of 10. If the sum from step 4 was 83, the >check digit is 7. FWIW, the above instructions work but would not be technically correct if UPC/EAN/JAN numbers had different lengths. The counting actually starts from the right, not the left, and excludes the check digit if you multiply the odd positions by 3 or includes the check digit if you multiply the even positions by 3. Since UPC-A and UPC-E have 11 digits excluding the check digit, and EAN-8 has 7 excluding the check digit, it works out to the same thing. But EAN-13/JAN-13 would yield different results depending on which side you counted from since there are 12 digits excluding the check digit. Doug +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.