One of the central ideas of computing was not born in a mathematics laboratory but in a textile workshop. In the early nineteenth century, in Lyon, the weaver and inventor Joseph Marie Jacquard perfected a loom that could produce complicated patterns by following instructions written on a chain of punched cardboard cards. For the first time, a machine carried out a sequence of operations read from an external, interchangeable medium. In other words, it ran a program.
The problem to solve
To understand why the invention mattered, you need to know how brocades and damasks were woven. In a fabric, the lengthwise threads form the warp and the thread passing across them forms the weft. To create a pattern, at every pass of the weft you have to decide which warp threads to raise and which to leave down.
On traditional looms for patterned fabrics, this choice required an assistant, often a boy, who sat above the loom and pulled groups of cords by hand according to a set scheme. The work was slow, tiring and error-prone: one wrong thread ruined the design.
The forerunners
Jacquard did not start from scratch. During the eighteenth century other French inventors had tackled the same problem:
- Basile Bouchon had used a roll of perforated paper to select the needles that controlled the threads.
- Jean-Baptiste Falcon had replaced the roll with a series of rectangular cards tied together, sturdier and easier to change.
- Jacques de Vaucanson, famous for his automata, had designed an automated loom that never caught on.
Jacquard's achievement was to combine and refine these ideas into a reliable mechanism that could be fitted to existing looms and worked without the assistant.
How the mechanism worked
The principle is simple, and that is exactly why it is powerful.
- Each card corresponds to a single pass of the weft, that is, one row of the pattern.
- On each card, a punched position means a given warp thread must be raised; a solid position means it must stay down.
- A set of needles pressed against the card. Where a needle found a hole, it passed through and the connected thread was lifted; where it met cardboard, it stopped.
- After each pass, the chain advanced by one card and the cycle started again.
A complex design could require thousands of cards sewn together in sequence. Changing the pattern simply meant changing the chain.
Binary code before its time
Each position on the card has only two states: hole or no hole. It is a binary encoding, even though nobody called it that at the time. Each card is therefore a row of bits, and the chain of cards is a sequence of instructions. The separation between the machine, which stays the same, and the program, which can be replaced, is a concept we find intact in computers.
The social impact
The new loom greatly increased productivity and reduced the need for auxiliary labour. As often happens with innovations that change work, Jacquard also met hostility from some weavers, who feared losing their jobs. Within a few decades, however, the mechanism spread widely through the European textile industry, and we still speak of "jacquard fabric" for cloth with patterns woven into the weft.
From Lyon to Babbage
The link with computing is not a retrospective interpretation. It was made explicit as early as the nineteenth century.
When Charles Babbage designed his Analytical Engine, he decided to use punched cards modelled on Jacquard's to feed the machine both the operations to perform and the data. Ada Lovelace, commenting on the design, wrote a sentence that became famous: the Analytical Engine weaves algebraical patterns just as the Jacquard loom weaves flowers and leaves.
From cards to memory
Punched cards had a very long career. At the end of the nineteenth century Herman Hollerith used them to process data from the United States census, and for much of the twentieth century they were the normal way to feed programs and data into computers. Generations of programmers prepared decks of cards to hand in at the computing centre.
But the principle goes beyond the physical medium. We can sum it up like this:
| Jacquard loom | Modern computer |
|---|---|
| Loom frame | Hardware |
| Chain of cards | Program |
| Single card | Instruction or row of data |
| Hole / no hole | Bit 1 / bit 0 |
| Changing the chain | Loading another program |
In my work I find this parallel one of the most effective ways to explain to non-specialists what "programming" really means: describing in advance, in a form the machine can read, a sequence of elementary choices.
An important limit
It is also fair to be clear about what the loom did not do. It executed the cards one after the other, always in the same order. It made no decisions based on a result, did not jump to another card when a condition occurred, and computed nothing. It therefore lacked conditional jumps and the ability to process data, the elements that make a computer more than a sequence player. It was precisely these additions that made Babbage's design revolutionary.
In short
- In the early nineteenth century Jacquard perfected, in Lyon, a loom driven by punched cardboard cards.
- Each hole controlled the lifting of a thread: a two-state encoding, similar to bits.
- The separation between the machine and an interchangeable sequence of instructions anticipates the concept of a program.
- Babbage adopted Jacquard's cards for the Analytical Engine, and punched cards remained in use in computers for much of the twentieth century.