Gottfried Wilhelm von Liebniz was a philosopher and mathematician in search of a model. In the late 1600s Leibniz decided there was a need for a new, purer arithmetic than our common decimal system. Leibniz discovered the model for this new arithmetic in the five-millennia-old book that is at the heart of Chinese philosophy: the I-Ching, or Book of Changes.

This ancient text was such an influence on Liebniz that he titled his article on the new arithmetic: "Explanation of the binary arithmetic, which uses only the characters 1 and 0, with some remarks on its usefulness, and on the light it throws on the ancient Chinese figures of Fu Xi". Fu Xi was the legendary first author of the I-Ching. The arithmetic Liebniz described was binary code, which is used in almost every modern computer, from iPhones to China's own Tihane-2 supercomputer.

To understand what Liebniz glimpsed in the I-Ching, we need to unlearn something that, in the digital era, most of us take for granted. When we listen to an MP3, look at a digital photo or watch the latest DVD box set of Game of Thrones, we are experiencing a digital representation of reality. That representation is basically just a string of binary signals that we commonly notate as 1s and 0s. Liebniz's insight was that even the most complex aspect of reality could potentially be represented in the binary form as 1s and 0s.

The I-Ching represents the binary poles of reality as Yin and Yang. Like 1 and 0, these are abstract concepts that can represent the poles of any binary set, but in the text of the I-Ching are often discussed as female and male. They are notated with a broken line for Yin, and an unbroken line for Yang. These lines are combined in sets of three to produce the eight basic trigrams, which are in turn combined to give the 64 hexagrams, which are at the heart of the I-Ching's system of divination.

The I-Ching was far more ambitious than the current practical applications of binary code, even in the most powerful supercomputer. The 64 hexagrams of the I-Ching claim to represent nothing less than the archetypal situations of human life itself. To "read" the I-Ching, a person uses either coin tosses or yarrow stalks to generate a hexagram. Each hexagram is accompanied by an explanatory text – in fact, three texts written in different historical periods of the I-Ching's analysis.

As with all divinatory systems, from tea leaves to Rorschach tests, the value of the reading will be largely dependent on your understanding of the divine. As a system for predicting the future the I-Ching might disappoint, but as a way of questioning your own unconscious mind it can be remarkably useful. But this might owe more to the unquestionable erudition of the I-Ching's ancient authors and modern translators than to the numerological systems that inspired them.

The I-Ching's teachings contain cause to be wary of our digital revolution. Binary code, powered by modern computers, has an amazing capacity to represent reality, which Gottfried Wilhelm von Leibniz could barely have conceived. The ancient authors of the I-Ching might have understood its potential – and its pitfalls – even better than we do.

In the philosophy of the I-Ching, reality is not entirely real. It is something more like a dream or an illusion. This dream of reality arises from the binaries of Yin and Yang, as they play out their infinite combinations. It's not surprising then, from the I-Ching's perspective, that anything in the dream of reality can be represented as a model of its binary constituents, in a string of 1s and 0s, processed by a computer.

So when scientific thinkers – including many of my favourite science fiction writers – ask whether computers can create "virtual realities" or "artificial intelligence", they are missing the point. Of course we can create ever deeper and more complex layers of the dream of reality to get lost in. The real question is, can we wake up from the dream we're in already?