EAN-5: Difference between revisions
Leolaursen (talk | contribs) m Quick-adding category "Barcodes"; removed {{uncategorized}} (using HotCat) |
Corrected factual errors in specification. Mostly semantic changes, but they do have a measurable effect on the outcome. See discussion page. |
||
Line 57: | Line 57: | ||
==Encoding== |
==Encoding== |
||
The Encoding of EAN 5 characters is very similar to that of the other [[European Article Number]]s. The only difference is that |
The Encoding of EAN 5 characters is very similar to that of the other [[European Article Number]]s. The only difference is that the digits are separated by 01. The EAN 5 always begins with '01011.' Also, the R-Code is not used. |
||
{| class="wikitable" style="text-align:center" |
{| class="wikitable" style="text-align:center" |
||
Line 64: | Line 64: | ||
! Digit !! L-code !! G-code |
! Digit !! L-code !! G-code |
||
|- |
|- |
||
| <tt>0</tt> || <tt> |
| <tt>0</tt> || <tt>0001101</tt> || <tt>0100111</tt> |
||
|- |
|- |
||
| <tt>1</tt> || <tt> |
| <tt>1</tt> || <tt>0011001</tt> || <tt>0110011</tt> |
||
|- |
|- |
||
| <tt>2</tt> || <tt> |
| <tt>2</tt> || <tt>0010011</tt> || <tt>0011011</tt> |
||
|- |
|- |
||
| <tt>3</tt> || <tt> |
| <tt>3</tt> || <tt>0111101</tt> || <tt>0100001</tt> |
||
|- |
|- |
||
| <tt>4</tt> || <tt> |
| <tt>4</tt> || <tt>0100011</tt> || <tt>0011101</tt> |
||
|- |
|- |
||
| <tt>5</tt> || <tt> |
| <tt>5</tt> || <tt>0110001</tt> || <tt>0111001</tt> |
||
|- |
|- |
||
| <tt>6</tt> || <tt> |
| <tt>6</tt> || <tt>0101111</tt> || <tt>0000101</tt> |
||
|- |
|- |
||
| <tt>7</tt> || <tt> |
| <tt>7</tt> || <tt>0111011</tt> || <tt>0010001</tt> |
||
|- |
|- |
||
| <tt>8</tt> || <tt> |
| <tt>8</tt> || <tt>0110111</tt> || <tt>0001001</tt> |
||
|- |
|- |
||
| <tt>9</tt> || <tt> |
| <tt>9</tt> || <tt>0001011</tt> || <tt>0010111</tt> |
||
|} |
|} |
||
Line 95: | Line 95: | ||
141 % 10 = 1 |
141 % 10 = 1 |
||
Once you have the checksum digit, you can lookup the structure in the following table. Note that the checksum digit is not in the final 5 digits. |
Once you have the checksum digit, you can lookup the structure in the following table. Note that the checksum digit is not in the final 5 digits, and is not intended to validate the 5 digit data, but rather to validate the reading of the EAN-5 overall. |
||
{| class="wikitable" style="text-align:center" |
{| class="wikitable" style="text-align:center" |
||
|+Structure of EAN-5 |
|+Structure of EAN-5 |
||
|- |
|- |
||
! |
! Checksum !! Structure |
||
|- |
|- |
||
| <tt>0</tt> || <tt>GGLLL</tt> |
| <tt>0</tt> || <tt>GGLLL</tt> |
||
Line 122: | Line 122: | ||
| <tt>9</tt> || <tt>LLGLG</tt> |
| <tt>9</tt> || <tt>LLGLG</tt> |
||
|} |
|} |
||
{| class="wikitable" style="text-align:center" |
|||
|+Example - encoding 52495 |
|||
|- |
|||
! Start !! 5 (G) !! Separator !! 2 (L) !! Separator !! 4 (G) !! Separator !! 9 (L) !! Separator !! 5 (L) |
|||
|- |
|||
| <tt>01011</tt> || <tt>0111001</tt> || <tt>01</tt> || <tt>0010011</tt> || <tt>01</tt> || <tt>0011101</tt> || <tt>01</tt> || <tt>0001011</tt> || <tt>01</tt> || <tt>0110001</tt> |
|||
|} |
|||
==References== |
==References== |
Revision as of 09:57, 4 September 2008
The EAN/5 is a supplement to the EAN-13 barcode used on books. It is used to give a suggestion for the price of the book.
First Digit | Description |
---|---|
5 | $ US |
6 | $ Canada |
4 | $ New Zealand |
3 | $ Australia |
0 & 1 | British pounds |
ISBN Encoding – Country and Currency Values Description
Value | Definition |
---|---|
50000 | NACS Trade |
59999 | Price for $100 and more |
90000 | NACS New |
90000-98999 | For internal purposes (BISG recommend 90000 if no price is given) |
99000-99999 | Reserved for the industry market |
99990-99999 | Reserved for National Association of College Stores (NACS) |
99990 | NACS used |
99991 | NACS copies |
Encoding
The Encoding of EAN 5 characters is very similar to that of the other European Article Numbers. The only difference is that the digits are separated by 01. The EAN 5 always begins with '01011.' Also, the R-Code is not used.
Digit | L-code | G-code |
---|---|---|
0 | 0001101 | 0100111 |
1 | 0011001 | 0110011 |
2 | 0010011 | 0011011 |
3 | 0111101 | 0100001 |
4 | 0100011 | 0011101 |
5 | 0110001 | 0111001 |
6 | 0101111 | 0000101 |
7 | 0111011 | 0010001 |
8 | 0110111 | 0001001 |
9 | 0001011 | 0010111 |
The structure of the barcode is based on the checksum. In order to compute the checksum, multiply each of the digits by either 3 or 9, alternating each time. Then add them and then do a mod 10. So the checksum for 52495 is 1 based on the following calculations:
5*3=15 2*9=18 4*3=12 9*9=81 5*3=15 ---------- 141 % 10 = 1
Once you have the checksum digit, you can lookup the structure in the following table. Note that the checksum digit is not in the final 5 digits, and is not intended to validate the 5 digit data, but rather to validate the reading of the EAN-5 overall.
Checksum | Structure |
---|---|
0 | GGLLL |
1 | GLGLL |
2 | GLLGL |
3 | GLLLG |
4 | LGGLL |
5 | LLGGL |
6 | LLLGG |
7 | LGLGL |
8 | LGLLG |
9 | LLGLG |
Start | 5 (G) | Separator | 2 (L) | Separator | 4 (G) | Separator | 9 (L) | Separator | 5 (L) |
---|---|---|---|---|---|---|---|---|---|
01011 | 0111001 | 01 | 0010011 | 01 | 0011101 | 01 | 0001011 | 01 | 0110001 |
References
Barcode Reference - Section 6.1.46.2
Barcode Writer - The basis for the barcode structure