Updated date:

Ubiquitous Barcodes and ISBN

I am a school teacher with a love for writing short stories, usually with a humorous twist.

ubiquitous-barcodes-and-isbn

As you stroll the aisles of the supermarket scrutinising the label displaying nutritional data of food products with the aim of providing healthy choices for your family, the barcode on the package does not attract your interest. Later, whilst waiting at the checkout to be served, you peruse a magazine and again ignore the barcode on the last page. However, it is surprising just how much information can be extracted from a barcode’s black lines and accompanying digits.

What is a barcode?

All food packages have a barcode which is used as product identification. The system originated in the United States in 1951 and had varying levels of success across different types of industry, later proving particularly successful in supermarkets.

In 1973, UPC (Universal Product Code) was adopted as the standard in the United States and was subsequently readily accepted by other countries.

Later, the EAN (European Article Number) became popular and replaced the UPC system. However, some countries such as Japan also still use UPC in addition to EAN.

With its increasing popularity, EAN is now considered to be the standard for describing retails products and is known as the International Article Number, although the acronym EAN remains.

ubiquitous-barcodes-and-isbn

Today, many code systems exist that accommodate different business requirements. These include bCode to study insect behaviour, DotCode to track cigarette and pharmaceutical parcels, and QR code used in car component management, in Japanese mobile (cell) phones and with Blackberry Messenger 1.

EAN revealed

The EAN standard is EAN-13. It consists of 13 digits, with four subsets of the 13 digits providing specific information about the product. Less common is EAN-8, which is used for small packages.

The first subset refers to the country of origin, the second subset is the manufacturer’s code, the third subset is the product code and the last subset is the check digit.

The example below provides a breakdown of the 13 digits using the barcode for a tub of margarine.

ubiquitous-barcodes-and-isbn

The country code is 93, which corresponds to Australia.

The table below lists some countries of origin 2.

ubiquitous-barcodes-and-isbn

The manufacturer code can comprise up to 5 digits. Hence there are 10 x 10 x 10 x 10 x 10 = 100,000 different codes possible.

The product code comprises up to 5 digits and is created by the manufacturer for their own product. There are 10 x 10 x 10 x 10 x 10 = 100,000 different codes (products) the manufacturer can label.

The check digit is a way of improving the reliability of the previous 12 digits. It does not guarantee that all digits are correct.

How to work out the check digit

To determine the check digit, the three steps to follow are:

step 1 Start from the left and alternately multiply each of the 12 digits by 1 or 3.

step 2 Calculate the sum of the 12 products.

step 3 Find the smallest number to add to the sum to make a multiple of ten.

To demonstrate the method, let’s verify the check digit for the barcode belonging to the Classic Pen Set shown.

ubiquitous-barcodes-and-isbn

The EAN-13 is 5020044560242, so the check digit is 2 (the last digit).

ubiquitous-barcodes-and-isbn

For the first step, every second digit starting from the first digit is multiplied by 1 and every second digit starting from the second digit is multiplied by 3.

ubiquitous-barcodes-and-isbn

Hence we find 5 x 1 = 5, 2 x 1 = 2, 0 x 1 = 0, 4 x 1 = 4, 6 x 1 = 6, 2 x 1 = 2

and 0 x 3 = 0, 0 x 3 = 0, 4 x 3 = 12, 5 x 3 = 15, 0 x 3 = 0, 4 x 3 = 12

For the second step, the sum of the twelve products is 5 + 2 + 0 + 4 + 6 + 2 + 0 + 0 + 12 +15 + 0 + 12 = 58

For the third step, the closest multiple of 10 is 60. This means add 2 to 58. Hence the check digit is 2.

ubiquitous-barcodes-and-isbn

A world standard used to classify books, magazines, newspapers and other written material is known as ISBN, an acronym for International Standard Book Number.

Each ISBN is ten digits if it was assigned before 2007, and it comprises thirteen digits if it was assigned after that date. Pre 2007 ISBN numbers can also have post 2007 ISBN numbers.

An ISBN is divided into four parts.

  1. A group identifier (for a national group, language, geographical group or other group).
  2. The publisher prefix.
  3. The title number (each different edition, whether hardback or paperback, has a number).
  4. A check digit.

Some group identifiers are: 3 for Germany; 0 for the USA, Canada, Australia, New Zealand and the United Kingdom; 90 for the Netherlands; 82 for Norway and 2 for France.

Verifying the check digit

Verifying a check digit will depend on the assignation date.

Pre 2007

Suppose we have ISBN abcdefghij, with check digit j. We calculate 10a + 9b + 8c +…+ 2i = s.

The sum, s, is divided by 11 and the remainder found. That is, s = 11n + r, where r is the remainder.

If r is 0, the check digit, j, is 0 and if r is not 0, the check digit, j, is 11 – r.

If the check digit is 10, it is represented by X.

Post 2007

The check digit is calculated in exactly the same way as the method used with EAN-13.

As an example, we will verify the check digit for a book with the ISBN below.

ubiquitous-barcodes-and-isbn

Pre 2007, use ISBN 0495018074.

First, calculate 10 x 0 + 9 x 4 + 8 x 9 + 7 x 5 + 6 x 0 + 5 x 1 + 4 x 8 + 3 x 0 + 2 x 7.

The sum is 194. Now divide 194 by 11 and determine the remainder.

194 = 17 x 11 + 7

The remainder after division by 11 is r = 7. The check digit is 11 – r = 11 – 7 = 4.

Post 2007, use ISBN 9780495018070.

The 12 products are:

9 x 1 = 9, 8 x 1 = 8, 4 x 1 = 4, 5 x 1 = 5, 1 x 1 = 1, 0 x 1 = 0

7 x 3 = 21, 0 x 3 = 0, 9 x 3 = 27, 0 x 3 = 0, 8 x 3 = 24, 7 x 3 = 21

The sum of the twelve products is 120.

The closest multiple to 120 is 120. That is, 120 + 0 = 120. after 58 is 60. Hence the check digit is 0.

Barcodes are pervasive and provide an efficient way of encapsulating important information about a product.

Think about your frustration level if a product is not available in your supermarket. Thanks to barcodes, an electronic trigger informs the supermarket to restock the item when it is in short supply.

Now see how you go with the short quiz.

Bibliography

1 For an extensive list of codes, see https://en.wikipedia.org/wiki/Barcode

2 For an extensive list of countries, see https://wholesgame.com/trade-info/ean-barcodes-country/

Barcode Short Quiz

For each question, choose the best answer. The answer key is below.

  1. If the country of origin in EAN-13 format can have up to 3 digits, what is the maximum number of codes possible?
    • 10
    • 30
    • 100
    • 1000
  2. In EAN-12, the number of different check digits that can arise is
    • 10
    • 11
    • 12
    • 100
  3. A check digit must be a single or digit. In EAN-12, why is X used when the check digit is 10?
    • 10 is not actually the check digit, so X is used
    • There is no space for two digits in one position, so the roman numeral for 10 is used
    • X is easier to write than 10
    • The check digit is at the end, and X is also almost at the end of the alphabet
  4. In EAN-13 with barcode 010203040506 has check digit
    • 1
    • 3
    • 5
    • 7
  5. For a book published in 1965 has ISBN 101230041* , the check digit is
    • 1
    • 2
    • 3
    • 4

Answer Key

  1. 1000
  2. 10
  3. There is no space for two digits in one position, so the roman numeral for 10 is used
  4. 7
  5. 2

Interpreting Your Score

If you got between 0 and 1 correct answer: You might like to review the article again.

If you got between 2 and 3 correct answers: Not a bad effort.

If you got 4 correct answers: Quite a good effort.

If you got 5 correct answers: An excellent display of your knowledge.