Cut the knot: learn to enjoy mathematics
A math books store at a unique math study site. Learn to enjoy mathematics.
Google
Web CTK
Best sites for teachers
Sites for teachers
Sites for parents
Terms of use
Awards

Interactive Activities
CTK Exchange
CTK Insights - a blog

Games & Puzzles
What Is What
Arithmetic/Algebra
Geometry
Probability
Outline Mathematics
Make an Identity
Book Reviews
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
Reciprocal links
Privacy Policy

Guest book
News sites

Recommend this site

Best sites for teachers
Sites for teachers
Sites for parents

Education & Parenting

Manifesto: what CTK is about Search CTK Buying a book is a commitment to learning Table of content Things you can find on CTK Chronology of updates Email to Cut The Knot Recommend this page

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

Copyright © 1996-2008 Alexander Bogomolny

28735577Page copy protected against web site content infringement by Copyscape


Search:
Keywords:


Latest on CTK Exchange
Math
Posted by Laura
2 messages
06:56 AM, Apr-15-08

Divisibility rules - Jargon buste ...
Posted by Carolyn
2 messages
08:35 AM, Apr-04-08

drawing puzzle
Posted by martin gran
31 messages
06:53 PM, May-09-08

conway's game of life
Posted by frequency
0 messages
11:52 PM, May-12-08

Mistake on the page (an aside, Be ...
Posted by Max
4 messages
10:28 AM, Feb-28-08

Deriving functions based on diffe ...
Posted by ke_45
1 messages
12:47 PM, May-10-08

Josephus Flavius (correction)
Posted by David Turner
0 messages
08:17 AM, May-14-08