Khipu and Codes


How the Incas' ancient system of coding could lead the way to responsible tech.

Illustration by  Eddie Stok  for Are We Europe

Illustration by Eddie Stok for Are We Europe


At the time the Spanish landed on the western coast of South America, the Inca ruled an empire of 10 million people spanning from Colombia to Chile. They had no money and no market economy; they ran their empire from their capital Cuzco on a system of tributes and censuses. Like most successful empires, they kept diligent records, but their records were peculiar to the Spanish. Instead of recording information with graphic characters on stone or paper, the Inca tied knots on strings called khipu.

Much of the information on these strings has been lost to history. However, using traditional code-breaking techniques such as analyzing patterns and comparing them against historical documents, scholars have identified some of their meanings. The type and position of the knot indicate numerical values. The direction of the knot could indicate the clan of an individual, and the color of the string might indicate a name or a crop. Standard markups represent taxation rates. A few scholars believe that khipu contain narratives as well, but they have yet to decode stories from the strings.

Like all records, the khipu are code—a set of rules for changing information from one form into another. To the Spanish, these records looked like nonsense, but “Inca scribes” with knowledge of the rules could decode them and extract their meaning. Today, “code” is associated more with computers, rather than cipher wheels. Computers take input, encode and process it, and then decode results for users to understand. When we programmed computers to receive input through keyboards, electronically produce sets of results to a question, and read out those results in a graphic way (i.e., in a way that mimics our existing codes), they finally went mainstream.

What if the Incan system of coding on khipu had been the norm instead of graphic writing systems? If decoded messages needed a non-graphic form, would our computing technology have evolved differently? And what would non-graphic code even look like?

Want to keep reading?

This story is free! But if you want to support us, you could spoil yourself with a printed version of this story.


Keep reading

The first step towards modern computing begins with learning an efficient way to input and code data and instructions. In 1703, after studying the I Ching, Gottfried Leibniz published a paper explaining how 0s and 1s in combination could be used to represent any number. This meant that using only two digits, one could represent all numbers in the universe.

The khipu are code—a set of rules for changing information from one form into another.

The binary system would eventually become important for entering data in electronic machines, but the world’s first computer didn’t use it. More than 130 years after Leibniz’ publication, Charles Babbage dreamed up an Analytical Engine, which could quickly and reliably calculate tables of numbers using arithmetic logic. Punch cards inspired by Jacquard’s loom designs contained input data and programs that would dictate a series of and/or/neither logic processes. Like this, the output wasn’t pre-determined, but depended on the path of instructions and thus the machine could turn out sets of possible answers.

During the Second World War, scientists in the United Kingdom and the United States built programmable calculating machines. However, as the amount of data that we required a system to read and the number of processes that we wanted it to follow grew, it became an increasingly energy-intensive undertaking. The amount of information that these machines needed to process was so large and required so much energy, that running the machine would make the lights flicker in nearby towns.

If you want to put two bits of information into a circuit, process them, and get something different as an output, you need a device that can output more than it receives as input. Luckily, transistors—pronged devices that connected easily to a circuit board and could amplify electrical signals—did just that. By shrinking them and casting them in silicon, computers could process information at lightning speeds.

The final piece of any computing system is interpreting the output. It was simple enough if you wanted a dial to tally up raw numbers like Hollerith did, but input based on binary comes out as binary as well. If computers were to be truly useful, we would need to be able to make the coded nonsense easy to read. In the 1960s and 1970s, programmers realized that if computers were going to transform the way that we work, we would need to be able to interact with them. The answer, ultimately, was a graphical user interface—a screen with a keyboard and mouse that would allow us to input information in graphic form and read the output of the computer’s processes. By connecting computers and making the output of one the input of another, we created the internet.

Illustration by  Eddie Stok

Illustration by Eddie Stok

How might the khipu—the Incan knots on strings—have evolved into computers?

Computers use graphic input and output because that’s what their users understand. If we read information differently, how would that change the evolution of computing? How might the khipu—the Incan knots on strings—have evolved into computers? What would the input, encoding, processing, and output look like?

Khipu, like text, are storage devices. But before data can be stored, it has to be counted. Just as we would use tally marks to count beans, for example, and then transform our tally IIIII IIIII II into “12,” the Inca counted using counting tablets. While counting, record keepers would keep track of different items by putting kernels of different colors into different squares of a three-tiered tablet. Then, when they had the final tally, they would record the information by tying a knot on a khipu.

Stones were placed in different layers and squares to represent 1s, 2s, 3s, 6s, or 12s. Combinations of these stones could make any number, just like Leibniz’ method for representing numbers only as zeros or ones. The input piece of computing is the same, since it relies on the same principles of arithmetic using a fixed set of base values.

The next step in computing is the encoding and decoding of information. The khipu contains various pieces of information like the type/position and direction of the knot, the color and fiber of the string, and the knot that attaches the string to the base cord. Khipu work on a base ten system—the type and position of the knot denote the value of an integer. The other elements, like the direction of the knot or the color of the string, denote information like names, goods, or social class.

A computer receives input, processes it according to instructions, and generates output. The counting plates determine what information needs to be input. Then we need to encode it, transforming it in a way that can be processed. Imagine a punch card that represents a string with potential holes in one line. If the record keeper makes a hole in the seventh position of the hundreds section and the second place of the tens section, it could indicate 720. Each of the other factors—string color, texture, etc become arrays that can be represented by combinations of holes in the card.

Punch cards are useful because they allow machines to complete circuits. They were also used in the loom—a device for weaving thread, that inspired Babbage. Using punch card programs, the Jacquard loom could pull different colors or textures into the string to create patterns in the cloth, like the knots of a khipu. If a program could tell it which thread to pull and where/how to tie a knot, it would be able to decode punch cards into knotted strings very quickly. Like this, punch cards could produce knots on colored string—non-graphic code, by running programs. It’s the equivalent of the printing press for khipu.

Eventually the punch cards would be replaced with wires that could feed information into the circuit like our computers so that we would be able to print khipu. However, if we wanted machines to store data or pass messages between them, we would have to make it intangible.

One systems engineer that I spoke to about this piece imagined that instead of computers, we might use looms as “screens.” These would be white threads on a frame. Pulses of colored light would shoot down the strings to display a kind of knot at a certain position on the string. Like this we could communicate color, texture, and the placement, direction, and type of the knot. Storing information as light pulses would allow us to read the looms like books or (eventually) move messages across space. Lights would be the decoded message, and with some tinkering, sensors on the string might allow us to indicate where and how the lights should pulse so that we could send messages back.

Illustration by  Eddie Stok

Illustration by Eddie Stok

As fun as it is to imagine, we don’t walk around with miniature flashing looms in our pockets. How different would the world be if we didn’t record with graphic symbols? Certainly our tools would look different, but in the end, code in any form is a tool. How we use it—what we code or tell the machines to code, depends on the purpose for which we wield the tool. A blade can be used both to cut food and to kill. A printing press prints both scientific discoveries and calls to arms. A computer makes it possible to video call with far-away family members and for communities of hate to find one another.

As fun as it is to imagine, we don’t walk around with miniature flashing looms in our pockets.

The Incan empire relied on census and production data to run smoothly, and naturally that is what they coded. They counted people because they built and defended their empire with tribute labor. The Inca counted goods because a part of the production was owed to the state and the priests. But the strings remain a mystery as we haven’t yet decoded their explanations for why subjects offered their labor or why the priests deserved tax money. Without bigger stories about their lived past and imagined future, khipu lack meaning.

Tools that can beat us at our own games, drive cars, or diagnose illnesses already exist. Soon, with artificial intelligence, computers will write their own coded instructions and solutions. Machines will replicate routine physical, as well as mental tasks, vastly changing our concept of work and our use of time.The code that will run these programs is a tool. How we wield it depends on our broader stories about why we use them. Without these stories, artificial intelligence is nothing more than powerful code to track and predict the goods in a warehouse, or people with a certain name.

Where will the stories about our technological tools come from? Some stories are born with the technology itself; their purpose encoded in them. In this sense, it’s hard to imagine Europe playing a major role in shaping these stories, because it’s just not pushing the technical frontier of artificial intelligence the way that the United States and China are. Europe will have its contributions in specific contexts and industries, certainly, but despite the budgets thrown at AI by the likes of Emmanuel Macron, much of the technology that we will live with decades from now will likely have its origins on another continent.

The EU claims that the products that originate here will have a competitive advantage as “ethical” or “trustworthy” AI. But trustworthiness is a feature, not a story that gives the tool purpose. Another vision would purport that the fractured nature of Europe is the ideal grounds for experimentation of different technologies and stories. This applies to entrepreneurs who want to test how consumers respond to technology, but also to governments, who will experiment with the social distribution of gains from such tools.

At the moment, technology is developing faster than its raison d’etre. Tools are invented because they are possible, not because they fit the purpose defined by a broader narrative. AI brings enormous possibilities, from how we deal with the climate crisis, to changing the way we work, pulling people out of poverty, saving millions of sick people—and of course, making a privileged few very, very rich. Today these tools for analyzing, diagnosing, and distributing are like the khipu—decipherable, but senseless. If Europe wants to play a role in responsible tech, it needs a compelling story (and storyteller!) to give meaning and purpose to the tools of the future.


This article appears in Are We Europe #5: Code of Conscience

Code of Conscience
Order Now