The United States Postal Service (USPS) uses POSTNET (Postal Numeric Encoding Technique) to direct mails. POSTNET codes are pasted on mail packets in the form of POSTNET Barcodes. These linear barcodes can be easily scanned using digital scanners. As a result the POSTNET Barcodes help in speeding up sorting and directing mails to correct destination.
POSTNET Codes can be 5, 9 or 11 digits long. The eleven digit long POSTNET code is called POSTNET-11. This is also called "C" code. It contains ZIP Code, ZIP+4 Code, and the delivery point code. POSTNET-11 barcode contains 62 bars in total.
POSTNET uses a sum modulo-10 based checkdigit. All the digits in POSTNET code are added together and the sum is divided by 10. The remainder is then subtracted from 10 to get the checkdigit. For example:
Let's assume a sample code 12345-1234
The sum of all the digits in the code is 25
Dividing the sum by 10 gives us the remainder 5
Subtracting remainder from 10 gets us the checkdigit 5