Cut the knot: learn to enjoy mathematics
A math books store at a unique math study site. Shopping at the store helps maintain the site. Thank you.
Learning Math Online
Sites for teachers
Sites for parents
Terms of use
Awards
Interactive Activities

CTK Exchange
CTK Wiki Math
CTK Insights - a blog
Math Help

III Millennium Olympiad

Games & Puzzles
What Is What
Arithmetic/Algebra
Geometry
Probability
Outline Mathematics
Make an Identity
Book Reviews
Stories for Young
Eye Opener
Analog Gadgets
Inventor's Paradox
Did you know?...
Proofs
Math as Language
Things Impossible
Visual Illusions
My Logo
Math Poll
Cut The Knot!
MSET99 Talk
Other Math sites
Front Page
Movie shortcuts
Personal info
Privacy Policy

Guest book
News sites

Recommend this site

Games to relax

Sites for teachers
Sites for parents

Education & Parenting

Manifesto  |  Bookstore  |  Contents  |  Amazon store  |  Term index  |  What changed?  |  Contact  |  Recommend
RSS Feed: Recent changes at CTK

EAN-13 Encoding

Following the success of UPC-A encoding (1973), the EAN-13 format has been adopted in Europe by the International Article Numbering Association (EAN) in 1976. A twelve digit UPC-A is easily embedded into the 13 digit EAN-13 by prepending one 0 digit. The first 0 is indeed an EAN number system prefix indicating the USA (or Canada) as the country of origin. In general an EAN-code consists of four parts:

  1. 2-3 digit Number System, or country code (with industrial counties assigned 2-digit codes and smaller or less developed countries assigned 3-digit codes.)
  2. 5-4 digit Manufacturer (Company) Code or prefix. (The first two parts always use the first 7 digits.)
  3. 5 digit Product Code.
  4. 1 Check Digit.

In a barcode representation, the first of the 13 digits of an EAN code plays a peculiar role, whereas the remaining 12 are converted in two groups of six digits: left and right.

The country codes are naturally in public domain and available on Internet. One peculiarity is worth a mention: In order to embed the standard ISBN-10 into EAN-13, a country without borders (but also without territory) has been brought into play. The ISBN Bookland has received the country code of 978 so that, for example, an ISBN code 0-14-200057-4 is converted into EAN-13's 9780142000571. The difference in the last (check) digit is due to the difference of the applied algorithms.

The check digit algorithm in EAN-13 works almost in the same manner as in UPC-A. However, the twelfth digit, i.e. the one next to the check digit, is declared odd. All other odd digits are obtained from this one by moving leftward and counting each other digit. This is done in order to smoothly incorporate UPC-A as a whole without the need to modify its check digit.

Thus for a valid 13-digit EAN code d1d2d3...d13, we have

(1) d1 + 3×d2 + d3 + 3×d4 + ... + d11 + 3×d12 + d13 = 0 (mod 10).

In the applet below, the first twelve digits of the code are clickable and modifiable. The last digit is calculated automatically according to (1).


This applet requires Sun's Java VM 2 which your browser may perceive as a popup. Which it is not. If you want to see the applet work, visit Sun's website at http://www.java.com/en/download/index.jsp, download and install Java VM and enjoy the applet.


Buy this applet
What if applet does not run?

Copyright © 1996-2009 Alexander Bogomolny

34221198Page copy protected against web site content infringement by Copyscape


Search:
Keywords:

Google
Web CTK