Qi Men Dun Jia with Dougles Chan

Global Qi Men Dun Jia educator and lineage founder from Singapore, dedicated to making ancient Chinese strategic wisdom practical, accessible and relevant to modern life and business.

Shao Yong Earlier Heaven Diagrams and the Binary Order of Hexagrams

Despite the philosophical disagreements, Shao Yong system continued to attract serious students well into the Yuan and Ming dynasties. His insistence that numbers came first, that structure preceded meaning, and that the hexagram arrangement encoded cosmic truth gave later scholars a mathematical grammar for exploring the text that the Yili school alone could not provide. Without Shao Yong, the I Ching would have remained a literary and moral text. With him, it also became a structured system with discoverable internal logic.

Shao Yong’s Earlier Heaven Diagrams and the Binary Order of Hexagrams

In the eleventh century, a scholar named Shao Yong arranged all sixty-four hexagrams of the I Ching in a circle and a square. Six hundred years later, a Jesuit missionary showed those diagrams to Gottfried Wilhelm Leibniz, and Leibniz recognized in them the binary number system he had been developing. The I Ching and modern computing share a genealogical link that runs through one Song dynasty mathematician.

This article traces Shao Yong’s arrangement, its philosophical roots in Daoist cosmology, and its surprising encounter with European mathematics. The story reveals how a Chinese divination text, properly organized, turned out to anticipate the mathematical foundation of every computer on Earth.

A quick note: Shao Yong did not invent binary numbers. He was arranging hexagrams according to a Daoist cosmological principle, not a mathematical one. The binary interpretation came later, when Leibniz realized that Shao Yong’s order coincidentally matched binary counting from 0 to 63. The coincidence does not make Shao Yong a proto-computer scientist, but it does reveal a deep structural harmony between the I Ching and binary logic.

Who Was Shao Yong?

Shao Yong (邵雍, 1011 to 1077 CE) was a Northern Song dynasty scholar, mathematician, and philosopher. He was associated with the Daoxue (道學) movement, the “Learning of the Way,” which later generations would call Neo-Confucianism. Unlike most Song scholars, Shao Yong focused on the I Ching and developed a comprehensive cosmological system based on numerical patterns.

Shao Yong was recognized as a prodigy in childhood. He was self-educated in the classics and mathematics and was eventually patronized by wealthy families who gave him a house and resources. He never held significant office, preferring philosophical conversation and scholarship. He developed a close friendship with Sima Guang, the historian, who was his contemporary in the same intellectual circles.

Fact Detail
Born 1011 CE
Died 1077 CE
Key work Huangji Jingshi (Supreme Principles Governing the World)
Innovation Earlier Heaven (xiantian) hexagram arrangement, binary-order classification
Historical encounter Influenced Leibniz through Jesuit transmission, circa 1703

The Earlier Heaven Arrangement (Xiantian)

The term xiantian (先天) literally means “before heaven” or “prior to heaven.” In Chinese cosmology, it refers to an ideal, primordial order that precedes the actualized world of change. The contrasting term, houtian (後天), “after heaven,” refers to the empirically observed, post-creation world.

The I Ching had traditionally used the King Wen sequence of hexagrams, which was the “after heaven” or后天 arrangement. Shao Yong proposed that there was an earlier, more fundamental order that preceded King Wen’s. His Earlier Heaven arrangement placed the eight trigrams in a circle organized by natural opposition (heaven opposite earth, fire opposite water, etc.) and arranged the sixty-four hexagrams in a circle and square following strict binary logic.

In Shao Yong’s arrangement, each hexagram is generated by a systematic procedure. You can think of it as a binary tree:

  1. Start with the single line: divided (yin, 0) or undivided (yang, 1).
  2. Each branching doubles the possibilities: 2, then 4, then 8, then 16, then 32, then 64.
  3. At six levels (the six lines of a hexagram), you have all sixty-four hexagrams, each in a unique position determined by its line composition.

In binary terms, if broken line (yin) = 0 and solid line (yang) = 1, then Shao Yong’s arrangement counts 000000, 000001, 000010, 000011, and so forth through 111111. Hexagram 1 (all yang, 111111) becomes 63. Hexagram 2 (all yin, 000000) becomes 0. Each hexagram occupies exactly one slot.

The Binary Harmony: Shao Yong arranged hexagrams by generating them through binary branching. Leibniz read this arrangement and recognized it as binary counting. What Shao Yong saw as cosmic order, Leibniz saw as arithmetic. Both were looking at the same pattern through different lenses.

The Circle and Square Diagrams

Shao Yong’s diagrams came in two forms: a circular arrangement and a square arrangement. In the circle, the sixty-four hexagrams are placed around a ring in binary order. The circle represents cyclical time, the rotation of seasons, the endless alternation of yin and yang.

In the square, the hexagrams fill an eight-by-eight grid. The rows and columns both follow binary order. Each cell contains the hexagram formed by the intersection of its row trigram and column trigram. The square represents spatial structure, the matrix of possibilities.

The circle and square together encode a cosmological view: time is cyclical, structure is rectilinear, and all phenomena arise from the intersection of temporal pattern (circle) and spatial framework (square).

Feature Shao Yong’s Earlier Heaven King Wen’s Later Heaven
Basis Binary structure of lines Narrative and cosmological sequence
Trigram order Opposite pairs (heaven/earth, fire/water, etc.) Logic Mathematical generation, binary branching Thematic, intuitive, cosmologically narrative
Influence Leibniz, binary mathematics, modern computing link Traditional divination, conventional commentary

The Philosophical System: Numbers Generate Reality

For Shao Yong, the point was not mathematics but cosmology. His system held that numbers are the fundamental reality from which all phenomena arise. The cosmos is generated through numerical processes: one divides into two, two divides into four, four divides into eight, and so on until all patterns emerge.

This view placed Shao Yong in the Xiangshu tradition, the “Image and Number” school, which saw the I Ching as a mirror of cosmic structure. Unlike the Han dynasty Xiangshu scholars who created elaborate correspondences between hexagrams and external phenomena, Shao Yong focused on the internal mathematical structure of the hexagrams themselves. His system was austere and elegant by comparison.

He argued that the four primary numbers (1, 2, 3, 4) generate all phenomena. The number 1 is yang, 2 is yin, 3 is the interaction of yang with yin, and 4 is the completion of those interactions. These numbers produce the eight trigrams, which produce the sixty-four hexagrams, which produce all things. The trigrams are not symbols for natural forces; they are the natural forces themselves, expressed in numerical form.

Shao Yong believed he had recovered the original arrangement of the hexagrams, the order that existed “before heaven” (xiantian), prior to the modifications of King Wen. Whether this was historically accurate is doubtful. What matters is that his arrangement revealed a mathematical structure no one had explicitly articulated before.

The Leibniz Encounter

The story of how Shao Yong’s diagrams reached Europe involves a Jesuit missionary named Father Joachim Bouvet. Bouvet was in Beijing in the late seventeenth century as part of the Jesuit mission to the Qing court. He had studied the I Ching and corresponded with Leibniz, who was developing his own binary number system.

In 1701, Bouvet sent Leibniz a copy of the Fuxi sequence, the circular and square arrangements attributed to the legendary emperor Fuxi but actually based on Shao Yong’s work. Leibniz was astonished. He recognized that the hexagram order matched binary counting exactly. Broken lines (yin) correspond to 0, solid lines (yang) correspond to 1, and each hexagram represents a six-digit binary number.

Leibniz published his analysis in 1703, in a paper titled “Explanation of Binary Arithmetic.” He argued that the Fuxi diagrams proved the antiquity of binary logic and that the Chinese had possessed mathematical knowledge that Europe was only now discovering. He saw this as evidence of a universal rational order accessible to all human minds.

A quick note: The Leibniz encounter is real, but the “China invented computers” narrative is overblown. Shao Yong arranged hexagrams by cosmological principle, not arithmetic. Leibniz imposed binary reading on the arrangement. The meeting of Chinese cosmology and European mathematics produced something neither side had envisioned alone.

Shao Yong in the History of Ideas

Shao Yong’s contributions to Chinese thought extended beyond the hexagram arrangement. He developed a comprehensive historical chronology that assigned numerical values to dynastic cycles. He argued that history moved through grand epochs, each with its own numerical structure, and that fortune rose and fell in patterns mirroring the rise and fall of yin and yang in the I Ching.

His influence on later scholars was significant but contested. The Cheng brothers (Cheng Hao and Cheng Yi), who were also part of the Song intellectual revival, found Shao Yong’s system too deterministic. They preferred a moral reading of the I Ching over a numerical-cosmological one. Zhu Xi, the great synthesizer of Neo-Confucianism, incorporated Shao Yong’s arrangements into his own I Ching commentary but was cautious about the more speculative aspects of the system.

In the modern period, Shao Yong’s binary arrangement has been rediscovered as a precursor to information theory. Computer scientists and mathematicians point to his diagrams as an early articulation of binary combinatorics. This recognition is deserved but should not obscure the fact that Shao Yong was doing cosmology, not computer science. The mathematical elegance was in service of a philosophical vision.

Shao Yong Critique of Conventional Reading

Shao Yong was not content to arrange hexagrams. He also argued that conventional I Ching reading was insufficient. Most scholars, he believed, read the text backward: they started with the written words and tried to derive cosmic principles from them. Shao Yong proposed reversing the method: start with the numerical structure of reality and derive the text from it.

This was a radical claim. It meant that the words of the hexagram statements were secondary to the numerical structure that generated them. The judgment text of Hexagram 1, Qian, matters less than the fact that Qian is the hexagram of all yang lines, occupying position 63 in the binary sequence. The meaning is in the structure, and the text is a commentary on the structure.

Few scholars fully accepted this inversion. The Cheng brothers, in particular, argued that the moral content of the text was primary and the numerical structure was a useful analytical tool but not the ground of meaning. This disagreement between Shao Yong numerical primacy and Cheng Yi textual primacy recapitulated the Xiangshu versus Yili debate within Neo-Confucianism itself. The tension between image and meaning that began in the Han dynasty was still alive in the eleventh century.

Frequently Asked Questions

Did Shao Yong invent the binary system?

No. Shao Yong arranged hexagrams according to a cosmological principle that happened to coincide with binary order. He did not conceive of his arrangement as a number system. Leibniz recognized the binary pattern later. The invention of binary arithmetic as a number system is properly attributed to Leibniz.

Are the Earlier Heaven and Fuxi arrangements the same thing?

In practice, yes. The “Fuxi sequence” that Bouvet sent to Leibniz was based on Shao Yong’s Earlier Heaven arrangement, attributed to the legendary emperor Fuxi. The two terms are used interchangeably in most I Ching literature.

Is the binary interpretation of the I Ching legitimate?

It is structurally sound but historically different from Shao Yong’s intent. Each hexagram can be read as a six-digit binary number. That is a mathematical fact. Whether the ancient Chinese intended them as such is a separate question, and most scholars conclude they did not.

Where can I see Shao Yong’s diagrams?

The circular and square hexagram arrangements are reproduced in many I Ching books, including Richard Wilhelm’s translation. They are also widely available in online I Ching resources. The original diagrams are preserved in Song dynasty editions of Shao Yong’s works.

Back to the I Ching history and origins | Back to the I Ching main page

Comments

Leave a Reply