WOLFRAM|DEMONSTRATIONS PROJECT

The POSTNET Bar Code

​
colors
check your answer
show answer
show key
mode
encode
decode
reset
next fixed example
random example
Enter digits to see the POSTNET bar code.
​
If[Mod[10-,10]0,You have a valid POSTNET number.,Your check
digit is not correct.]
​
The POSTNET bar code, used by the U. S. Postal Service, is an example of a binary code. Each digit 0–9 is assigned a 5-digit binary sequence consisting of two 1's and three 0's. That sequence is then displayed as a sequence of bars, with shorter bars representing zeros and taller bars representing ones. This Demonstration lets you encode a 9-digit number along with its check digit, as well as decode a given bar code. Six fixed examples are included for decoding. The color option makes it easier to see where one encoded digit ends and the next begins.