0% found this document useful (0 votes)
76 views26 pages

Bar Codes Module1

This document provides information about a lesson on barcodes presented by Mrs. Marie Ann S. Gonzales at Laguna State Polytechnic University Sta. Cruz Campus for the academic year 2019-2020. The lesson defines barcodes and their parts, explains how to calculate the check digit in a barcode, demonstrates how to create a barcode in Microsoft Excel, and discusses cooperative learning in group activities. Key points covered include the history and development of barcodes, their uses and benefits, and how barcodes encode numeric data using varying line thicknesses.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views26 pages

Bar Codes Module1

This document provides information about a lesson on barcodes presented by Mrs. Marie Ann S. Gonzales at Laguna State Polytechnic University Sta. Cruz Campus for the academic year 2019-2020. The lesson defines barcodes and their parts, explains how to calculate the check digit in a barcode, demonstrates how to create a barcode in Microsoft Excel, and discusses cooperative learning in group activities. Key points covered include the history and development of barcodes, their uses and benefits, and how barcodes encode numeric data using varying line thicknesses.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 26

Laguna State Polytechnic University

Sta. Cruz Campus


A. Y. 2019 – 2020

Number Theory
Barcodes
Module
Jesster U. Belen

Renz Vyron J. Tec

MAED – Mathematics

Mrs. Marie Ann S. Gonzales

BARCODES
Pre-Assessment

Direction: Encircle the letter of the correct answer.

1. It is a method of representing data in a visual, machine-readable form.


a. Morse Code c. Digital Code
b. Bar Code d. Number Code
2. He worked at the Pennsylvania Railroad and became aware of the
need to automatically identify railroad cars.
a. Bernard Silver c. David Collins
b. Norman Joseph Woodland d. Henry Tyler
3. A graduate student at Drexel Institute of Technology in Philadelphia,
Pennsylvania, US overheard the president of the local food chain, Food
Fair, asking one of the deans to research a system to automatically
read product information during checkout.
a. Bernard Silver c. David Collins
b. Norman Joseph Woodland d. Henry Tyler
4. The presence of a bar is equivalent to a _______.
a. 1 c. 3
b. 2 d. 0
5. It is the first six digits of the UPC number.
a. Product Number c. Item Number
b. Identification Number d. Check Number
6. It is a narrow gap followed by a narrow line, then a narrow gap, a
narrow line and a final narrow gap.
a. Beginning Symbol c. End Symbol
b. Middle Symbol d. Check Symbol
7. What does UPC stands for?
a. Universal Price Code
b. Unified Price Code
c. Universal Product Code
d. Unified Product Code
8. From the barcode 639382000393, which is the check digit?
a. 6 c. 2
b. 9 d. 3
9. In how many blocks of space does the scanner divide the barcode that
is according to black fillings into it?
a. 5 c. 7
b. 6 d. 8
10. What should be the check digit in the barcode 01234567890?
a. 5 c. 7
b. 6 d. 8

Barcodes
Learning Objectives

At the end of the lesson, the students should be able to do the


following with at least 80% proficiency:

1. Define and identify the parts of a barcode.

2. Solve for the check digit in a barcode.

3. Create a barcode using Microsoft Excel

4. Show cooperation in group activities.

Assigned Reading

A barcode (also spelled bar code) is a


method of representing data in a visual,
machine-readable form. Initially, barcodes
represented data by varying the widths and
spacing of parallel lines.

These barcodes, now commonly referred


to as linear or one-dimensional (1D), can be scanned by special optical
scanners, called barcode readers. Later, two-dimensional (2D) variants were
developed, using rectangles, dots, hexagons and other geometric patterns,
called matrix codes or 2D barcode.

History of Barcodes

In 1948 Bernard Silver, a graduate student at


Drexel Institute of Technology in Philadelphia, Pennsylvania, US overheard
the president of the local food chain, Food Fair, asking one of the deans to
research a system to automatically read product information during checkout.
Silver told his friend Norman Joseph Woodland about the request, and they
started working on a variety of systems. Their first working system used
ultraviolet ink, but the ink faded too easily and was expensive.

On 20 October 1949, Woodland and Silver filed a patent application for


"Classifying Apparatus and Method", in which they described both the
linear and bull's eye printing patterns, as well as the
mechanical and electronic systems needed to read the
code. The patent was issued on 7 October 1952 as US
Patent 2,612,994

David Collins worked at the Pennsylvania


Railroad and became aware of the need to automatically
identify railroad cars. Immediately after receiving his master's degree from
MIT in 1959, he started work at GTE Sylvania and began addressing the
problem.

He developed a system called KarTrak using blue and


red reflective stripes attached to the side of the cars, encoding
a six-digit company identifier and a four-digit car number. Light
reflected off the stripes was fed into one of two
photomultipliers, filtered for blue or red.

The very first scanning of the


now-ubiquitous Universal Product
Code (UPC) barcode was on a pack
of Wrigley Company chewing gum in
June 1974.

And later on, linear barcodes


are used in different stores. Until such time, 2D barcodes are created for
faster transaction.
Uses and Benefits

Barcodes are widely used around the


world in many contexts. In stores, UPC barcodes
are pre-printed on most items other than fresh
produce from a grocery store. This speeds up
processing at check-outs and helps track items
and also reduces instances of shoplifting
involving price tag swapping, although shoplifters
can now print their own barcodes.

Barcodes are widely used in the healthcare


and hospital settings, ranging from patient
identification (to access patient data, including
medical history, drug allergies, etc.) to creating
SOAP Notes with barcodes to medication
management.

They can also be used to keep track of objects and people; they are
used to keep track of rental cars, airline luggage, nuclear waste, registered
mail, express mail and parcels.

2D barcodes can embed a hyperlink to a web page. A mobile device


with an inbuilt camera might be used to read the pattern and browse the
linked website, which can help a shopper find the best price for an item in the
vicinity.
In point-of-sale management, barcode systems can provide detailed
up-to-date information on the business, accelerating decisions and with more
confidence. For example:

• Fast-selling items can be identified quickly and automatically


reordered.

• Slow-selling items can be identified, preventing inventory build-up.

Barcodes are very useful in logistics and supply chain management.

• When a manufacturer packs a box for shipment, a Unique Identifying


Number (UID) can be assigned to the box.

• A database can link the UID to relevant information about the box; such
as order number, items packed, quantity packed, destination, etc.

• When the price of an item changes, you only need to update the
database in the computer, and not the items themselves.

• Their use greatly reduces errors, allowing easy inventory checks.

• It protects against customers who change the price labels.

For more information, visit this site https://en.wikipedia.org/wiki/Barcode.

How to Read Barcodes and Its Application to Number Theory

A bar code encodes a sequence


of digits (or letters) as a series of light
and dark bars. The bars act like bits in
a binary encoding -- the presence of a
bar is equivalent to a "1", and the
absence of a bar is equivalent to a "0".
So for each digit, a short bit string is
chosen to represent that digit.

The bar code is simply these bit strings put together and converted to
bars. Two (or more) active bits next to each other correspond to a wider bar ,
not two bars next to each other. The beginning and end symbols are two long
narrow lines with a narrow gap between them. The middle symbol is a narrow
gap followed by a narrow line, then a narrow gap, a narrow line and a final
narrow gap. The digits in UPC are encoded into a sequence of lines and gaps
in the following manner.

ITS ONLY OPPOSITE 0 = 3-2-1-1


1 = 2-2-2-1
2 = 2-1-2-2
3 = 1-4-1-1
4 = 1-1-3-2
MIDDL

5 = 1-2-3-1
6 = 1-1-1-4
E

7 = 1-3-1-2
8 = 1-2-1-3
9 = 3-1-1-2

Something to notice:
All of these encodings seem to add up to 7

So the scanner divides the barcode


into 7 blocks of space and according to
black fillings into it, it identifies the
numbers associated with it. Now once the
numbers are identified, next step is
reading the numbers printed just below the
barcode.

Decoding Bar Codes


Identify the four widths of the bars. Each vertical bar (black or white)
can have one of four different widths. Going from thinnest to thickest, these
will be described as widths 1, 2, 3, or 4 for the rest of this method.

Write down the thickness of the left


hand bars. Start with the bars on the left
hand side, between the longer bars on the left
and the longer bars in the center. Begin with
the first white bar on the left hand side, and
measure the thickness of each bar, black and
white. Each digit in the 12-digit number you're
trying to find is encoded using four bars. 

Do the same for the right-hand side, but start with a black bar

Decode the bar widths into actual numbers.

For more information, visit this site https://www.wikihow.com/Read-12-


Digit-UPC-Barcodes.

Suppose we have this barcode


The manufacturer identification
number is the first six digits of the UPC
number -- 639382. The next five digits --
00039 -- are the item number. A person
employed by the manufacturer, called the
UPC coordinator, is responsible for assigning
item numbers to products, making sure the same code is not used on more
than one product, retiring codes as products are removed from the product
line, etc.

The last digit of the UPC code is called a check digit. This digit lets the
scanner determine if it scanned the number correctly or not. Here is how the
check digit is calculated for the other 11 digits, using the code 63938200039
wherein the check digit is 3. We’re going to use Modulo 10.

Two Methods in Determining if the Check Digit is Correct.

1st Method

Step 1

Add together the value of all of the digits in odd positions (digits 1, 3, 5, 7, 9
and 11).

 6 + 9 + 8 + 0 + 0 + 9 = 32

Step 2

Multiply that number by 3.

32 * 3 = 96

Step 3

Add together the value of all of the digits in even positions (digits 2, 4, 6, 8
and 10).

3 + 3 + 2 + 0 + 3 = 11

Step 4
Add this sum to the value in step 2.

96 + 11 = 107

Step 5

Take the number in Step 4. To create the check digit, determine the number
that, when added to the number in step 4, is a multiple of 10.

107 + 3 = 110 

The check digit is therefore 3.

This is actually 110 mod 10 = 0

11 10
10 – [(3∑ ai + ∑ ai) mod 10] mod 10
i=1 i=2

11
3∑ ai = 96 (Odd Positions)
i=1

10

∑ ai = 11 (Even Positions)
i=2

10 – [ (96 + 11 ) mod 10] mod 10

10 – (107 mod 10) mod 10

10 – 7 mod 10

10 – 7 = 3 (Check digit)

2nd Method

Step 1

Add up all the digits except the check digit.

6 + 3 + 9 + 3 + 8 + 2 + 0 + 0 + 0 + 3 + 9 = 43

Step 2

Add the digits on the odd positions and multiply it by 2.


6 + 9 + 8 + 0 + 0 + 9 = 32

2(32) = 64

Step 3

Add together the sum from Step 1 and Answer from Step 2.

43 + 64 = 107

Step 4

Take the number in Step 3. To create the check digit, determine the number
that, when added to the number in step 4, is a multiple of 10.

107 + 3 = 110 

The check digit is therefore 3.

For more information, watch and visit https://www.youtube.com/watch?


v=XPuTZMp-HE8&t=3s.

Assigned Writing

Try This!

Solve for the Check digit of the barcode:

1. 2.
Activity 1

Identify the Manufacturer ID number and Item Number of the


following barcodes.

1.

2.
Activity 2

Determine if the following barcode has an error using the check digit.

1.

2
Activity 3

Identify and solve for the check digit of the following barcodes.

1.

2.
For Further Study

Research and summarize the readings on the


following sites showing how to read the barcodes.

 https://science.howstuffworks.com/innovation/
repurposed-inventions/2d-barcodes.htm
 http://www.waspbarcode.com/buzz/barcode/
 https://www.explainthatstuff.com/how-data-matrix-codes-work.html
 http://www.masabi.com/2011/03/04/connecting-the-dots-an-
introduction-to-2d-barcodes-3/
 https://www.gs1.org/barcodes/2d
Assessment

1. These barcodes represented data by varying the widths and spacing of


parallel lines.
a. Linear Barcode c. 2D Barcode
b. Matrix Barcode d. QR Barcode
2. What patent did Woodland and Silver made?
a. US Patent 2,612,992 c. US Patent 2,612,994
b. US Patent 2,612,993 d. US Patent 2,612,995
3. What product was the very first scanning of the now-ubiquitous
Universal Product Code (UPC) barcode?
a. chocolate c. pencil
b. gum d. paper
4. The absence of a bar is equivalent to a _______.
a. 1 c. 3
b. 2 d. 0
5. It is the six digits after the middle symbol of the UPC number.
a. Product Number c. Item Number
b. Identification Number d. Check Number
6. What modulo is used in solving the check digit in a barcode?
a. Modulo 5 c. Modulo 10
b. Modulo 7 d. Modulo 12
7. Which of the following would give an interpretation of 5 in a scanner?
a. 2-2-2-1 c. 1-1-3-2
b. 2-1-2-2 d. 1-2-3-1
8. From the barcode 022334545453, which is the check digit?
a. 6 c. 2
b. 9 d. 3
9. Using blue and red reflective stripes attached to the side of the cars,
encoding a six-digit company identifier and a four-digit car number,
what is this called?
a. KarTrak c. KurTrak
b. CarTrak d. CurTrak
10. What should be the check digit in the barcode 61414100003?
c. 5 c. 7
d. 6 d. 8
Key To Correction Pre – Assessment (Barcodes)

1. B.

2. C.

3. A.

4. A.

5. B.

6. B.

7. C.

8. D.

9. C.

10. A.
Key To Correction Assign Writing (Barcodes)

Solve for the Check digit of the barcode:

1.

11 10
10 – [(3∑ ai+ ∑ ai) mod 10] mod 10
i=1 i=2

11
3∑ ai = 42 (Odd Positions)
i=1

10

∑ ai = 16 (Even Positions)
i=2

10 – [(42 + 16) mod 10] mod 10


10 – (58 mod 10) mod 10
10 – 8 mod 10
10 – 8 = 2 (Check digit)

2.

11 10
10 – [(3∑ ai+ ∑ ai) mod 10] mod 10
i=1 i=2

11
3∑ ai = 78 (Odd Positions)
i=1

10

∑ ai = 20 (Even Positions)
i=2
10 – [(78 + 20) mod 10] mod 10
10 – (98 mod 10) mod 10
10 – 8 mod 10
10 – 8 = 2 (Check digit)

Key To Correction Activity 1 (Barcodes)

To determine the Manufacturer ID number and Item Number of the barcodes,


we need to know the anatomy/parts of a barcode.

Manufacturer ID number Item Number


1 022334 54545
2 012345 67895
Key To Correction Activity 2 (Barcodes)

1.

022334545453
11 10
10 – [(3∑ ai+ ∑ ai) mod 10] mod 10
i=1 i=2

11
3∑ ai = 60 (Odd Positions)
i=1

10

∑ ai = 17 (Even Positions)
i=2

10 – [(60 + 17) mod 10] mod 10


10 – (77 mod 10) mod 10
10 – 7 mod 10
1 – 7 = 3 (Check digit)

Therefore the check digit is correct.

2.

836049290175
11 10
10 – [(3∑ ai+ ∑ ai) mod 10] mod 10
i=1 i=2
11
3∑ ai = 81 (Odd Positions)
i=1

10

∑ ai = 22 (Even Positions)
i=2

10 – [(81 + 22) mod 10] mod 10


10 – (103 mod 10) mod 10
10 – 3 mod 10
10 – 3 = 7 (Check digit)

Therefore the check digit is incorrect, it should be 7.

Key To Correction Activity 3 (Barcodes)

1.

12360105707
11 10
10 – [(3∑ ai+ ∑ ai) mod 10] mod 10
i=1 i=2

11
3∑ ai = 54 (Odd Positions)
i=1

10

∑ ai = 14 (Even Positions)
i=2

10 – [(54 + 14) mod 10] mod 10


10 – (68 mod 10) mod 10
10 – 8 mod 10
10 – 8 = 2 (Check digit)

Therefore the check digit should be 2.

2.
12345678901
11 10
10 – [(3∑ ai+ ∑ ai) mod 10] mod 10
i=1 i=2

11
3∑ ai = 78 (Odd Positions)
i=1

10

∑ ai = 20 (Even Positions)
i=2

10 – [(78 + 20) mod 10] mod 10


10 – (98 mod 10) mod 10
10 – 8 mod 10
10 – 8 = 2 (Check digit)

Therefore the check digit should be 2.

Key To Correction Assessment (Barcodes)

1. A.

2. C.

3. B.

4. D.

5. C.

6. C.

7. D.

8. D.

9. A.

10. D.
References:

https://www.irishtimes.com/news/science/that-s-maths-how-barcodes-and-qr-
codes-work-1.2055593

http://mathforum.org/library/drmath/view/56033.html

https://en.wikipedia.org/wiki/Barcode

https://www.quora.com/What-is-the-mathematics-behind-bar-codes

http://www.ams.org/publicoutreach/feature-column/fcarc-barcodes2

https://www.futurelearn.com/courses/maths-puzzles/0/steps/14004

https://prezi.com/6qbj5jzoh9tp/the-math-behind-bar-codes/

https://www.wikihow.com/Read-12-Digit-UPC-Barcodes

https://science.howstuffworks.com/innovation/repurposed-inventions/2d-
barcodes.htm

http://www.waspbarcode.com/buzz/barcode/
https://www.explainthatstuff.com/how-data-matrix-codes-work.html

http://www.masabi.com/2011/03/04/connecting-the-dots-an-introduction-to-2d-
barcodes-3/

https://www.gs1.org/barcodes/2d

You might also like