Leibniz and the I Ching: did the hexagrams anticipate binary numbers?
Updated October 24, 2026
Yes, there is a real match, but it is narrower than the popular story. In 1703 the philosopher Gottfried Wilhelm Leibniz received from the Jesuit Joachim Bouvet a Chinese diagram of the 64 hexagrams whose order, read with broken lines as 0 and solid lines as 1, counts from 0 to 63 in binary. Leibniz had already worked out binary arithmetic on his own; the diagram was not ancient, and the classic I Ching never used it to calculate anything.
Here is what happened, and how to tell the history from the legend.
Leibniz before China
Leibniz had been thinking about a notation using only 0 and 1 for many years; a manuscript on "dyadic" progression dates from 1679, long before any contact with the hexagrams. He was also deeply interested in China. He edited a collection of reports from the Jesuit mission, Novissima Sinica (1697), and corresponded with missionaries who had served at the court of the Kangxi emperor.
One of them was Joachim Bouvet (白晉), a French Jesuit and mathematician who had spent years at the Qing court and studied the Yijing closely. Bouvet belonged to a small current later called the "Figurists", who believed the oldest Chinese books preserved traces of a primeval revelation shared with the Bible, and that Fu Xi (伏羲), the legendary inventor of the trigrams, was a figure of that ancient wisdom.
What arrived in 1703
Leibniz described his binary system to Bouvet. Bouvet replied from Beijing with a long letter, written in November 1701, enclosing woodblock prints of two hexagram diagrams: a circle of 64 hexagrams and a square of 8 × 8. The letter reached Leibniz in April 1703.
These were the arrangements known in China as the Fu Xi order (伏羲六十四卦次序 and 方位圖), which Zhu Xi printed at the front of his Original Meaning of the Zhouyi (周易本義). Leibniz saw at once that if you take broken lines as 0 and solid lines as 1, with the bottom line as the highest digit, the hexagrams in this order run from Kun ☷☷ (000000, zero) through Bo, Bi, Guan and onward to Qian ☰☰ (111111, sixty-three): a perfect binary count.
That same year he presented a paper to the Paris Academy of Sciences, published in its Mémoires for 1703, titled roughly "Explanation of binary arithmetic, which uses only the characters 0 and 1, with remarks on its usefulness and on the light it throws on the ancient Chinese figures of Fohy". Leibniz believed he had recovered the lost meaning of Fu Xi's figures: that the ancient sage had known binary numbers and later Chinese scholars had forgotten it.
Why the match is real
The resemblance is not a coincidence of selective reading. The Fu Xi order is built by a rule the Song philosopher Shao Yong (邵雍, 1011–1077) called "doubling" (加一倍法): start with yin and yang, put yin and yang on top of each, then again, until you reach six lines. That is exactly how binary numbers grow, one digit at a time, each new digit doubling the count. The eight trigrams in the same order (Kun, Gen, Kan, Xun, Zhen, Li, Dui, Qian read in reverse) are the numbers 0 to 7. So the diagram really is a binary sequence, and Shao Yong really did generate it by the same logic.
The Xici's line "易有太極,是生兩儀,兩儀生四象,四象生八卦" (the Changes have the Great Ultimate, which gives birth to the two modes, which give birth to the four images, which give birth to the eight trigrams) is the text Shao Yong and Zhu Xi took as the warrant for the doubling scheme. You can read more about it in the Xici commentary.
What the match does not prove
- It is not Fu Xi's diagram. The arrangement is credited to Fu Xi by Song-dynasty tradition, but no source earlier than Shao Yong's school, roughly two thousand years after the legendary Fu Xi, shows it. The received Zhouyi uses a different order, the King Wen sequence, which is built from pairs and is not binary at all.
- Nobody in China used it to calculate. Shao Yong used the diagram for cosmology and cycles of time, not for arithmetic. There is no evidence of binary addition or place-value numbers based on the hexagrams.
- Leibniz did not get binary from the I Ching. He had binary first. The diagram confirmed and delighted him; it did not teach him.
- Computers do not come from the hexagrams. Modern binary computing descends from Boolean logic and electrical engineering in the nineteenth and twentieth centuries. Leibniz is an honoured ancestor of binary notation, but the line from his 1703 paper to a silicon chip does not pass through the Yijing.
What remains is still remarkable: two thinkers, centuries and continents apart, building the same structure from the same idea of repeated two-way division. That is a fact about the structure, and a reason why there are 64 hexagrams, rather than a claim that ancient China invented the computer.
Was Leibniz right about China?
Partly. He was right that the diagram encodes binary order. He was wrong, following Bouvet, about its age, and his larger hope that the hexagrams were a universal symbolic language left by a single ancient sage belongs to the Figurist project, which the Church later discouraged and which Chinese scholars did not share. Leibniz himself was careful to say the figures needed interpretation; it was later popularisers who turned his excitement into "the I Ching is a computer".
Using this when you read a cast
None of this changes how you consult the book. The binary view is useful in one practical way: it shows that every hexagram is just six yes/no choices, so any hexagram can turn into any other by flipping lines. That is exactly what a changing line does. When you cast, you can think of the six lines as six places where the situation is either yielding or firm, and the changed hexagram as the same six places with some of them reversed.
If you want to see the Fu Xi arrangement for yourself, compare it with the trigram diagrams in Early Heaven bagua, then look at Hexagram 2, Kun and Hexagram 1, Qian, the zero and the sixty-three of Leibniz's count.