Every computer on Earth runs on two symbols: 0 and 1. Every photo on your phone, every message you send, every search you run is reduced to that pair. The history books credit that idea to Europe, to the German philosopher Gottfried Wilhelm Leibniz, who published his explanation of binary arithmetic in 1703.
But long before Leibniz put his system on paper, Yoruba diviners in West Africa were already working with a two-value code of their own. It was not built for machines. It was built for meaning. And it may be one of the oldest information systems on Earth.
The system with 256 answers
Ifa is the Yoruba system of divination and knowledge, centred on Orunmila, the deity of wisdom. When an important decision had to be made, for a person, a family, or a whole community, people consulted a babalawo, an Ifa priest trained for years in the tradition.
The priest did not guess. He cast sacred palm nuts or a divination chain called the opele, and read the pattern that fell. The result was always one of 256 signs, called odu. Sixteen principal signs combine with each other to produce the full set of 256, and each sign opens onto a library of verses, proverbs, stories, and guidance, chanted from memory.
Here is where the mathematics comes in. Each sign is marked in eight positions, and each position takes one of two values: a single mark or a double mark. Two possible values across eight positions gives 2 to the power of 8, which is exactly 256. It is the same arithmetic behind the 8-bit byte, the unit that gives a computer its own 256 possible values.
Not fortune telling, but a database
It is easy to dismiss Ifa as fortune telling. That misses what it actually is. UNESCO, which inscribed the Ifa divination system on its Representative List of the Intangible Cultural Heritage of Humanity in 2008, describes a vast literary corpus: 256 parts, each with verses called ese, around 800 per sign, reflecting Yoruba history, language, beliefs, and contemporary social issues.
Think of it as a database stored in human memory. The cast produces a code. The code points to a body of text. The priest interprets that text for the question at hand. The input is structured, the output is a story, and the whole thing runs without a single written page. Scholars at the London School of Economics have described Ifa as an indigenous binary knowledge system, a decision support system that pairs a coded output with narrative knowledge, much like a predictive model pairs data with interpretation today.
The signs are marked on the opon Ifa, a carved wooden divination tray dusted with fine powder. The tray itself is art: its rim carved with figures, animals, and symbols. Knowledge, in this tradition, was never separate from craft.
What the West missed
For centuries, European visitors and colonial officials looked at African knowledge systems and saw only superstition. They catalogued the carvings as curiosities and dismissed the priests as fortune tellers, while missing the structure underneath: a formal system with a fixed alphabet of marks, a complete set of combinations, and a memorised corpus large enough to fill libraries.
That dismissal had a cost. When the history of computing was written, the story ran from Leibniz to Boole to the silicon chip, with no room for the Yoruba priests who had been combining two-valued marks into 256 outcomes generations earlier. Ifa did not become the computer. Nobody claims it did. But the idea that binary thinking arrived in the world only with European mathematics is simply wrong. Africa had a working two-value code long before Europe formalised one.
Ifa is still alive. It is practised among Yoruba communities in Nigeria and across the African diaspora in the Americas and the Caribbean, where it travelled with enslaved Yoruba people and took root in new forms. Its verses are still chanted, its priests still trained, its trays still carved.
The next time someone tells you that computing began in a European study in 1703, remember the babalawo and his tray. The ones and twos were already at work in West Africa, written in palm nuts, powder, and memory.
Sources: UNESCO, Ifa Divination System; LSE Impact of Social Sciences, What Ifa Can Teach Us About AI; and our earlier story on the Osun-Osogbo Sacred Grove in Yorubaland.