Hexagrams and lines

A hexagram is a sequence of six lines.

There are two types of line, (-- --, -----). Regarding the two types of line as bits, a hexagram may be regarded as a (digital) number in the set {0, ..., 63} written in binary notation. For example, if we identify the broken line with bit 0 and the solid line with bit 1, and regard the BOTTOM line of a hexagram as the MOST significant bit, then the hexagram,

	-----
	-----
	-- --
	-- --
	-----
corresponds to the binary number, 10011, or digital 19. Leibniz pointed this out in the early 18th century.

Hyperhexagrams and hyperlines

A hyperhexagram is a sequence of six hyperlines. There are four types of hyperline, (--x--, -----, -- --, --o--) aka (old yin, young yang, young yin, old yang). Regarding the hyperlines as quadrits (symbols of arithmetic base 4) a hyperhexagram corresponds to a (digital) number in the set {0, ..., 4095} written in quatrinary (base 4) notation. But the I Ching has a different system. Each hyperhexagram is regarded as a code for a pair of hexagrams. The rule is as follows. If h = (h1,.., h6) is a hyperhexagram, then we map it to a pair of hexagrams, (a, b) = ((a1,.., a6), (b1,.., b6)) according to the table of values,
	h	a	b	mnemonic
	--x--	-- --	-----	old yin (changes)
	-----	-----	-----	young yang (unchanging)
	-- --	-- --	-- --	young yin (unchanging)
	--o--	-----	-- --	old yang (changes)

Changes

The pair of hexagrams (a, b) is called a change (at least in case a != b) and the I Ching (Book of Changes) is an encyclopedia of interpretations of the 4096 - 64 = 4032 changes.

The yarrow stalk oracle

The yarrow stalk oracle produces a hyperhexagram hyperline-by-hyperline. The first hyperline produced is the bottom hyperline. Three casts are made for each hyperline. The result of each cast is number of stalks, the cast count, which is a 5 or 9 for the first cast, and a 4 or 8 for each of the other two casts. The three cast counts are combined into a hyperline line count by the traditional rule: replace a cast count 5 or 4 by the cast code 3, replace a cast count of 9 or 8 by the cast code 2, and add the three cast codes to get the hyperline code, 6, 7, 8, or 9. These codes correspond to the hyperline types as follows:
	hh code		hh type
	6		old yin
	7		young yang
	8		young yin
	9		old yang

An alternative and equivalent rule

It is easily proved that this rule is equivalent to that given above. Let S denote the sum of the three cast counts. This must be 13, 17, 21, or 25. Let T(S) = (49 - S)/4. Then T(S) is (respectively) 9, 8, 7, or 6, and is the correct hyperline code for each case of three cast codes. The yarrow stalk meaning of this formula for T(S) is the number of groups of four stalks in the discard pile after completing the third cast.
Revised 17 July 2003 by Ralph