how to read the postal bar codes on letters
when you receive a letter you will see a post office bar code printed near the bottom of the letter under your name and address.
the bar code is in two formats. the older format is your 9 digit zip code plus one digit for a check sum. the newer format contains an 11 digit zip code plus one digit for a check sum. im not sure what the extra 2 digits are for. the first form has 52 bars, and the 2nd form has 62 bars.
the tall bars are 1/8 inch tall (3 mm) and the short bars are 3/32 inch tall (1 mm). all the bar codes stacked together are either 2 3/8 inches (61 mm) or 2 13/16 inches (72 mm) long depending on the format.
to read the postal bar codes its done like this.
the first and last bars which are always tall bars "|" are always ignored. they are used for the hardware to identify where the barcode starts and stops.
to read each digit of the zip code we start grabbing bar codes in groups of 5 bars after the 1st bar which is ignored.
for any of the bars if it is a tall bar give it the following values. if its a short bar give it a value of zero. add the values of the tall bars up to get the value of that digit.
1st bar - 7 2nd bar - 4 3rd bar - 2 4th bar - 1 5th bar - 0 (yep thats zero)
add up the 5 lines and you have the value for that digit. the only odd ball case if if the 5 lines add up to 11 then use zero for that digit
0 ||... 1 ...|| 2 ..|.| 4 .|..| 5 .|.|. 6 .||.. 7 |...| 8 |..|. 9 |.|..
my tempe zip code is
so the bar code should say
the extra digit at the end which is a "2" is a check sum.
to caculate the check sum of a zip code add up all the digits in your zip code. take the last digit in the sum and subtract it from 10 to get the check sum.
for my tempe zip code of
8 5 2 8 1 5 6 0 3 ----- 38
the sum is 38 for my zip code.
take the last digit which is 8 and subtract it from 10 to get the check sum
so my check sum for my zip code is 2.
the 11 digit bar codes also have a check sum thats caculated the same way. but im not sure which digit is the check sum