UPCE SYMBOLOGY  
BACKGROUND INFORMATION  
UPCE is a variation of UPCA which allows for a more compact barcode by eliminating "extra" zeros. Since the resulting UPCE barcode is about half the size as an UPCA barcode, UPCE is generally used on products with very small packaging where a full UPCA barcode couldn't reasonably fit.  
UPCE uses a rather convoluted, but quite effective, method of compressing out unnecessary zeros. Keep in mind that in UPCA there are five characters for the manufacturer code and five characters for the product code. The trick is to reduce all 10 characters into just 6 characters. How?  
CONVERTING A UPCA CODE TO UPCE  




You may use the following UPCA Converter to convert a UPCA barcode value to UPCE. Simply enter the 12 characters of the UPCA barcode in the first field, click the "Convert" button, and the resulting UPCE symbol will be displayed in the field below. If the answer "Invalid" is displayed in the second field, it means the UPCA code you provided can't be converted to UPCE. The converter requires that you have JavaScript enabled.


ENCODING  
UPCE uses the "lefthand odd" and "lefthand even" encoding character sets from the EAN13 encoding standard. UPCE doesn't have a check digit encoded explicity, rather the check digit is encoded in the parity of the other six characters. The check digit that is encoded is the check digit from the original UPCA barcode. Additionally, UPCE may only be used if the number system is 0 or 1. The characters encoded are encoded with odd and even parity from the lefthand columns of the EAN13 character formats in the table previously provided. The parity used for each character depends on the number system (0 or 1) and the check digit from the original UPCA barcode. 

UPCE PARITY ENCODING TABLE  


STRUCTURE  
An UPCE barcode has the following physical structure: * Lefthand guard bars, or start sentinel, encoded as 101. * Six data characters, encoded from the parity table above. * Righthand guard bars, encoded as 010101 (a centerguard bar pattern with a trailing bar). NOTE: The structure of a UPCE barcode is identical to the lefthalf of a standard UPCA barcode. The only difference is that the centerguard pattern is terminated immediately by a trailing bar and trailing quiet zone. 

ENCODING EXAMPLE  
For this example we will convert the UPCA symbol "042100005264" to a UPCE code. First, we break the UPCA symbol into its components: Number system 0, manufacturer code 42100, product code 00526, check digit 4. First, we make note of the fact that the number system is zero (0). We will thus use the first column of the parity encoding table. We also observe that the original UPCA check digit was 4. Thus, consulting the table above, we see that our UPCE barcode will be encoded with the parity "EOEEOO". Next, we must determine how we're going to code this. We see that the manufacturer code ends in "100", so we can use the first encoding method: The first two characters of the manufacturer code, the last three characters of the product code, followed by the third character of the manufacturer code. That would be "425261". Those are the digits that we need to code using the parity pattern "EOEEOO". 1. LEFT GUARD BARS (always the same): 101. 2. 1st UPCE DIGIT [4]. Encoding with lefthand even parity, 0011101. 3. 2nd UPCE DIGIT [2]. Encoded with lefthand odd parity, 0010011. 4. 3rd UPCE DIGIT [5]. Encoded with lefthand even parity, 0111001. 5. 4th UPCE DIGIT [2]. Encoded with lefthand even parity, 0011011. 6. 5th UPCE DIGIT [6]. Encoded with lefthand odd parity, 0101111. 7. 6th UPCE DIGIT [1]. Encoded with lefthand odd parity, 0011001. 8. CENTAR GUARD BARS (always the same): 01010. 9. RIGHT GUARD BAR (always the same): 1. Remember, a "1" represents a bar and a "0" represents a space. Thus if we convert this string of numbers to their graphical representation we end up with the following barcode: 

To the left of the barcode, the number "0" represents the number system code. The number "4" to the right of the barcode indicates the original UPCA checksum digit. These two digits are printed as humanreadable numbers, but are actually encoded in the parity of the other 6 numbers. In order to see more clearly the construction of the barcode, the following graphic shows the exact same barcode but each character, or section, of the barcode is indicated by alternating colors. Above the barcode, in each colored section, is a number from 1 to 15, which corresponds to each of the "steps," or sections, described above. You may easily compare the 10 sequence of each step to the graphical representation below: 

CONVERTING A UPCA CODE TO UPCE  
If you have a 6digt UPCE code you may use the following logic to convert it back to UPCA. The decision on which logic to use depends on the last digit of the UPCE Code. 1. UPCE code ends in 0, 1, or 2: The UPCA code is determined by taking the first two digits of the UPCE code, taking the last digit of the UPCE code, adding four 0 digits, and then adding characters 3 through 5 from the UPCE code. 2. UPCE code ends in 3: The UPCA code is determined by taking the first three digits of the UPCE code, adding five 0 digits, then adding characters 4 and 5 from the UPCE code. 3. UPCE code ends in 4: The UPCA code is determined by taking the first four digits of the UPCE code, adding five 0 digits, then adding the fifth character from the UPCE code. 4. UPCE code ends in 5, 6, 7, 8, or 9: The UPCA code is determined by taking the first give digits of the UPCE code, adding four 0 digits, then adding the last character from the UPCE code. 
