first digit, the first group of 6 and the last group of 6. The first group of 6 is encoded using a pattern whereby each digit has two possible encodings, one of which has even parity (denoted with letter G) and one of which has odd parity (denoted with letter L). The first digit is not represented directly by a pattern of bars and spaces, but is encoded indirectly, by selecting a pattern of choices between these two encodings for the first group of 6 digits, according to the table below. All digits in the last group of 6 digits are encoded using a single pattern RRRRRR, the one also used for UPC. If the first digit is zero, all digits in the first group of 6 are encoded using the pattern LLLLLL used for UPC, therefore, a UPC barcode is also an EAN-13 barcode with the first digit set to zero. This encoding guarantees that the first group always starts with an L-code, which has odd parity, and that the second group always starts with an R-code, which has even parity. Thus, it does not matter whether the barcode is scanned from the left or from the right, as the scanning software can use this parity to identify the start and end of the code. EAN-8 barcodes encode all digits directly, using this scheme: Note: Entries in the R-column are bitwise complements (logical operator: negation) of the respective entries in the L-column. Entries in the G-column are the entries in the R-column in reverse bit order. See pictures of all codes against a colored background. A run of one or more black areas is known as a "bar", and a run of one or more white areas is known as a "space". As can be seen in the table, each digit's encoding comprises two bars and two spaces, and the maximum width of a bar or space is four areas. EAN-13 barcode example C1, C3: Start/end marker. C2: Marker for the center of the barcode. 6 digits in the left group: 003994. 6 digits in the right group (the last digit is the check digit): 155486. A digit is encoded in seven areas, by two black bars and two white spaces. Each black bar or white space can have a width between 1 and 4 areas. Parity for the digits from left and right group: OEOOEE EEEEEE (O =