Two things that happened to meet
The mathematician and philosopher Gottfried Wilhelm Leibniz (1646 to 1716) worked out how to write numbers using only the digits 0 and 1 by the late 1670s, according to his surviving papers. Others had played with base-two notation before him, for example in unpublished notes by the English mathematician Thomas Harriot, but Leibniz developed it further and wrote about it for an audience. Around 1701 the Jesuit missionary Joachim Bouvet, who was working in China, sent him diagrams of the 64 hexagrams of the I Ching. Leibniz believed he recognised in them the same system he had devised, and he said so in a paper presented in 1703.
That sequence is well documented in outline, but it is easy to overstate. The hexagrams were not binary arithmetic in their original context. They were the diagrams of a divination and wisdom text, and the binary reading was Leibniz’s.
What a hexagram is
A hexagram is a stack of six lines. Each line is either unbroken or broken in the middle, traditionally associated with the complementary principles of yin and yang. Six lines with two choices each give 2 x 2 x 2 x 2 x 2 x 2 = 64 possible figures, which matches the traditional set.
Replace each unbroken line with 1 and each broken line with 0, read from one end consistently, and every hexagram becomes a six-digit binary number. A figure of six broken lines is 000000, which is zero. A figure of six unbroken lines is 111111, which equals 32 + 16 + 8 + 4 + 2 + 1 = 63. The 64 figures therefore cover the numbers from 0 to 63, with none missing and none repeated.
Reading base two
In ordinary base ten, each place is worth ten times the one to its right. In base two, each place is worth twice the one to its right: 1, 2, 4, 8, 16 and so on. So 5 is written 101 (4 + 1), 6 is 110 (4 + 2), and 13 is 1101 (8 + 4 + 1). Leibniz was struck that every number could be written with just two signs and that arithmetic on them was very simple, though long to write out.
The arrangement that caught his eye
The key detail is the order of the figures. Bouvet sent a diagram in which the hexagrams were arranged in a regular sequence attributed to the Song-dynasty scholar Shao Yong, and not the order found in the classic text. In that arrangement the hexagrams run in an order that matches counting upward in binary. Leibniz saw this at once. The match is real, since the arrangement is systematic, but it was designed in China for its own reasons, and no evidence shows that Shao Yong or earlier commentators understood the figures as numbers in base two.
Bouvet belonged to a group of missionaries who looked for traces of ancient revelation in Chinese texts, and he was inclined to read the hexagrams as having deep hidden meanings. Leibniz, who corresponded with several Jesuits and had a strong interest in China, was receptive to the idea that the ancient Chinese had a profound understanding that later tradition had lost.
Leibniz’s own meaning for zero and one
Leibniz did not see binary only as a convenience. He gave it a religious reading, in which 1 stood for God and 0 for nothingness, and in which the creation of the world from nothing was reflected in making all numbers from 0 and 1. Such interpretations were a feature of his philosophy and are best treated as his own beliefs, not as facts about numbers. They echo older ideas, such as zero as emptiness in some Asian traditions and the Pythagorean number philosophy of ancient Greece, though Leibniz put them to his own purpose.
He also hoped the connection would help present Christianity to Chinese scholars, an aim linked to the missionary context of the exchange.
What historians say now
Modern scholars generally accept the facts of the correspondence and the mapping, and are cautious about the conclusions. The hexagrams can be read as binary numbers, but that is not the same as having been invented as such. A pattern that can be read in a later notation was not necessarily written in it.
Leibniz’s work did not lead directly to computing. Binary notation became practically important only in the twentieth century, when engineers found that machines are far easier to build from two-state parts, such as a switch that is on or off. Boole’s logic in 1854 and Claude Shannon’s 1937 work on switching circuits are usually cited in that history. Leibniz remains an important early figure in the study of numeral systems, and the I Ching story is one of the best-known cases of one culture’s symbols being understood through another’s mathematics.