Generating barcodes[edit] Disregarding the space, divide the postal code into four subfields (e.g. K1-A-0-B1). Locate the contents of each subfield in the encoding tables below and record the hexadecimal numbers that they correspond to. (e.g. K1-A-0-B1 becomes 32-07-A-C2.) Convert those hex numbers to binary, and add leading zeroes where required. Change the binary numbers into bars. "Zero" bits in the resulting binary numbers correspond to spaces in the barcode, while "one" bits correspond to printed bars, with the least significant bit of each number corresponding to the rightmost bar in each subfield of the barcode. Add an "alignment" bar onto the end of the resulting barcode. Count up the number of bars you have. If you get an even number, add another bar onto the start of the barcode. Here are some examples of encoded postal codes. The colour used in these examples is meant to simulate the actual colour of the ink used to print the barcodes, however it does not exactly match. Select these examples to make them more visible. A1B 2C3: | ||| | || | || || ||| K1A 0B1: | || | |||| | || | | V6B 2R5: | | || || | | | | | ||

Encoding tables[edit] Note that postal codes use only 20 letters; six letters (D, F, I, O, Q, U) are never used. Unused codepoints are indicated with dashes. First and fourth fields (8 bits) 00: –– 01: –– 02: –– 03: –– 04: –– 05: –– 06: –– 07: –– 08: –– 09: –– 0A: –– 0B: –– 0C: –– 0D: –– 0E: –– 0F: –– 10: –– 11: X0 12: V1 13: V3 14: X1 15: V5 16: V6 17: V7 18: –– 19: V2 1A: V0 1B: V4 1C: X2 1D: V8 1E: V9 1F: –– 20: Z1 21: N1 22: L1 23: L3 24: T1 25: L5 26: L6 27: L7 28: W1 29: L2 2A: L0 2B: L4 2C: P1 2D: L8 2E: L9 2F: –– 30: Z3 31: N3 32: K1 33: K3 34: T3 35: K5 36: K6 37: K7 38: W3 39: K2 3A: K0 3B: K4 3C: P3 3D: K8 3E: K9 3F: –– 40: –– 41: X3 42: M1 43: M3 44: X4 45: M5 46: M6 47: M7 48: –– 49: M2 4A: M0 4B: M4 4C: X5 4D: M8 4E: M9 4F: –– 50: Z5 51: N5 52: R1 53: R3 54: T5 55: R5 56: R6 57: R7 58: W5 59: R2 5A: R0 5B: R4 5C: P5 5D: R8 5E: R9 5F: –– 60: Z6 61: N6 62: J1 63: J3 64: T6 65: J5 66: J6 67: J7 68: W6 69: J2 6A: J0 6B: J4 6C: P6 6D: J8 6E: J9 6F: –– 70: Z7 71: N7 72: A1 73: A3 74: T7 75: A5 76: A6 77: A7 78: W7 79: A2 7A: A0 7B: A4 7C: P7 7D: A8 7E: A9 7F: –– 80: –– 81: –– 82: H1 83: H3 84: X9 85: H5 86: H6 87: H7 88: –– 89: H2 8A: H0 8B: H4 8C: –– 8D: H8 8E: H9 8F: –– 90: Z2 91: N2 92: G1 93: G3 94: T2 95: G5 96: G6 97: G7 98: W2 99: G2 9A: G0 9B: G4 9C: P2 9D: G8 9E: G9 9F: –– A0: Z0 A1: N0 A2: S1 A3: S3 A4: T0 A5: S5 A6: S6 A7: S7 A8: W0 A9: S2 AA: S0 AB: S4 AC: P0 AD: S8 AE: S9 AF: –– B0: Z4 B1: N4 B2: C1 B3: C3 B4: T4 B5: C5 B6: C6 B7: C7 B8: W4 B9: C2 BA: C0 BB: C4 BC: P4 BD: C8 BE: C9 BF: –– C0: –– C1: X6 C2: B1 C3: B3 C4: X7 C5: B5 C6: B6 C7: B7 C8: –– C9: B2 CA: B0 CB: B4 CC: X8 CD: B8 CE: B9 CF: –– D0: Z8 D1: N8 D2: E1 D3: E3 D4: T8 D5: E5 D6: E6 D7: E7 D8: W8 D9: E2 DA: E0 DB: E4 DC: P8 DD: E8 DE: E9 DF: –– E0: Z9 E1: N9 E2: Y1 E3: Y3 E4: T9 E5: Y5 E6: Y6 E7: Y7 E8: W9 E9: Y2 EA: Y0 EB: Y4 EC: P9 ED: Y8 EE: Y9 EF: –– F0: –– F1: –– F2: –– F3: –– F4: –– F5: –– F6: –– F7: –– F8: –– F9: –– FA: –– FB: –– FC: –– FD: –– FE: –– FF: –– Second field (5 bits) Third field (4 bits) 00: — 01: — 02: L 03: K 04: M 05: R 06: J 07: A 0: — 1: — 2: 1 3: 3 08: H 09: G 0A: S 0B: C 0C: B 0D: E 0E: Y 0F: — 4: — 5: 5 6: 6 7: 7 10: — 11: V 12: — 13: X 14: T 15: — 16: N 17: — 8: — 9: 2 A: 0 B: 4 18: W 19: — 1A: Z 1B: — 1C: P 1D: — 1E: — 1F: — C: — D: 8 E: 9 F: — No field begins or ends with more than three consecutive 1 bits, guaranteeing that there are never more than six consecutive 1 bits. Guaranteeing the five-bit limit on consecutive 0 bits is achieved by limiting the boundaries of the second and fourth fields to three consecutive 0 bits, and the first and third fields to two consecutive 0 bits: No field contains more than five consecutive 0 bits. Code 81, which would contain six consecutive 0 bits in field 1 or 4, is not used. Field 1 never ends in more than two consecutive 0 bits. Codes that end in three or more consecutive 0 bits encode the letters Z or W, which are not used for the first letter of postal codes. Field 2 may begin or end with at most three consecutive 0 bits. Field 3 never begins with more than two consecutive 0 bits, nor does it ever end with more than one. Field 4 may begin with up to three consecutive 0 bits, and may end with up to five consecutive 0 bits, but is always followed by a 1 bit (the alignment bar). v t e Barcodes Linear barcodes Automatic Car Identification Code 11 Code 39 Code 93 Code 128 Codabar European Article Number GS1 DataBar ITF-14 Interleaved 2 of 5 MSI Barcode Patch Code Pharmacode Plessey Telepen UPC UPC-A MaxiCode Post office barcodes CPC Binary Barcode Facing Identification Mark PostBar POSTNET RM4SCC Intelligent Mail barcode PLANET 2D barcodes (stacked) GS1 DataBar PDF417 2D barcodes (matrix) Aztec Code Data Matrix (Semacode) MaxiCode QR code Polar coordinate barcodes MaxiCode ShotCode Other High Capacity Color Barcode (Microsoft Tag) Technological issues Barcode reader Barcode printer Other data tags RFID Bokode Related topics Supply Chain Management Object hyperlinking Matrix Mobile tagging CueCat Retrieved from "https://en.wikipedia.org/w/index.php?title=CPC_Binary_Barcode&oldid=807402521" Categories: BarcodesCanada PostHidden categories: Articles lacking sources from October 2012All articles lacking sources

Navigation menu Personal tools Not logged inTalkContributionsCreate accountLog in Namespaces ArticleTalk Variants Views ReadEditView history More Search Navigation Main pageContentsFeatured contentCurrent eventsRandom articleDonate to WikipediaWikipedia store Interaction HelpAbout WikipediaCommunity portalRecent changesContact page Tools What links hereRelated changesUpload fileSpecial pagesPermanent linkPage informationWikidata itemCite this page Print/export Create a bookDownload as PDFPrintable version Languages Add links This page was last edited on 27 October 2017, at 18:34. Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization. Privacy policy About Wikipedia Disclaimers Contact Wikipedia Developers Cookie statement Mobile view (window.RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgPageParseReport":{"limitreport":{"cputime":"0.068","walltime":"0.096","ppvisitednodes":{"value":175,"limit":1000000},"ppgeneratednodes":{"value":0,"limit":1500000},"postexpandincludesize":{"value":18361,"limit":2097152},"templateargumentsize":{"value":12,"limit":2097152},"expansiondepth":{"value":6,"limit":40},"expensivefunctioncount":{"value":1,"limit":500},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 55.829 1 -total"," 77.86% 43.468 1 Template:Unreferenced"," 53.83% 30.050 1 Template:Ambox"," 21.92% 12.239 1 Template:Barcodes"," 18.69% 10.437 1 Template:Navbox"]},"scribunto":{"limitreport-timeusage":{"value":"0.021","limit":"10.000"},"limitreport-memusage":{"value":1075020,"limit":52428800}},"cachereport":{"origin":"mw1242","timestamp":"20180206084610","ttl":1900800,"transientcontent":false}}});});(window.RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgBackendResponseTime":74,"wgHostname":"mw1272"});});

view link view link view link view link view link |