What is BARCODE ? | How To Read Barcodes using Checksum?

Have you ever bought anything from any shop or Mall? Obviously YES! I am pretty sure that you have bought many household items and grocery from consumer shops and malls and you also know that there are few black and white lines given in the backside of every product and that combination of black & white lines are called BARCODE.

What is Barcode?

If you don’t know then let me tell you that “A barcode is an optical, machine-readable, representation of data of a particular product. Barcode is a combination of black and white strips/lines which indicates product’s information like Manufacturer and country.

There are basically 2 types of Barcode:

  • Linear Barcode
  • Metrix (2D) Barcode

Linear Barcode

Linear Barcode is also called as a one-dimensional barcode which is made up of lines and spaces of various widths and it will this combination of lines will create some pattern and these Barcodes are the most widely used Barcode system.

Metrix (2D) Barcode

Metrix is Two Dimensional Barcode, it means it contains a two-dimensional way to represent information. The main advantage of Metrix barcode is it can represent more data per unit area compared to Linear Barcode.

How to Read Barcode?

Generally, most of the Barcode has 12 digits.

The first 6 -10 digits of a 12-digit barcode identify the company that manufactures or sells the product. (These codes are assign by a non-profit organization called GS1)

The remaining digits, except for the very last one, are invented by that company to describe each of its products.

Here is a list of GS1 Country code.

Code Country
000–019 UPC-A compatible –  United States and  Canada
020–029 UPC-A compatible – Used to issue restricted circulation numbers within a geographic region
030–039 UPC-A compatible – United States drugs (see United States National Drug Code)
040–049 UPC-A compatible – Used to issue restricted circulation numbers within a geographic region
050–059 UPC-A compatible – GS1 US reserved for future use
060–099 UPC-A compatible –  United States and  Canada
100–139  United States
200–299 Used to issue GS1 restricted circulation number within a geographic region
275  Palestine
300–379  France and  Monaco
380  Bulgaria
383  Slovenia
385  Croatia
387  Bosnia and Herzegovina
389  Montenegro
390  Kosovo
400–440  Germany (440 code inherited from old  East Germany on reunification, 1990)
450–459  Japan (new Japanese Article Number range)
460–469  Russia (barcodes inherited from the  Soviet Union)
470  Kyrgyzstan
471  Republic of China (Taiwan)
474  Estonia
475  Latvia
476  Azerbaijan
477  Lithuania
478  Uzbekistan
479  Sri Lanka
480  Philippines
481  Belarus
482  Ukraine
483  Turkmenistan
484  Moldova
485  Armenia
486  Georgia
487  Kazakhstan
488  Tajikistan
489  Hong Kong
490–499  Japan (original Japanese Article Number range)
500–509  United Kingdom
520–521  Greece
528  Lebanon
529  Cyprus
530  Albania
531  Macedonia
535  Malta
539  Ireland
540–549  Belgium and  Luxembourg
560  Portugal
569  Iceland
570–579  Denmark , Faroe Islands and Greenland
590  Poland
594  Romania
599  Hungary
600–601  South Africa
603  Ghana
604  Senegal
608  Bahrain
609  Mauritius
611  Morocco
613  Algeria
615  Nigeria
616  Kenya
618  Ivory Coast
619  Tunisia
620  Tanzania
621  Syria
622  Egypt
623  Brunei
624  Libya
625  Jordan
626  Iran
627  Kuwait
628  Saudi Arabia
629  United Arab Emirates
640–649  Finland
690–699  People’s Republic of China
700–709  Norway
729  Israel
730–739  Sweden : EAN/GS1 Sweden
740  Guatemala
741  El Salvador
742  Honduras
743  Nicaragua
744  Costa Rica
745  Panama
746  Dominican Republic
750  Mexico
754–755  Canada
759  Venezuela
760–769   Switzerland and  Liechtenstein
770–771  Colombia
773  Uruguay
775  Peru
777  Bolivia
778–779  Argentina
780  Chile
784  Paraguay
786  Ecuador
789–790  Brazil
800–839  Italy,  San Marino, and   Vatican City
840–849  Spain and  Andorra
850  Cuba
858  Slovakia
859  Czech Republic
860  Serbia
865  Mongolia
867  North Korea
868–869  Turkey
870–879  Netherlands
880  South Korea
884  Cambodia
885  Thailand
888  Singapore
890  India
893  Vietnam (previously used by  North Vietnam and  South Vietnam before 1975)
894  Bangladesh
896  Pakistan
899  Indonesia
900–919  Austria
930–939  Australia
940–949  New Zealand
950 GS1 Global Office: Special applications
951 Used to issue General Manager Numbers for the EPC General Identifier (GID) scheme as defined by the EPC Tag Data Standard
955  Malaysia
958  Macau
960–961 GS1 UK Office: GTIN-8 allocations
962–969 GS1 Global Office: GTIN-8 allocations
977 Serial publications (ISSN)
978–979 “Bookland” (ISBN) – 979-0 used for sheet music (ISMN-13, replaces deprecated ISMN M- numbers)
980 Refund receipts
981–984 GS1 coupon identification for common currency areas
990–999 GS1 coupon identification

How to read Barcodes?

The mapping between messages and barcodes is called a symbology. The specification of a symbology includes the encoding of the single digits or characters of the message, as well as the start and stop characters into bars and space.

Checksum

A checksum is a computed value from a block of data and which – in the case of barcodes is stored along with the data in order to detect corruption of the data. Checksums are required elements of barcodes such as Code 128 or UPC.

Barcode

Now take an example of above barcode sticker where all the line’s specification have given. Let’s understand how to read and decode it.

  • First of all add the digits (up to but not including the check digit) in the odd-numbered positions (first, third, fifth, etc.) together (0+2+0+0+2+0=4) and multiply by three (4 x 3 = 12)
  • Now Add the digits (up to but not including the check digit) in the even-numbered positions (second, fourth, sixth, etc.) (1+0+0+0+3=4)
  • Next step is to Add the two results together to find the sum. (12 + 4 = 16)
  • The check digit will be the smallest number required to round the sum to the nearest multiple of 10. (16 rounds up to 20; 20 – 16 = 4 = the check digit)

This is how you can do a checksum and read the barcode. This may be complicated for you but this is the only way to interpret the codes and lines given in barcode. Your questions are welcome in the comment section.

Joshi Bhavya

About the Author: Joshi Bhavya

Hey, This is Bhavya. A Technology Lover and Learner. By Education, I am an Engineer and by Profession a Web Entrepreneur. I am not a Pro nor expert. The only aim of my life is to Learn as much as possible every day and share with all of you.

You May Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *