The eight characters are composed of heavenly stems and earthly branches. The heavenly stems are divided into yin and yang, and the earthly branches are also divided into yin and yang. Pushing forward, we can see that the theory of yin and yang of the five elements also comes from this, and the concept of yin wood or yang wood that we often hear also comes from this.
From the perspective of heavenly stems, the attributes of Yang are: A, C, E, G and Ren. The attributes of Yin are: B, D, Self, Xin and Ghost. From the perspective of earthly branches, the odd number is Yang and the even number is Yin. Therefore, the yin and yang properties of the five elements and the eight characters are different, which is the conclusion drawn from this comparison.