In his 1703 essay “Explanation of Binary Arithmetic,” Leibniz draws inspiration from the I Ching, the ancient Chinese Book of Changes. The I Ching uses hexagrams—stacks of six horizontal lines, one under another—for divination. The hexagrams can be understood as a simple binary code based on the distinction between yin and yang. Yin is encoded as a broken line, whereas yang is encoded as an unbroken line. Each line corresponds to a binary digit, or a bit.