Looms Taught Us to Store, Share, and Run Logic
Last weekend, on the way to the beach, we stopped at a textile and quilting museum I did not know existed. It was a former schoolhouse between a llama farm and an abandoned lot. My kids are six and eight. They made a beeline for the fairy tale exhibit: dragon quilts, Three Little Pigs in stuffed felt, robes and costumes the community had sewn by hand.
I ended up at the floor loom. The curator was explaining how pedals lift specific warp threads while the others stay down, and I stopped hearing her. Up and down. On and off. She was describing binary, and the machine was executing it. My kids came over and tried the treadles, passed the shuttle, beat the weft into place. They saw the patterns forming. I saw a state machine.
The loom is not a metaphor for a computer. It is a computer, and the history of computing I learned (Babbage, Turing, von Neumann) is missing most of the story.
The drawboy
Around 150 BCE, in what is now Chengdu, China, a child sat on top of a wooden frame. Below him, a weaver worked the shuttle . The child’s job was to read a sequence of color-coded knotted cords hanging at the back of the loom and pull the correct warp threads for each pass of the weft. Hour after hour, row after row, perched above the clatter of the frame, squinting at knots.
Deep Dive: What are warp and weft?
Imagine stretching a dozen rubber bands between your hands, all parallel, pulled tight. Those are the warp threads: the fixed, tensioned lines that define the structure. Now take a single ribbon and weave it over one rubber band, under the next, over, under, all the way across. That ribbon is the weft.
Every textile ever made is warp and weft. The warp stays still. The weft moves. At each crossing, one choice: does the weft go over the warp thread or under it? A plain weave alternates: over, under, over, under. A twill shifts the pattern by one each row, creating the diagonal you see in denim. A satin skips several warp threads, which is why it feels smooth (fewer crossing points means less friction against your skin).
The notation weavers use to write this down is called a weave draft, and if you saw one you would swear it was a bitmap. It is a grid of filled and empty squares, each square representing one intersection of warp and weft: filled means the warp is on top, empty means the weft is. Change the pattern of fills, and you change the fabric. The oldest surviving drafts predate computer screens by a few thousand years.
The machine was called a ti hua ji , a figured loom. It controlled 10,470 warp threads through 86 programmable modules. We know this because archaeologists found miniature loom models in a Han Dynasty tomb near Chengdu in 2013, the oldest direct evidence of pattern looms anywhere in the world.
The pattern was stored in knotted cords. Change the cords, change the program. The drawboy read the cords and executed the instructions. The loom produced the output. It is difficult to imagine a less reliable processor, but for two thousand years this was the best one available.
When the drawboy lifted the wrong thread, the result was a permanent defect in the cloth, a bit flip woven into the fabric.
I assumed Jacquard invented programmable weaving. He did not. In 1804, Joseph-Marie Jacquard patented a mechanism in Lyon that replaced the drawboy with punched pasteboard cards. A hole in the card meant “lift this thread.” No hole meant “leave it.” He replaced a child labor with punched cards.
Deep Dive: How punched cards actually work
A Jacquard card is a stiff rectangle of pasteboard with a grid of positions where holes can be punched. Each position on the card corresponds to one warp thread on the loom. The card is pressed against a row of horizontal needles. Where there is a hole, the needle passes through and the corresponding warp thread stays down. Where there is no hole, the needle is pushed back, which lifts a hook that raises the warp thread.
One card controls one row of the pattern. Chain a thousand cards together, lace them into a loop, and you have a thousand-row program hanging from the ceiling. The chain can weigh several kilograms. When a card tears mid-run, the pattern breaks, and the weaver has to find the damaged card, replace it, and restart from that row.
The weaver presses a treadle to advance the chain. The next card drops into position. The needles read it. The shed opens. The shuttle passes through. The weaver presses the treadle again. About two cycles per second, with the weaver as the clock.
The cards are removable. Swap the card chain, and the same loom produces a completely different fabric. Software separate from hardware, in pasteboard and metal hooks, in 1804. Meanwhile, Beethoven was writing piano sonatas.
7-bit ASCII in string
The Inca quipu is a recording device made of knotted cords: cotton or camelid fiber, dyed in dozens of colors, hanging from a primary cord. Some quipus have a few pendant cords. Some have several thousand. Around 1,400 survive in museum and university collections worldwide.
Pick up a single cord. Its material is cotton or camelid fiber: one binary choice. Its spin direction is S-twist or Z-twist: another. The ply direction, the color, how it attaches to the primary cord, which way the knot is tied, what type of knot: seven binary choices in all.
Seven binary attributes. Two to the seventh power is 128. Each cord could be one of 128 things. That is 7-bit ASCII, and the Inca had it 500 years before anyone built a telegraph.
Deep Dive: Quipus as a database, explained with SQL
You are the Inca tax collector for a valley with six villages. You need to record how many llamas, how much corn, and how many textiles each village owes.
The primary cord is your table name. You hold it horizontally. From it, you hang pendant cords in groups, separated by gaps. Each group is a village.
Within a group, each pendant cord is a record. Its color tells you the data type: brown for llamas, yellow for corn, red for textiles. The knots on the cord encode the number using a base-10 positional system. A figure-eight knot at the bottom means “1.” Long knots (with multiple turns) encode 2 through 9. Simple overhand knots higher on the cord represent tens, hundreds, thousands, the same way digits work in a number.
If a village owes 342 llamas, the brown cord has three single knots in the hundreds position, four in the tens position, and a long knot with two turns at the bottom.
Subsidiary cords branch off pendant cords like foreign keys. If the llama cord needs to break down “342 llamas” into “200 breeding stock” and “142 yearlings,” two subsidiary cords hang from the llama pendant, each with its own knot count.
The physical structure IS the schema. The Inca did not need a query language because the query is built into the object: pull the third group, find the brown cord, read the knots. That is a SELECT llamas FROM valley_tax WHERE village_id = 3.
The primary cord functions as a table header. Each pendant cord is a record. Subsidiary cords (cords attached to pendant cords) are related records in a child table, creating a hierarchical tree that can nest 10 to 12 levels deep. Cord groups, separated by spacing on the primary cord, define categories. The physical structure of a quipu maps onto the architecture of a database.
Gary Urton at Harvard catalogued more than 900 surviving quipus and proposed the 7-bit binary encoding. One of his undergraduates, Manny Medrano, took six quipus and a colonial-era Spanish census document from the same region and started comparing them. The document was a 1670 census from the Santa Valley on the Peruvian coast, listing the names, ages, and social status of 132 people. Medrano lined the census up against the cords.
The cord colors matched the census categories. The knot positions matched the population counts. The pendant groupings matched the way the census organized people by social rank. Cord by cord, a freshman was reading the names of people who had been recorded in string four hundred years earlier. The quipus were not abstract data. They were a census of specific human beings, and someone in the 17th century had filed them the way we file a spreadsheet.
Twenty-two centuries after the drawboy read knotted cords on a Chinese loom, a college student was decoding information stored in thread by the same method. The medium had not changed. The people reading it had just forgotten how.
Two opcodes
All bobbin lace reduces to two atomic operations.
Cross: the right bobbin passes over the left. Twist: the left bobbin passes over the right. C and T. Those are the only two instructions.
Every pattern ever made in bobbin lace is a program composed of C and T applied to groups of four threads. Half stitch: CT. Cloth stitch: CTC. Whole stitch: CTCT.
Deep Dive: Cross and Twist: the two-opcode instruction set
A lacemaker in 17th-century Flanders sat at a pillow for ten hours a day, working by candlelight, managing dozens of bobbins simultaneously. Every piece of lace your grandmother ever owned was generated by the same two operations this woman performed thousands of times per sitting.
Take four threads hanging side by side from a pillow. Number them 1, 2, 3, 4. Each thread is wound around a small wooden bobbin.
Cross (C): The right bobbin of each pair passes over the left. Thread 2 crosses over 1. Thread 4 crosses over 3. New order: 2, 1, 4, 3.
Twist (T): The center pair swaps. Thread 1 (now in position 2) crosses over thread 4 (now in position 3).
Everything else is composition. CT (Cross then Twist) makes an open mesh, the transparent part of lace. CTC (Cross, Twist, Cross) packs the threads tight, the solid areas. CTCT (all four) makes the dense ground that holds the pattern together.
A lace pattern applies these to overlapping groups of four threads across a grid, shifted by two each step. The interactions cascade across the fabric, one group at a time, following a paper pattern pinned to the pillow that tells the lacemaker where to place pins and which stitch to use next.
Veronika Irvine proved it: two operations generate every possible lace pattern. She built a mathematical model that algorithmically produces lace across all 17 planar symmetry groups from nothing but C and T.
Bobbin lace is not alone. Weaving drafts are declarative specifications where the fabric pattern is computed from three inputs. Knitting notation is sequential, opcode-by-opcode, row by row. Crochet diagrams are flowcharts. Each of these formal systems was invented by someone who had never heard of a computer.
The forgetting
People kept seeing the connection between textiles and computation, and people kept forgetting it. On October 15, 1862, George Boole wrote to Charles Babbage: “I shall endeavour to acquaint myself with Menabrea’s paper and the principle of the Jacquard loom.” He had formalized Boolean algebra eight years earlier. He died two years after writing the letter, reaching toward the loom when he ran out of time.
The idea of storing instructions in a physical object traveled the way silk traveled: inside the product itself. A bolt of Chinese figured silk arriving in a 9th-century Baghdad market was a program you could hold in your hands. Knotted cord, punched card, cam-and-peg: different storage media for the same idea, carried along the same trade routes as the cloth.
Konrad Zuse is the genuine exception. He built the Z1 in his parents’ Berlin apartment between 1936 and 1938, punching 8-bit binary holes into discarded 35mm movie film from the German studio UFA. He had never heard of Babbage. He did not know about the Jacquard loom. No silk road ran to Berlin in 1936. He had old movies. That his story surprises us is itself the evidence: real independent invention is rare, which is how we notice it.
When the connection survived, it survived in the cloth — carried by the hands that made it.
Woven air
Dhaka muslin had a thread count between 800 and 1,200. A modern muslin runs 40 to 80. The fabric was so light it was called “woven air,” so transparent that wearers were sometimes accused of indecency.
It was made from a specific cotton variety, Phuti karpas, that grew along the Meghna River in Bengal. Production required 16 steps carried out in different areas around Dhaka, each performed by a different specialist. Maintaining tension and alignment across 1,200 threads per inch demands precision that most modern looms cannot match.
Then the British East India Company took control of the trade. Weavers were forced to sell below cost and fell into debt. The Bengal famine of 1770 killed between a quarter and a third of the presidency’s population by contemporary British estimates. Weavers abandoned their looms to grow food. Within a generation, the craft was gone.
I did not know about the Bengal famine before I started this research. I still do not know enough about it. The seeds of Phuti karpas were thought lost for two centuries, until researchers at Rajshahi University and the Royal Botanic Gardens at Kew sequenced DNA from dried leaves and found the plant still growing in Bangladesh. Farmers in Sreepur and Kapasia are cultivating it again. Saris have been produced, but the thread count is not what it was.
LOL memory
In the 1960s, NASA needed read-only memory for the Apollo Guidance Computer that was dense, light, and could survive a rocket launch. The solution was core rope memory , a system where the software was woven into the hardware.
Magnetic ferrite rings acted as transformers. If a wire passed through a ring, it stored a binary 1. If it passed around the ring, it stored a 0. Each ring could hold up to 192 bits. The entire program for the lunar landing, 36,864 words of read-only memory, was woven by hand.
Deep Dive: How core rope memory stores software in wire
Picture a grid of tiny donut-shaped magnets, each about the size of a pinhead. Now imagine threading a wire through a row of them, like sewing a needle through beads.
If the wire passes through a core, that core reads as 1 when current flows through the wire. The magnetic field from the wire induces a detectable voltage in the core. If the wire bypasses a core (loops around the outside), no field is induced. That core reads as 0.
One wire encodes one bit at each core it passes. But the trick that makes core rope memory dense is that many wires can pass through the same core. Each core can have up to 192 sense wires threading through or around it, which means a single ferrite ring stores 192 bits, one per wire.
A module has multiple cores arranged in a grid, with the wires weaving through them in a specific pattern that encodes the program. To read a word, you pulse the read wire for a core and measure which sense wires produce a signal. The ones threaded through return 1. The ones that bypass return 0.
This memory is read-only. Once the wires are woven, the program is fixed. You cannot update the software without physically re-weaving the module, which took about eight weeks. If a bug was found after weaving, the entire module had to be scrapped and rewoven from scratch. This is why Margaret Hamilton’s team was so careful with their code: there were no patches. The software shipped in wire.
The women who wove the core rope at Raytheon in Waltham were recruited from the declining New England textile industry and the Waltham Watch Company. Separately, at a Fairchild Semiconductor plant in Shiprock, New Mexico, Navajo women whose grandmothers and mothers had taught them to weave on upright looms assembled the integrated circuits that went into the same guidance computer. Fairchild’s own brochure put a photo of a microchip next to a photo of a Navajo rug. They knew exactly what skill they were hiring.
NASA called it “LOL memory.” That stood for Little Old Ladies.
A 1975 NASA summary report on the Apollo guidance computer systems praised the technology at length and mentioned none of the women who wove it. The Raytheon weavers in Waltham, the Navajo assemblers in Shiprock: not a single name appeared in the report about the mission they made possible.
The knowledge coming back
In 1997, a Latvian mathematician named Daina Taimina sat at a tree farm in Pennsylvania and crocheted a hyperbolic plane. Mathematicians had been teaching hyperbolic geometry through fragile paper models and abstract formalism for decades. Taimina’s insight was that crochet could instantiate the geometry directly: increase stitches at a fixed ratio, and the fabric curves into constant negative curvature. The crocheted object is not a model of a mathematical surface. It is a mathematical surface, a proof you can hold in your hands.
In the back room of the museum, they had an iPad-controlled loom managing what looked like hundreds of threads. The curator told me it takes two weeks just to thread the machine before you can weave anything. Two weeks of setup for a new program. I have mass-deployed codebases with less configuration.
A GPU may run 32 parallel execution units called warps. NVIDIA named them that on purpose. A warp is the set of lengthwise threads held under tension on a loom, through which the crosswise thread is woven. Every time we type git reset --hard, we are frogging. Every time we type git revert, we are tinking. These are not programmer coinages. They are knitting terms, and they describe exactly the same operations.
Sitting at my computer debugging software, I am connected to a weaver in ancient Persia who sat wracking her brain about how to plan a pattern she wanted to create. The frustration of forgetting to raise a warp thread and having to backtrack is the frustration of an off by one error.
The swith and the bit were not invented in a lab. It was discovered on a frame, where a single thread was lifted.


