Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Universal Product Code
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Encoding == {|class="wikitable floatright collapsible" style="text-align:center;font-size:85%;" |+UPC number encoding ! Value ! colspan=7 | L encoding ! rowspan=11 style="font-size:10%; | ! colspan=7 | R encoding |- ! 0<!--3211--> | style="background:#fff;color:#000;" colspan=3 | 3 | style="background:#000;color:#fff;" colspan=2 | 2 | style="background:#fff;color:#000;" colspan=1 | 1 | style="background:#000;color:#fff;" colspan=1 | 1 | style="background:#000;color:#fff;" colspan=3 | 3 | style="background:#fff;color:#000;" colspan=2 | 2 | style="background:#000;color:#fff;" colspan=1 | 1 | style="background:#fff;color:#000;" colspan=1 | 1 |- ! 1<!--2221--> | style="background:#fff;color:#000;" colspan=2 | 2 | style="background:#000;color:#fff;" colspan=2 | 2 | style="background:#fff;color:#000;" colspan=2 | 2 | style="background:#000;color:#fff;" colspan=1 | 1 | style="background:#000;color:#fff;" colspan=2 | 2 | style="background:#fff;color:#000;" colspan=2 | 2 | style="background:#000;color:#fff;" colspan=2 | 2 | style="background:#fff;color:#000;" colspan=1 | 1 |- ! 2<!--2122--> | style="background:#fff;color:#000;" colspan=2 | 2 | style="background:#000;color:#fff;" colspan=1 | 1 | style="background:#fff;color:#000;" colspan=2 | 2 | style="background:#000;color:#fff;" colspan=2 | 2 | style="background:#000;color:#fff;" colspan=2 | 2 | style="background:#fff;color:#000;" colspan=1 | 1 | style="background:#000;color:#fff;" colspan=2 | 2 | style="background:#fff;color:#000;" colspan=2 | 2 |- ! 3<!--1411--> | style="background:#fff;color:#000;" colspan=1 | 1 | style="background:#000;color:#fff;" colspan=4 | 4 | style="background:#fff;color:#000;" colspan=1 | 1 | style="background:#000;color:#fff;" colspan=1 | 1 | style="background:#000;color:#fff;" colspan=1 | 1 | style="background:#fff;color:#000;" colspan=4 | 4 | style="background:#000;color:#fff;" colspan=1 | 1 | style="background:#fff;color:#000;" colspan=1 | 1 |- ! 4<!--1132--> | style="background:#fff;color:#000;" colspan=1 | 1 | style="background:#000;color:#fff;" colspan=1 | 1 | style="background:#fff;color:#000;" colspan=3 | 3 | style="background:#000;color:#fff;" colspan=2 | 2 | style="background:#000;color:#fff;" colspan=1 | 1 | style="background:#fff;color:#000;" colspan=1 | 1 | style="background:#000;color:#fff;" colspan=3 | 3 | style="background:#fff;color:#000;" colspan=2 | 2 |- ! 5<!--1231--> | style="background:#fff;color:#000;" colspan=1 | 1 | style="background:#000;color:#fff;" colspan=2 | 2 | style="background:#fff;color:#000;" colspan=3 | 3 | style="background:#000;color:#fff;" colspan=1 | 1 | style="background:#000;color:#fff;" colspan=1 | 1 | style="background:#fff;color:#000;" colspan=2 | 2 | style="background:#000;color:#fff;" colspan=3 | 3 | style="background:#fff;color:#000;" colspan=1 | 1 |- ! 6<!--1114--> | style="background:#fff;color:#000;" colspan=1 | 1 | style="background:#000;color:#fff;" colspan=1 | 1 | style="background:#fff;color:#000;" colspan=1 | 1 | style="background:#000;color:#fff;" colspan=4 | 4 | style="background:#000;color:#fff;" colspan=1 | 1 | style="background:#fff;color:#000;" colspan=1 | 1 | style="background:#000;color:#fff;" colspan=1 | 1 | style="background:#fff;color:#000;" colspan=4 | 4 |- ! 7<!--1312--> | style="background:#fff;color:#000;" colspan=1 | 1 | style="background:#000;color:#fff;" colspan=3 | 3 | style="background:#fff;color:#000;" colspan=1 | 1 | style="background:#000;color:#fff;" colspan=2 | 2 | style="background:#000;color:#fff;" colspan=1 | 1 | style="background:#fff;color:#000;" colspan=3 | 3 | style="background:#000;color:#fff;" colspan=1 | 1 | style="background:#fff;color:#000;" colspan=2 | 2 |- ! 8<!--1213--> | style="background:#fff;color:#000;" colspan=1 | 1 | style="background:#000;color:#fff;" colspan=2 | 2 | style="background:#fff;color:#000;" colspan=1 | 1 | style="background:#000;color:#fff;" colspan=3 | 3 | style="background:#000;color:#fff;" colspan=1 | 1 | style="background:#fff;color:#000;" colspan=2 | 2 | style="background:#000;color:#fff;" colspan=1 | 1 | style="background:#fff;color:#000;" colspan=3 | 3 |- ! 9<!--3112--> | style="background:#fff;color:#000;" colspan=3 | 3 | style="background:#000;color:#fff;" colspan=1 | 1 | style="background:#fff;color:#000;" colspan=1 | 1 | style="background:#000;color:#fff;" colspan=2 | 2 | style="background:#000;color:#fff;" colspan=3 | 3 | style="background:#fff;color:#000;" colspan=1 | 1 | style="background:#000;color:#fff;" colspan=1 | 1 | style="background:#fff;color:#000;" colspan=2 | 2 |} The UPC-A barcode is visually represented by strips of bars and spaces that encode the UPC-A 12-digit number. Each digit is represented by a unique pattern of 2 bars and 2 spaces. The bars and spaces are variable width, i.e. 1, 2, 3, or 4 modules wide. The total width for a digit is always 7 modules; consequently, UPC-A 12-digit number requires a total of {{nowrap|7×12 {{=}} 84 modules}}. A complete UPC-A is 95 modules wide: 84 modules for the digits (L and R sections) combined with 11 modules for the S (start), M (middle), and E (end) guard patterns. The S (start) and E (end) guard patterns are 3 modules wide and use the pattern ''bar-space-bar'', where each bar and space is one module wide. The M (middle) guard pattern is 5 modules wide and uses the pattern ''space-bar-space-bar-space'', where each bar and space is also one module wide. In addition, a UPC-A symbol requires a quiet zone (extra space of 9 modules wide) before the S (start) and after the E (end) guard patterns. {| class="wikitable" style="text-align:center; background-color:#80A080" |+ Encoding table for UPC-A barcode pattern S<u>L</u>LLLLLMRRRRR<u>R</u>E ! rowspan="2" | Quiet<br />zone ! rowspan="2" | S<br />(start) ! colspan="10" | L<br />(left numerical digit) ! rowspan="2" | M<br />(middle) ! colspan="10" | R<br />(right numerical digit) ! rowspan="2" | E<br />(end) ! rowspan="2" | Quiet<br />zone |- ! 0 !! 1 !! 2 !! 3 !! 4 !! 5 !! 6 !! 7 !! 8 !! 9 !! 0 !! 1 !! 2 !! 3 !! 4 !! 5 !! 6 !! 7 !! 8 !! 9 |- valign="top" | [[File:UPC-A Q.svg|27x250px]] || [[File:UPC-A S.svg|10x250px]] || [[File:UPC-A L0.svg|21x235px]] || [[File:UPC-A L1.svg|21x235px]] || [[File:UPC-A L2.svg|21x235px]] || [[File:UPC-A L3.svg|21x235px]] || [[File:UPC-A L4.svg|21x235px]] || [[File:UPC-A L5.svg|21x235px]] || [[File:UPC-A L6.svg|21x235px]] || [[File:UPC-A L7.svg|21x235px]] || [[File:UPC-A L8.svg|21x235px]] || [[File:UPC-A L9.svg|21x235px]] || [[File:UPC-A M.svg|15x250px]] || [[File:UPC-A R0.svg|21x235px]] || [[File:UPC-A R1.svg|21x235px]] || [[File:UPC-A R2.svg|21x235px]] || [[File:UPC-A R3.svg|21x235px]] || [[File:UPC-A R4.svg|21x235px]] || [[File:UPC-A R5.svg|21x235px]] || [[File:UPC-A R6.svg|21x235px]] || [[File:UPC-A R7.svg|21x235px]] || [[File:UPC-A R8.svg|21x235px]] || [[File:UPC-A R9.svg|21x235px]] || [[File:UPC-A S.svg|10x250px]] || [[File:UPC-A Q.svg|27x250px]] |} The UPC-A's left-hand side digits (the digits to the left of the M (middle) guard pattern) have odd parity, which means the total width of the black bars is an odd number of modules. On the contrary, the right-hand side digits have even parity. Consequently, a UPC scanner can determine whether it is scanning a symbol from left-to-right or from right-to-left (the symbol is upside-down). After seeing a S (start) or E (end) guard pattern (they are the same, ''bar-space-bar'', whichever direction they are read), the scanner will first see odd parity digits, if scanning left-to-right, or even parity digits, if scanning right-to-left. With the parity/direction information, an upside-down symbol will not confuse the scanner. When confronted with an upside-down symbol, the scanner may simply ignore it (many scanners alternate left-to-right and right-to-left scans, so they will read the symbol on a subsequent pass) or recognize the digits and put them in the right order. There is another property in the digit encoding. The right-hand side digits are the optical inverse of the left-hand side digits, i.e. black bars are turned into white spaces and vice versa. For example, the left-hand side "4" is {{nowrap|space×1 - bar×1 - space×3 - bar×2}}, meanwhile the right-hand side "4" is {{nowrap|bar×1 - space×1 - bar×3 - space×2}}.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Universal Product Code
(section)
Add topic