yarrow stalks

When doing the divination with yarrow stalks, fifty dried stalks are selected from a bundle and taken in the left hand. Then one yarrow stalk is put away. The remaining 49 yarrow stalks are divided into two piles and, taking four yarrow stalks from each pile, are counted according to a complicated system until the result is either 2 or 3. This process is repeated three times and the sum is added up. The values 6 and 8 represent a broken line (yin) and 7 and 9 a solid line (yang). This process is repeated six times until the hexagram is complete.
The values 6 and 9 are regarded as changing lines, i.e. they change into their respective opposite: 6 (Yin) becomes 7 (Yang), 9 (Yang) becomes 8 (Yin). This transforms the original hexagram into another of the 64 hexagrams.

Read more: https://en.wikipedia.org/wiki/I_Ching_divination#Yarrow_stalks