The Shang Dynasty ruled from around 1766 BCE to 1027 BCE in northern China. They established their capital city of Yin and developed a system of writing using pictographs. Society was divided into classes like kings, nobles, and peasants. The Zhou Dynasty then ruled from 1027 BCE to 221 BCE, establishing a feudal system. They expanded Chinese culture and saw developments in metallurgy, coinage, and trade. By the Warring States period starting in the 7th century BCE, the king's power declined as noble families fought for control.