### King Wen Sequence in Binary Numbers

 King Wen sequence of fourteen hexagrams in binary formats.

King Wen sequence is the sky computed in 2 raised to the power of 6.

Mathematically,
King Wen Sequence (KWS) = 2⁶
= 64

2 stands for the binary digits 0 and 1 encoded as broken and unbroken lines representing yin and yang. 6 stands for 6 bits, and 64 is the total number of binary numbers derivable from six binary digits.

The 64 binary numbers obtained from 6 bits are encoded as 64 I Ching or Yi Jing hexagrams arranged in a sequence called King Wen sequence.

The 64 hexagrams or divination figures are categorised into a group of eight single hexagrams and a group of twenty eight pairs.

A pair of hexagram is is an object and its image created by inverting a hexagram. The remaining eight hexagrams are excluded from the twenty eight pairs because their mirror images are exactly the same as the objects.

The eight symmetrical or single hexagrams are ||||||, ¦¦¦¦¦¦, |¦¦¦¦|, ¦||||¦, ¦|¦¦|¦, |¦||¦|, ||¦¦|| and ¦¦||¦¦.

To convert King Wen sequence to binary numbers, broken line is substituted by 0 and unbroken line is replaced by 1. The 64 hexagrams and their corresponding binary numbers are listed below.

111111 → ||||||

000000 → ¦¦¦¦¦¦

100010 → |¦¦¦|¦ ← 010001

111010 → |||¦|¦ ← 010111

010000 → ¦|¦¦¦¦ ← 000010

111011 → |||¦|| ← 110111

111000 → |||¦¦¦ ← 000111

101111 → |¦|||| ← 111101

001000 → ¦¦|¦¦¦ ← 000100

100110 → |¦¦||¦ ← 011001

110000 → ||¦¦¦¦ ← 000011

100101 → |¦¦|¦| ← 101001

000001 → ¦¦¦¦¦| ← 100000

100111 → |¦¦||| ← 111001

100001 → |¦¦¦¦|

011110 → ¦||||¦

010010 → ¦|¦¦|¦

101101 → |¦||¦|

001110 → ¦¦|||¦ ← 011100

001111 → ¦¦|||| ← 111100

000101 → ¦¦¦|¦| ← 101000

101011 → |¦|¦|| ← 110101

001010 → ¦¦|¦|¦ ← 010100

110001 → ||¦¦¦| ← 100011

111110 → |||||¦ ← 011111

000110 → ¦¦¦||¦ ← 011000

010110 → ¦|¦||¦ ← 011010

101110 → |¦|||¦ ← 011101

100100 → |¦¦|¦¦ ← 001001

001011 → ¦¦|¦|| ← 110100

101100 → |¦||¦¦ ← 001101

011011 → ¦||¦|| ← 110110

010011 → ¦|¦¦|| ← 110010

110011 → ||¦¦||

001100→ ¦¦||¦¦

101010 → |¦|¦|¦ ← 010101

The binary numbers on the left are products of counting each hexagram from left to right. The binary numbers on the right are products of counting the hexagram from right to left.

The kingdom is about balance between up and down, back and front, left and right, black and white, off and on, etc.

Therefore, the remaining eight hexagrams are divided into four unique pairs in which single line in a hexagram is mirrored by a double line in its pair. The four pairs created from this formula are: |||||| and ¦¦¦¦¦¦, |¦¦¦¦| and ¦||||¦, ¦|¦¦|¦ and |¦||¦|, ||¦¦|| and ¦¦||¦¦.

King Wen sequence is an arrangement of the 64 hexagrams in the Book of Changes into 32 pairs.