Reading “The Book of Change” by Richard Rutt.

Many readers of my dispersed essays know that I am a huge fan of manuals and HOWTOs.
Indeed, I consider them a superior genre of literature, and sincerely think that most of non fiction literature should obey their format.
Imagine my joy when I discovered that “Book Of Change” by Richard Rutt is written in this style. (Although the typesetting itself is horrible disgusting!)
Why exactly did it decide to read “The Book of Change”? Well, firstly, because it is the earliest known consistent text in existence (there are Shāng bone inscriptions, but they are can hardly be called a consistent text), and its traces are visible all over the Chinese and related cultures.
Even Korean flag includes references to the Book of Change in the form of four “gua” on it.
I did not expect that it would take me so long. Indeed, I will have been reading the ’book of change’ for more than 3 years by the time this essay is published, and all of that despite Richard Rutt’s translation being accompanied by a giant commentary in the form of a manual, and it being a translation into English, a language I know decently.
Granted, a lot of the complications are due to the fact that the typesetting is really junk, and I had to spend much more time googling and de/re-compiling the epub
file before the narrative could flow smoothly into my brain.
Finally I am done, and in this text I am going to try and express my thoughts about how “Zhōu Yì” stays relevant nowadays and why it is worth a read by every aspiring programmer, especially in the Rutt’s version.
1. Review
Reading the “Book of Changes” is like reading a de-compiled binary.
You sort of getting it here and there, some pieces are trivial, and some are totally obscure.
At the same time it is clearly structured somehow, it’s just that structure keeps eluding you.
Okay, let me start from the beginning.
1.1. How I started reading the Book of Change
I have always suffered from over-estimating myself.
Really, what is there difficult about reading basically any book in any language? Just take a dictionary, query the sentences one by one, word by word, and you are going to get a rough idea of any text. If you are an Indo-European speaker, try doing it with Latin.
Is it going to work? Well, not really. In Latin you have those pesky inflections, conjugations, declensions, when meaning is transmitted by word forms rather than words themselves.
But what about Chinese, especially old Chinese. Even modern Chinese does not have much grammar and has very little syntax. Surely with Chinese it should be possible?
Those were my thoughts when I bought a standard edition of “周易”, with a preface saying that it is intended to be read by parents to their children.
I spent about a weekend trying to decipher what is going on, and was overwhelmed by flying dragons (龍), speaking elephants (象), strange (magic) numbers appearing out of nowhere, superficial symmetries and a disgusting feeling that “just a little more and I will be able to make sense out of it”. Then another weekend. Then one more. Doesn’t that sound familiar to anyone trying to reverse-engineer a binary file, or even read some spaghetti code in C++?
At some point I gave up and decided that I am going to cheat and read an English translation. I just need to find a decent one, not the one done by anime fanboys which revere everything Asian and are not ready to apply critical thinking to whatever they read.
After browsing a library for a while, I found the “Book of Change” by Richard Rutt, who had been an interpreter for the U.S.~Army during the Korean war in the 1950s.

Unfortunately, even though the book uses pīnyīn for transliteration, it does not use tone marks, which makes it very difficult to find out what is going on, and sometimes allows opposing interpretations. (For example, some structures are described as “cheng”, which can mean both “chéng”(乘) and chēng (撑), which are really opposites.)
It took me months of free time to reverse engineer the book and to place the correct tone marks where they are due (and also research all the cross-references and citations). Does not this also remind you of reading an old piece of code which “somehow works”, but you need to develop and maintain it?
1.2. What is the Book of Change and how to read it? ATTACH
Well, it is a bit hard to explain.
Let us go back to the Korean flag.

The four groups of three lines, broken and solid, are coming from the Book of Changes. In fact, they are not really coming form the original text (Zhōu Yì), but from a later, Hàn dynasty, compilation, called Yì Jīng which, despite being written almost a thousand years later, became the true classic of Chinese culture.
Those groups are called “trigrams”, and represent nothing more than “machine half-words” of three bits. Yes, really, 2400 years ago people already knew about bits.
In fact, those “machine words” of six bits (twice the three-bit half-words) are what the original book is about.
The source of the original text (Zhōu Yì, not Yì Jīng), is a little bit similar to a description of a peculiar assembly language, which gives each “machine word” a short description of what it does, as well as gives implementation details for each bit, that is why exactly it has to be 1 or 0 so that the computational module as a whole produces the desired effect on the computational flow.
The list of the “words” is the following:
䷀ ䷁ ䷂ ䷃ ䷄ ䷅ ䷆ ䷇ ䷈ ䷉ ䷊ ䷋ ䷌ ䷍ ䷎ ䷏ ䷐ ䷑ ䷒ ䷓ ䷔ ䷕ ䷖ ䷗ ䷘ ䷙ ䷚ ䷛ ䷜ ䷝ ䷞ ䷟ ䷠ ䷡ ䷢ ䷣ ䷤ ䷥ ䷦ ䷧ ䷨ ䷩ ䷪ ䷫ ䷬ ䷭ ䷮ ䷯ ䷰ ䷱ ䷲ ䷳ ䷴ ䷵ ䷶ ䷷ ䷸ ䷹ ䷺ ䷻ ䷼ ䷽ ䷾ ䷿
Can you fit a lot of data into 6-bit words? Well, not really, but you could make a calculator which can count to 64.
For example, you could have the word partitioned into 3 parts, 2 bits each. Two bits give 4 instructions: +, -, \(\cup\) \(\cap\), and two two-bit operands, denoting 1 to 4 in decimal. (Why not multiply/divide? Because those are too irregular, and you need to care about carry.)
3 times 3 makes 9, which does not really fit into 8 bits, but if you sacrifice the last bit of the instruction, it works.
Here are your mnemonics for 2-bit operations:
⚌ ⚍ ⚎ ⚏ 𝌁 𝌂 𝌃 𝌄 𝌅
Of course, old Chinese did not do anything this stupid. Instead of dividing one hexagram into three bigrams, to make a calculator which can count to 9, they used three-bit half-words: ☰ ☱ ☲ ☳ ☴ ☵ ☶ ☷, also called trigrams. Or at least the Hàn scholars, which were reverse-engineering Zhōu computations (算命, suàn mìng, from Chinese “calculate commands”.)
They assumed that the instruction set was the following:
- One 6-bit word defines a command (one hexagram).
- Two three-bit half-words (trigrams) define the operands for the command, which are unlikely to be immediate operands, because computing with numbers less than 8 is a pity, but were probably displacements relative to the address of the instruction pointer, in which case 8 is enough.
- Two words pointed to by the operands of the command served as the arguments of the operation.
This gave them a full 6-bit arithmetic, which is enough to execute and arbitrary Turing-complete program and model any interesting phenomenon.
The ancient Chinese did not know an alphabet, but they had to represent their language somehow, which means that they had to encode their language into their primitive computational machines.
As far as I know, they did not know variable-length prefix-free coding, such as UNICODE, so instead of expanding their instruction set to the thousands of codepoints needed to encode all of Chinese, they would just strip-down their language to a bare minimum, to 64 “letters”, which had to represent any idea that a programmer (at that time called a “diviner” as a pun on the fact that computations predict results of a physical process) might want.
Their version of the ASCII table (one instruction=one symbol) is below:
- ䷀乾 - Qian
- ䷁坤 - Kun
- ䷂屯 - Zhun
- ䷃蒙 - Meng
- ䷄需 - Xu
- ䷅訟 - Song
- ䷆師 - Shi
- ䷇比 - Bi
- ䷈小畜 - Xiao Xu
- ䷉履 - Lu
- ䷊泰 - Tai
- ䷋否 - Pi
- ䷌同人 - Tong Ren
- ䷍大有 - Da You
- ䷎謙 - Qian
- ䷏豫 - Yu
- ䷐隨 - Sui
- ䷑蠱 - Gu
- ䷒臨 - Lin
- ䷓觀 - Guan
- ䷔噬嗑 - Shi He
- ䷕賁 - Bi
- ䷖剝 - Bo
- ䷗復 - Fu
- ䷘无妄 - Wu Wang
- ䷙大畜 - Da Xu
- ䷚頤 - Yi
- ䷛大過 - Da Guo
- ䷜坎 - Kan
- ䷝離 - Li
- ䷞咸 - Xian
- ䷟恆 - Heng
- ䷠遯 - Dun
- ䷡大壯 - Da Zhuang
- ䷢晉 - Jin
- ䷣明夷 - Ming Yi
- ䷤家人 - Jia Ren
- ䷥睽 - Kui
- ䷦蹇 - Jian
- ䷧解 - Jie
- ䷨損 - Sun
- ䷩益 - Yi
- ䷪夬 - Guai
- ䷫姤 - Gou
- ䷬萃 - Cui
- ䷭升 - Sheng
- ䷮困 - Kun
- ䷯井 - Jing
- ䷰革 - Ge
- ䷱鼎 - Ding
- ䷲震 - Zhen
- ䷳艮 - Gen
- ䷴漸 - Jian
- ䷵歸妹 - Gui Mei
- ䷶豐 - Feng
- ䷷旅 - Lu
- ䷸巽 - Xun
- ䷹兌 - Dui
- ䷺渙 - Huan
- ䷻節 - Jie
- ䷼中孚 - Zhong Fu
- ䷽小過 - Xiao Guo
- ䷾既濟 - Ji Ji
- ䷿未濟 - Wei Ji
Of course the ancient Chinese knew the difference between P and BPP complexity classes, but I will re-state them here for clarity:
A language L is in BPP if and only if there exists a probabilistic Turing machine M, such that:
- M runs for polynomial time on all inputs
- For all x in L, M outputs 1 with probability greater than or equal to 2/3
- For all x not in L, M outputs 1 with probability less than or equal to 1/3
P contains all decision problems that can be solved by a deterministic Turing machine using a polynomial amount of computation time, or polynomial time.
Ancient Chinese computers were much more primitive than we have now, and needed an external supply of random bits, usually in the sets of 9.
It is really easy: 6 bits are needed to select one hexagram out of 64, and 3 bits are needed to select a particular line out of the 6 available in a hexagram. In fact, we need 2.5 bits, because 6 is not a power of 2, but the remaining half-bit would be still useful, because sometimes there is a need to apply randomness not just throughout the computational process (the BPP model), but also in the process of decoding the text. The last half-bit is thus used to select the codeword or the “extranumerary” bits in the codewords 1 and 2.
It is not entirely clear what most of the codewords meant in that ISA, but we can be certain about the codewords 1 (䷀乾) and 2 (䷁坤): “call a procedure” (干, old Chinese Qián, modern Chinese Gān, which means “to do”, so very naturally “do” a procedure) and “yield a value” (坤, both Old and Modern Chinese Kūn, “to yield”).
It is easy to guess that ䷇比 is a comparison operator ( A < B), ䷖剝 is a noop operator, and ䷗復 is a copying operator because these words still mean the same thing in modern Chinese. Generally, most single-bit operators are easy to guess.
The evaluation was performed in a series of calls to “eval” and “apply”, which is epitomised in the famous “Yīn/Yàng” symbol:

Specifically, it was probably carried out as some kind of a fluidic solver:
- https://pmc.ncbi.nlm.nih.gov/articles/PMC6553589/
- https://theconversation.com/researchers-built-an-analogue-computer-that-uses-water-waves-to-forecast-the-chaotic-future-205842
If the “hexagrams” are actually bone plates with punched holes, it makes sense that in addition to performing calculations, the programmer also has to care about sufficient and not excessive pressure in the machine, hence paying particular attention to the first and the fourth “carrier” bits (holes). Alternatively, if one looks at the earliest depictions of the machine words:
it starts to make sense that the machine words were not punched bone cards, but rather something like clay tablets with troughs and/or bumps, which either impeded or diverted the flow of water.
The ancient Chinese had a very good understanding of binary arithmetic, as we know from other sources, not just the assembly manual:
When everyone in the world knows beauty as beauty, ugliness appears. When everyone knows good as good, not-good arrives. Therefore being and non-being give birth to one another; Difficult and easy give completion to one another; Long and short form one another; High and low fill? one another; Sound and voice harmonize with one another; Ahead and behind follow after one another. Therefore the sage accomplishes things by doing nothing, Furthering a teaching that is without words. All things arise, and he does not leave them. He gives them life but without possessing them. He acts but without relying on his own ability. He succeeds but without dwelling on his success. And because he does not dwell on it, it does not leave him.
This is one of the first self-reflections of a programmer in the world. The especially noteworthy part is “He gives them life but without possessing them”, that is, he is writing programs who appear to be alive, but he publishes them in the open-source form to not possess them, and also “Therefore the sage accomplishes things by doing nothing”, where the sage (the programmer) is relaxing while his program is doing things for him, making him rich his goals.
Ah, at the end of the brief introduction to the Book of Change, I must explain why and how exactly the word “change” comes into play.
In modern terms, the “change”, “yì” (易) would rather be correctly called “bit flipping”. When a bit changes, it switches from a state to an opposite state, there is nothing really happening there. But through the process of flipping bits, the encoding transforms from a set of codewords encoding the input and the program into the set of codewords encoding the answer, and this is how the programmer’s manual came to be known as a “manual of change”.
1.2.1. Translation details
Let me try and translate a few codeword descriptions.
元亨利贞
- Richard Rutt :: Supreme offering. Favourable augury.
- James Legge :: (represents) what is great and originating, penetrating, advantageous, correct and firm.
- Me :: Always return “true” value.
- ䷖剝 - Bō
- 不利有攸往。 :: Does not return, computational flow goes indefinitely. (noop)
- 初六:剝床以足,蔑貞凶。 :: First, carrier (medium) bit is zero, computational flow gathers at the bottom. Does not affect return value.
- 六二:剝床以辨,蔑貞凶。 :: Second, logic bit is zero, does not affect computation value.
- 六三:剝之,无咎。:: Third bit is zero, but there should be no flow through it anyway.
- 六四:剝床以膚,凶。:: Fourth (second-carrier) bit is zero, does not affect the value.
- 六五:貫魚,以宮人寵,无不利。:: Fifth bit is zero, the flow gathers in the accumulator, does not affect the value.
- 上九:碩果不食,君子得輿,小人剝廬。:: Sixth (topmost) bit is finally non-zero, the implementer must enforce this strictly, otherwise programmers (小人) will rip the skin off the machine.
- ䷇比 - Bǐ
- 比:吉。原筮元永貞,无咎。不寧方來,後夫凶。 :: Comparator. Works well. Originally written program always returns the correct value, no matter what. It does not matter if which direction the flow goes, backwards flow does not affect the value.
- 初六:有孚,比之,无咎。有孚盈缶,終來有它吉。 :: The first bit is zero. Even if there is an overflow, it should not matter, because the flow goes into the “overflow cup”, which is ultimately good for the machine.
- 六二:比之自內,貞吉。:: The second bit is zero. It is the Comparators internal flow, the value is always correct.
- 六三:比之匪人。 :: The third bit is zero. Compares with the opponent.
- 六四:外比之,貞吉。 :: The fourth bit is zero, compares with the outside. The value is always high quality (perhaps the pressure is always good).
- 九五:顯比,王用三驅,失前禽。邑人不誡,吉。 :: The fifth bit is zero. This is the result of the comparison. Control uses three valves. Used to be have a bird as a part of the indicator, but not any more, because people complained. Which is ultimately good.
- 上六:比之无首,凶。:: The top bit is one, in fact it is not needed for the comparator, so ignored.
1.3. The programmer’s manual
I should further note that the problem of constantly changing computational frameworks was clearly very painful for the Zhōu programmers, as Dào Dé Jīng testifies:
A good cook changes his knife once a year - because he cuts. A mediocre cook changes his knife once a month - because he hacks. I’ve had this knife of mine for nineteen years and I’ve cut up thousands of oxen with it, and yet the blade is as good as though it had just come from the grindstone. There are spaces between the joints, and the blade of the knife has really no thickness. If you insert what has no thickness into such spaces, then there’s plenty of room more than enough for the blade to play about it. That’s why after nineteen years the blade of my knife is still as good as when it first came from the grindstone.
Nowadays we can see exactly the same situation, the old knife (UNIX, C, and GNU Bash) are still as sharp as in the 70s, whereas Rust and JavaScript keep reinventing themselves every month, because they hack. But I digress.
In addition to the handbook on the instruction set architecture and the implementation, the Yì Jīng, a much later compilation (which includes Zhōu Yì), also includes some documents which were not written by the machine designers.
- Programmers review (彖传, tuán zhuàn, meaning “the one who infers”, programmer) on the new ISA
- Circuit/performance analysis profiles (象传, xiàng zhuàn, literally “scheme analysis”) which analyses how signal flows through each of the circuits implementing the instruction
- Programmer’s manual (繫辭, xì cí), literally “connecting words”, meaning “writing programs”.
- Short history of the ISA (说卦, shuōguà)
- A mnemonic for memorising the ISA , (序卦,Xùguà)
- An attempt to simplify the instruction set by dividing it into two parts, unfinished and seemingly later abandoned (杂卦, záguà, literally “your instruction set is in disarray”)
1.3.1. Tuán zhuàn
Tuánzhuàn is basically notes of a programmer who tried to learn how to use the machine, or even to rebuild it, perhaps several hundred years after the original ISA was documented.
Let us have a look at what he things about implementing the Comparator ䷇比 - Bi:
比,吉也,比,輔也,下順從也。 原筮元永貞,无咎,以剛中也。 不寧方來,上下應也。後夫凶,其道窮也。
Okay, the comparison instruction, always correct, very useful(輔), even though the lower part has a weak flow of computation. The original program should always produce a stable value, no matter what, because the flow through the middle pipes is stable. In reality this is false, for both directions of computation (!), because the central pipes of the second and the fifth pipes correspond and no matter how the engineers (夫) maintain the machine, the computation flow (道) will be too weak to power the computation further (其道窮).
Very simple and straightforward, all of the first appendix is like this.
I think that the computational flow was really going in a loop, perhaps flowing through the upper part in one direction and through the lower part into the other direction. (Of course, you could reverse the flow, this is why the programmer constantly mentions 方來 and 攸往.)
The machine was, evidently, not as stable as the ISA manual supposed.
Another example is Tài
- ䷊泰 - Tài
泰,小往大來,吉亨。 則是天地交,而萬物通也; 上下交,而其志同也。 內陽而外陰,內健而外順,內君子而外小人,君子道長,小人道消也。
It looks like the instruction was really for the accumulation of the excessive computational flow. (Again, remember that fluid computer programmers have to care not just about truth values, but also about the pressure of the computational flow, the “carrier” (道).)
Tài, one part passes the flow, the other accumulates, always returns “true”, or so they say. In reality, the computational block works like a junction, thousands of bits passing through, not staying. (Here I suspect that certain particles had to be in the flow in order for the machine to compute.) They flow both at the top and at the bottom, so its effect is identical. As usual, they promise that the element will accumulate the flow inside, but in reality it leaks outside. Maybe their internal ISA gigachads (內君子) know how to set it up, but we, outside are mere programmers (外小人). Computational flow gigachads can ensure the flow (道) pressure is high, but for us it is leaking all over the place.
1.3.2. Xiàng zhuàn
1.3.3. Other appendices
Other appendices clearly develop some theory of higher-level computing. For example,
closing a door is called Kun, and opening a door is called Qian. Closing and opening is called alternation, endless toing and froing is called development. What is then perceived is called a figure; given shape it is called an object; putting it to use is called method.
clearly is the earliest introduction of class(shape)-object-method relationship in human history, albeit with an unduly reference of binary arithmetic in the form of Qian and Kun.
1.4. Wúwéi (the principle of minimal action)
There is actually no mention of 無爲/无为 in 周易, but it is actually closely related to the ancient Chinese skill of cybernetics, so deeply understood by the Sages.
Wúwéi manifests in the fact that fighting with a machine is of no use (无用). To explain it, imagine the following loop:
while true ; do sleep 60 xscreensaver-command -lock done

No matter how strong you are, how much willpower you possess, or how skilful you are in typing your password, your work will still be interrupted every minute, unless you follow the principles of 道
, and pkill xscreensaver
.
In the case of the part of cybernetics dedicated to managing humans, well, the principle is the same – if your management process is draining your power, you will never guide the company into the direction intended.
So, 道
is essentially “the graph of computation”, which the physicists call a “world line”, and 易
is its differential with respect to time in the Minkowski space.
The book stresses quite a few times that spending “action” to achieve what you want to achieve is unlikely to succeed, because fighting against the world line it like fighting against the machine. However, sages manage to apply their “action” to redirect the world line slightly, so that eventually it comes into the point the programmer needs.
1.5. Postface
Of course, this essay is a game, do not take it too seriously.
However, there are a few things to consider.
Bits
Bits, as far as we understand them, have to intrinsic meaning, and the meaning of ASCII 01000000 (@) is not composed of two independent 0100 and 0000.
Thinking about a-priori meaningless structured things
STEM people often find it enjoyable in thinking about mechanistic things, such as chess, tabletop games, even Rubik’s cube.
The Book of Changes and divination in general seems to be lying in the same domain, but taking this notion to the extreme. There is no meaning in the hexagrams whatsoever, yet they are structured in a fairly advanced way, at least if the tradition (Fu Xi order, Luo River Document, He Map) is studied carefully.
Presumably, thinking about structured meaningless things, that is, iterating over patterns presented to the thinker in pure forms (patterns which have no meaning), allow one to infer some regularities, consistent behaviours in things around him, which do have meaning, things the thinker is actually considering.
In this thought the Book of Changes is consistent not just with the Daoist tradition, but also with the Confucian tradition, and with modern psychology, which is quite aware of patterns in human behaviour, which sometimes overbear normal human lives and bring unhappiness, but also sometimes allow breaking away from the patterns which are not reflected by the person.
2. Notes
2.1. Caves
Seemingly, the Chinese knew the concept of cavemen even during the Han dynasty: (大传2.III)
上古穴居而野處
I have never heard about European ancient texts mentioning living in caves. The Bible mentions living in a “Garden of Eden”.
2.2. References
Wikipedia and Baidupedia have quite a few references to various memes connected to the Book of Changes: 64 hexagrams, 8 trigrams, Early Chinese mythology, Early Chinese constellations, Heavenly Stems, Earthly Branches, and such.
3. Subscribe and donate, links and blurb
- PayPal
- https://paypal.me/independentresearch
- Permalink
- https://lockywolf.net/2022_The-Book-Of-Change-by-Richard-Rutt.d/index.html
- Telegram
- http://t.me/unobvious
- GitLab
- http://gitlab.com/lockywolf
- Blog
- https://lockywolf.wordpress.com
- Liberapay + Paypal + Patreon
- See the bottom of the page.
If you donate to me, I will have more time and be able to spend more effort on producing stuff.
4. Words
- roughage :: Substances, generally of plant origin, consisting mostly of complex carbohydrates which are undigested when eaten by humans, and which therefore help the passage of food and waste through the alimentary tract; dietary fibre.
- dodder ::
- malus toringo ::
- pennons ::
- glum ::
- sojourners ::
- juncture :: a particular point in events or time
- bedight ::
- flaying ::
- ridge-pole ::
- oriole ::
- dustpan ::
- espy ::
- carter ::
- shouldering ::
- unloosing ::
- tether ::
- concur ::
- bucking ::
- bustle ::
- pinions ::
- bide ::
- betide ::
- dragon soaring away ::
- woodsman ::
- fording ::
- scud ::
- pithouse ::
- pitchpipes ::
- earthenware ::
- mustering ::
- herbage ::
- glee ::
- scrunch ::
- ripping ::
- pilloried on the stone ::
- mildew ::
- keening ::
- cangue ::
- sheen ::
- knolls ::
- flaying ::
- ewe ::
- hornboard ::
- tusks ::
- gelded ::
- gnarled ::
- warp ::
- wading ::
- Lackaday ::
- Hither and thither ::
- distraught ::
- quarry ::
- espy ::
- come nigh ::
- unwrought ::
- wailing ::
- boughs ::
- awry ::
- cleaving ::
- reaving ::
- moon waxes full ::
- pennons ::
- tabor-beats ::
- dirge ::
- sundried ::
- asterism ::
- mordant ::
- Black-naped Oriole ::
- mantic ::
- modicum ::
- gobbets ::
- dogged ::
- antepenultimate ::
- burnished ::
- rill ::
- sycophant ::
- toady ::
- brushwood :: wood of small branches especially when cut or broken
- Hither and thither :: there and back
- distraught :: not “distracted”, but rather “unhinged”
- bough :: сук
- scion :: a piece of a tree transplanted onto a different tree
- jumble :: an orderless mess, a chaotic pile of stuff