The History of Codes

From Smoke Signals to QR Codes: A History of Encoding

Humans have always turned meaning into signals — drums, semaphore, Morse, binary and barcodes. A sweeping history of encoding.

The history of encoding is the history of a single stubborn human wish: to take a thought out of one mind and place it, intact, into another across distance or time. From smoke rising over a hilltop to the QR code on your coffee cup, every method is a variation on the same trick, turning meaning into signal. 🐾

What does it mean to encode something?

To encode is to convert a message into a form that can travel through some medium and be reliably decoded at the other end. The medium might be air, light, paper, copper wire or a grid of black squares. The genius always lies in choosing a small set of distinguishable signals, then agreeing on what they mean.

Fire either burns or it does not. A stone is black or white. A wire carries current or it does not. Encoding is the art of building rich meaning out of such simple, repeatable differences. Our companion piece what is encoding digs into the core idea.

How did smoke, drums and fire carry messages?

The earliest long-distance encoding systems used whatever could be seen or heard for miles. Different cultures raised columns of smoke, beat patterns on drums, or lit chains of signal fires along hilltops to pass warnings faster than any runner could travel.

A beacon on a mountain is a single bit of information: lit or unlit, danger or safety. String beacons across a landscape and you have a network.

These systems were limited but powerful. By varying the number of puffs, the rhythm of the drum, or the arrangement of fires, people could send a small vocabulary of pre-agreed messages over enormous distances. The key insight, that a handful of on-or-off signals can stand for meaning, echoes all the way to modern binary.

How did semaphore make signalling systematic?

By the late 18th and 19th centuries, encoding grew more deliberate. Optical semaphore systems used towers with movable arms, each position representing a letter or code, relayed from tower to tower across a country. Flag semaphore did the same at sea, with a signaller's two flags spelling out messages arm by arm.

Semaphore mattered because it was systematic. Instead of a few fixed signals, it offered a full alphabet, letting operators send arbitrary text rather than pre-agreed warnings. Encoding was becoming a general-purpose tool rather than a set of special cases.

Why was Morse code such a leap?

The telegraph, paired with Morse code, transformed communication in the 19th century. Morse reduced every letter and number to combinations of just two symbols: the dot and the dash, a short pulse and a long one.

  • It used a tiny alphabet of signals, easy to send and detect.
  • It assigned shorter codes to common letters, an early stroke of efficiency.
  • It could travel as electricity down a wire, as sound, or as flashes of light.

Morse proved that any text could be carried by a two-state signal. That is a profound idea, and it links directly to the barcode. Decades later, Norman Woodland drew Morse's dots and dashes in beach sand and stretched them into stripes, an origin we tell in the history of the barcode.

How did punch cards and binary encode the machine age?

As machines took on more work, encoding had to become something a machine could read. The punch card answered that need. A hole either exists in a given position or it does not, and that simple presence-or-absence let cards store instructions and data for looms, tabulators and early computers.

The punch card is essentially binary made physical: hole or no hole, one or zero. Modern computing runs on the same foundation. Every character, image and video you have ever seen is, underneath, a long sequence of ones and zeros. Encoding schemes like binary let us represent anything, provided we agree on the rules for reading it back.

SystemSignal usedBasic unit
Signal fireLight on hilltopLit / unlit
Morse codeElectric pulseDot / dash
Punch cardHole in paperHole / no hole
BinaryVoltage1 / 0

How did barcodes turn data into ink?

The mid-20th century asked a new question: how do you let a machine read data off a physical object quickly and cheaply? The answer was the barcode, which encodes numbers in the widths of printed stripes. In 1974, a pack of gum became the first product scanned at a checkout, a moment we cover in the UPC barcode history.

A barcode is encoding made visible and printable. But a one-dimensional stripe pattern can only hold so much. To pack in more, engineers moved into two dimensions, stacking and gridding the data, as told in the history of 2D barcodes.

How does the QR code fit into this long arc?

The QR code, invented in 1994, is a direct heir to everything before it. It uses a two-state signal, black or white squares, exactly like beacons, Morse and binary. It arranges that signal in a grid, like a punch card turned inside out. And it prints onto physical objects, like the barcode.

What sets it apart is capacity and resilience: a QR code can hold thousands of characters and repair itself when damaged, thanks to the error-correction ideas explored in Reed-Solomon error correction. If you would like to add your own link to this five-thousand-year story, you can create a free QR code whenever you like.

Seen from a distance, smoke signals and QR codes are cousins. Both take something invisible, a message, and make it travel by turning it into a pattern of light and dark. That is the whole history of encoding in a single sentence.

Frequently asked questions

What is encoding in simple terms?

Encoding is converting a message into a form that can travel through some medium and be reliably turned back into the original message at the other end.

What do smoke signals and QR codes have in common?

Both encode meaning as patterns of on-or-off signals, light and dark, that can be sent across distance and decoded by whoever knows the rules.

How did Morse code influence the barcode?

Barcode co-inventor Norman Woodland drew Morse's dots and dashes in beach sand and pulled them into stripes of varying width, inspiring the barcode's design.

Why is binary so central to modern encoding?

Binary uses just two states, one and zero, which are easy for machines to store and detect reliably. Any information can be represented as a sequence of these two symbols.

Is a QR code just a modern version of older encoding methods?

In spirit, yes. It uses a two-state black-and-white signal arranged in a grid, combining ideas from beacons, Morse code, punch cards and barcodes with high capacity and error correction.

Make a QR code the honest way 🐾

Free forever, no tracking, no expiry — generated right in your browser.

🎨 Create a QR code →