Subtractive Numeration: How Yoruba Mathematicians Predicted Computer Programming

Computer programming is generally seen as the language of Western technological progress, but what if its underlying numeration (symbolic representation, base systems, and computational logic) has been around for centuries, developed in the base-20 counting system of Yoruba mathematics?
Subtractive numeration represents quantities through base units and systematic operations. The system builds numbers from principal units of five, twenty, and two hundred. Scientists formalised binary logic in the 1600s. Computer programming works the same way: languages use binary, octal, and hexadecimal bases, process data through systematic rules, and perform calculations through symbolic representation. A 2024 paper shows the Yoruba system “uses subtraction extensively” and inspired mathematical models for hybrid representations using negative digits. Yoruba mathematicians of southwestern Nigeria created a sophisticated numeration system based on base-20, used for trade, daily counting, and cosmology from ancient times onward. And yet, they understood something about numeration that computer scientists are still exploring.
The numbers count. The logic computes. The code runs.
No obvious connection.
But here’s the thing. What if mathematics is just symbolic abstraction? What if Yoruba counting is the original data processing? What if Yoruba mathematicians were the first programmers?
What Subtractive Numeration Teaches Us
Subtractive numeration is the foundation of how symbolic mathematics works. Yoruba mathematicians built numbers from base units. They used addition up to fourteen, then subtraction from twenty. They represented each number as a combination of units. They processed quantities through systematic rules.
Yoruba mathematicians began developing this system as early as ancient times. They used cowrie shells and counting instruments. Five fingers formed the original base. The counter draws up 4 batches of 5 to obtain 20. Five batches of 20 form 100. Two piles of 100 form the new principal unit called /igba/ (200). That is equivalent to representing quantities up to 10²¹ cowries.
Subtractive numeration works because it reduces complex quantities to simple units. Every number can be built from base units through addition and subtraction. This is how counting works. This is how trade operated. This is how mathematics developed.
Every time you use a computer, you are using Yoruba logic.
The Yoruba Connection
Now go to Nigeria.
Across southwestern Nigeria, Yoruba mathematicians developed a complex numeration system. They are masters of symbolic arithmetic and the logic of numbers. They are counters of the ancient world.
In ancient times, they traded, counted daily items, incorporated cosmological concepts, and represented quantities up to 10²¹.
But here’s what made the Yoruba system truly unique. It was not just about counting. It was about abstracting. It was about symbolising. It was about representing. The mathematicians controlled the flow of numerical knowledge. They decided how to represent quantities.
Yoruba mathematics used base-20 to represent quantities, employed addition and subtraction to form complex numbers, tracked quantities up to 10²¹, and created a framework for symbolic arithmetic. It was not inferior to computer programming. It was different. It was oral.
Yoruba mathematicians understood symbolic numeration before computers existed. They called it counting. We call it programming.
How Computer Programming Completes the Picture
Finally, consider computer programming.
Programming languages use number bases, process binary data, perform calculations, execute systematic rules, and encode information through structured logic.
Computer programming works by choosing a number base that fits the task and applying systematic rules to process data.
Now here’s where it gets surprising. Computer programming is not new. It is building on ancient principles. Yoruba mathematics was the original symbolic system.
Modern programming is just formalising what Yoruba mathematicians already knew. They created a base system. They used symbolic representation. They operated through systematic rules. They built a framework for complex calculations.
The Connection
Here’s what ties these together.
Subtractive numeration is mathematics. It works the same whether you use cowrie shells or computer code. Numbers are represented. Quantities are calculated. Patterns are recognised.
Yoruba mathematicians built this system first. They used base-20 to represent quantities. They employed addition and subtraction to form complex numbers. They tracked quantities up to 10²¹. They did all of this without computers.
This is exactly what computer programming does today. Languages use binary, octal, and hexadecimal bases. The principle is identical.
By constructing a structured system of numeration using base-20, addition, and subtraction, Yoruba mathematicians already understood the logic that computer programming engineers would later codify. They used cowrie shells instead of binary code, but the system was the same.
Why This Matters
You use computers every day. You trust they will calculate correctly. You never question the number bases underneath.
You think programming is modern. You think binary logic is recent.
When you run a program and it works, remember: the same logic that powers your computer was encoded in cowrie shells centuries ago by Yoruba mathematicians.
The mathematicians who developed it had no computers, no algorithms, no programming languages, only cowrie shells, addition, and subtraction. Yet their system still works. Their logic still computes.
Next time you see a program running, ask yourself: Is your code built on modern logic or ancient numeration?
