0% found this document useful (0 votes)
13 views41 pages

Bar Code

The document provides an overview of bar codes, specifically focusing on Code 39 and the Universal Product Code (UPC). It explains the structure, classification, and encoding of these bar codes, detailing how they represent data through a series of vertical bars and spaces. Additionally, it highlights the differences between discrete and continuous codes, as well as the specific character sets used in each type of bar code.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views41 pages

Bar Code

The document provides an overview of bar codes, specifically focusing on Code 39 and the Universal Product Code (UPC). It explains the structure, classification, and encoding of these bar codes, detailing how they represent data through a series of vertical bars and spaces. Additionally, it highlights the differences between discrete and continuous codes, as well as the specific character sets used in each type of bar code.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

DATA COMMUNICATION

Bar Codes

Instructor:
Engr. Rose Anne L. Reano
PUP Sto. Tomas
Bar Codes

A bar code is a series of vertical black bars


separated by vertical white bars (called spaces).
Bar Codes

The widths of the bars and spaces along with


their reflective abilities represent binary 1s and
0s, and combination of bits identify specific
items.
Classification of Bar Codes

1. Discrete Code. It has spaces or gaps between


characters.

2. Continuous Code. It does not include spaces


between characters.

3. 2D Code. It stores data in two-dimensions.


Bar Codes

1. Code 39
2. Universal Product Code
Code 39
Code 39

Code 39 is a bar code developed in 1974.

It is also called Code 3 of 9 and 3 of 9 Code.


Code 39

Code 39 consists of 36 unique codes representing


the 10 digits and 26 uppercase letters.

There are 7 additional codes used for special


characters, and an exclusive start/stop character
coded as an asterisk (*).
Code 39

Each Code 39 character contains 9 vertical


elements (five bars and four spaces).
Code 39

The logic condition (1 or 0) of each element is


encoded in the width of the bar or space.
Code 39

A wide element, whether it be a bar or a space,


represents a logic 1, and a narrow element
represents a logic 0.
Code 39

Three of the nine elements in each Code 39


character must be logic 1s, and the rest must be
logic 0s.
Code 39

In addition, of the three logic 1s, two must be


bars and one a space.
Code 39

Each character begins and ends with a black bar


with alternating white bars in between.
Code 39

Since Code 39 is discrete code, all characters are


separated with an intercharacter gap, which is
usually one character wide.
Code 39

The asterisks at the beginning and end of the bar


code are stop and start characters, respectively.
Code 39
CHARACTER BINARY CODE
b8 b7 b6 b5 b4 b3 b2 b1 b0
0 0 0 0 1 1 0 1 0 0
1 1 0 0 1 0 0 0 0 1
2 0 0 1 1 0 0 0 0 1
3 1 0 1 1 0 0 0 0 0
4 0 0 0 1 1 0 0 0 1
5 1 0 0 1 1 0 0 0 0
6 0 0 1 1 1 0 0 0 0
7 0 0 0 1 0 0 1 0 1
8 1 0 0 1 0 0 1 0 0
9 0 0 1 1 0 0 1 0 0
Code 39
BINARY CODE BINARY CODE
b b b b b b b b b b b b b b b b b b
8 7 6 5 4 3 2 1 0 8 7 6 5 4 3 2 1 0
A 1 0 0 0 0 1 0 0 1 K 1 0 0 0 0 0 0 1 1
B 0 0 1 0 0 1 0 0 1 L 0 0 1 0 0 0 0 1 1
C 1 0 1 0 0 1 0 0 0 M 1 0 1 0 0 0 0 1 0
D 0 0 0 0 1 1 0 0 1 N 0 0 0 0 1 0 0 1 1
E 1 0 0 0 1 1 0 0 0 O 1 0 0 0 1 0 0 1 0
F 0 0 1 0 1 1 0 0 0 P 0 0 1 0 1 0 0 1 0
G 0 0 0 0 0 1 0 0 1 Q 0 0 0 0 0 0 1 1 1
H 1 0 0 0 0 1 0 0 0 R 1 0 0 0 0 0 1 1 0
I 0 0 1 0 0 1 0 0 0 S 0 0 1 0 0 0 1 1 0
J 0 0 0 0 1 1 0 0 0 T 0 0 0 0 1 0 1 1 0
Code 39
BINARY CODE BINARY CODE
b b b b b b b b b b b b b b b b b b
8 7 6 5 4 3 2 1 0 8 7 6 5 4 3 2 1 0
U 1 1 0 0 0 0 0 0 1 $ 0 1 0 1 0 1 0 0 0
V 0 1 1 0 0 0 0 0 1 / 0 1 0 1 0 0 0 1 0
W 1 1 1 0 0 0 0 0 0 + 0 1 0 0 0 1 0 1 0
X 0 1 0 0 1 0 0 0 1 % 0 0 0 1 0 1 0 1 0
Y 1 1 0 0 1 0 0 0 0
Z 0 1 1 0 1 0 0 0 0
- 0 1 0 0 0 0 1 0 1
. 1 1 0 0 0 0 1 0 0
space 0 1 1 0 0 0 1 0 0
* 0 1 0 0 1 0 1 0 0
Code 39
Universal Product
Code
UPC

The National Association of Food Chains officially


adopted the Universal Product Code (UPC) in
1974.
UPC

UPC code is a continuous code since there are no


intercharacter spaces.
UPC

Each UPC label contains 12-digit number.


UPC

The two long bars on the outermost left- and


right-hand sides of the label are called the start
guard pattern and the stop guard pattern,
respectively.
UPC

The start and stop guard patterns consist of a 101


(bar-space-bar) sequence, which is used to frame
the 12-digit UPC number.
UPC

The left and right halves of the label are


separated by a center guard pattern (01010).
UPC

The first six digits of the UPC code are encoded


on the left half of the label (left-hand
characters), and the last six digits of the UPC
code are encoded on the right half (right-hand
characters).
UPC

In UPC Character Set,


there are two binary
codes for each character.
UPC

When a character appears


in one of the first six digits
of the code, it uses
left-hand code.

When the character


appears in one of the last
six digits, it uses a
right-hand code.
UPC

Note that the right-hand


code is simply the
complement of the
left-hand code.
UPC

The first left-hand digit in the UPC Code is called


the UPC number system character, as it identifies
how the UPC symbol is used.
UPC

10 UPC Number System Characters


UPC

The other five left-hand characters are data


characters.
UPC

The first five right-hand characters are data


characters, and the sixth right-hand character is a
check character, which is used for error
detection.
UPC

The decimal value of the number system


character is always printed to the left of the UPC
label, and on most UPC labels the decimal value
of the check character is printed on the right side
of the UPC label.
UPC

A single bar (one bit position) represents a logic


1, and a single space represents a logic 0.
Summary
Bar Codes

1. Code 39
2. Universal Product Code
Bar Codes

Determine the left- and right- hand UPC label


format for the digit 4.
End-of-Slide
THANK YOU FOR LISTENING!

You might also like