Beauty of Codes: Ms. Toni Rose D. Docena

Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

Beauty of Codes

Ms. Toni Rose D. Docena


It is often a word or short phrase that
symbolically assigns a summative,
salient, essence capturing, and/or
evocative attribute for a portion of
CODE language-based or visual data
(Saldaña,2013)

A code is a symbolic way to represent


information.
Hieroglyphics a.k.a the Sacred Writings
Used by Egyptians for written communication
As well as for decorations, commercial and private documents
Roman Numerals were developed to determine the prices of
commodities and services rendered by the Romans. This
system was widely used throughout Europe until the 1600s.
Attribute Code for the clothing item’s content.
It contains information on the fabric composition and country
where the item was manufactured.
Musical Scores DNA and Genetic Codes
Useful for easy recognition and detection of
Identification materials and for tracking and inventory of products
Numbers or documents (Kirtland, 2001).

Numeric Identification Numbers

Alphanumeric Identification Numbers


A check digit or a check sum is used to
verify errors on identification numbers.
Check
Digits A check digit is a single number that is
generated using the other characters
from the identification number.
UPC is the barcode which is the identification
number of a retail item such as a grocery
Universal
product.
Product
Code It consists of 12 digits, the first 11 characters
specify the source of the item and the product
number. The 12th digit is the check digit.
Check Sum procedure
Steps A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12

UPC 7 7 0 8 3 2 3 0 8 5 4
Multiply each odd- 3 1 3 1 3 1 3 1 3 1 3
numbered position
by 3
Results 21 7 0 8 9 2 9 0 24 5 12
Add the results 97
Subtract the
resulting sum from
the number that is a 100 – 97 = 3 (check digit)
multiple of 10 (100 is the nearest multiple of 10 to 97)
nearest to it

UPC with check digit 7 7 0 8 3 2 3 0 8 5 4 3


0 58000 00127 7

Steps A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12


UPC 0 5 8 0 0 0 0 0 1 2 7 7
Multiply each 3 1 3 1 3 1 3 1 3 1 3 1
odd-numbered
position by 3
Results 0 5 24 0 0 0 0 0 3 2 21 7
Add the results 62
UCP with check
digit
Since 62 does not end in zero, an error is detected.
0 58000 00127 x
Steps A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12
UPC 0 5 8 0 0 0 0 0 1 2 7
Multiply each 3 1 3 1 3 1 3 1 3 1 3
odd-numbered
position by 3
Results 0 5 24 0 0 0 0 0 3 2 21
Add the results 55
Subtract the
resulting sum
from the number
that is a multiple 60– 55 = 5
of 10 nearest to
it
Suppose the packaging of a grocery item was damaged in such a
way that the fifth digit of a 12 digit UPC was scratched off but the
remaining 11 digits show 8 8 0 7 2 3 0 3 5 8 4.

Determine the correct UPC


Steps A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12
UPC 8 8 0 7 x 2 3 0 3 5 8 4
Steps A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12
UPC 8 8 0 7 x 2 3 0 3 5 8 4

Multiply each odd- 3 1 3 1 3 1 3 1 3 1 3 1


numbered position
by 3

Results 24 8 0 7 3x 2 9 0 9 5 24 4
Add the 92 + 3x = 110 (sum must be a number that ends with zero)
results 3x = 110 – 92
3x = 18
x = 6 (fifth digit)
UPC 8 8 0 7 6 2 3 0 3 5 8 4
US Postal Money Orders

The identification number is 11 digits long.

The first 10 digits are the document number, and the last digit is
the check digit.

The check digit is the remainder when the sum of the digits in the
identification number is divided by 9. (Modulo 9)
A11= (A1 +A2 +A3 +A4 +A5 +A6 +A7 +A8 +A9 +A10) (mod 9)

Consider the identification number 21349002734, determine


whether its check digit is correct.
A11= (A1 +A2 +A3 +A4 +A5 +A6 +A7 +A8 +A9 +A10) (mod 9)

A11= (2 + 1 +3 +4 +9 +0 +0 +2 +7 + 3) (mod 9)

= 31 (mod9)

A11= 4 since 31 / 9 = 3 r. 4
Determine the check digit of the postal money order with
identification number 2415532983

A11= (A1 +A2 +A3 +A4 +A5 +A6 +A7 +A8 +A9 +A10) (mod 9)

A11= (2 + 4 +1 +5 +5 +3 +2 +9 +8 + 3) (mod 9)

= 42 (mod9)

A11= 6 since 42 / 9 = 4 r. 6
ELABORATE
Let’s Try

1. Determine the check digit for the postal money order


with the identification numbers 5936024813.

2. Is 31246708694 a valid postal money order


identification number?

3. Is this a valid UPC 0 49000 04481 2?


4. Determine the check digit of the given UPC 0 11203
12282

5. A damaged packaging of a grocery item shows the UPC


2 71200 1005 2 wherein the 7th digit is missing.

Determine the 7th digit.


Bar Code

A set of vertical bars (long and short) and spaces which provide an
indispensable tool for tracking a variety of data from pricing
inventory.
Bar Code
A set of vertical bars (long and short)
and spaces which provide an
indispensable tool for tracking a
variety of data from pricing
inventory.
ZIP + 4 code
ZIP code of the US Postal Service
Which started in 1983,
contains 52 long and short vertical
bars.
The long bars at the beginning and the end of the ZIP+4 code serve
as guard bars of the remaining 50 bars.

The 50 bars are divided into blocks of 5 and each block contains two
long bars and three short bars.

Each block represents a single digit and the 10th digit is used for
error correction.
ZIP + 4 code is denoted by: A1A2A3A4A5A6A7A8A9A

The check digit is the sum of the digits from A1 to A and


must end with 0 (divisible by 10).

An error occurs if a block of vertical bars doesn’t contain


exactly 2 long bars and 3 short bars.
3 2 2 3 1 9 8 7 1 4 Check digit

Separate the guard bars and divide the remaining bars in


blocks of 5.

Label the blocks according to their corresponding digits.

Verify the code: Sum = 40


The sum ends in zero therefore there is no error.
Detect the error and correct the ZIP+4 code

5 5 4 3 5 9 9 x 2 10 Check digit

Sum must be a multiple of 10 Correct ZIP+4 code

Sum = 52 + x
60 = 52 + x
60 – 52 = x 5 5 4 3 5 9 9 8 2 10
8=x
Elaborate
Part 1.
Using digit sum (Ds), determine if the following numbers are divisible
by 9 by writing DBN. If it’s not divisible by 9, determine the remainder.

1. 3, 987
2. 563
3. 528,249
4. 732, 465
5. 15,874
Part 2. Determine what is asked in every item and show your
complete process.

1. Determine the check digit for the postal money order


with the identification numbers 4936024813.

2. Is 32245708192 a valid postal money order identification


number?

3. Is this a valid UPC 036940300213?


4. Determine the check digit of the given UPC 1 0302
212281

5. A packaging of a box of kitchen tools was damaged


such that the 7th digit of the 12-digit UPC is no longer
readable but the remaining 11 digits were 23015691357
Determine the 7th digit.
Part 3. Determine the ZIP+4 code and verify if the check
digits are valid.

You might also like