Archaeologists have learned much about society, architecture, farming, and technology in ancient China. Society was strictly organized with emperors at the top making rules, and ranks descending from dukes to barons to landowners and scholars. Cities and buildings were carefully planned according to design principles. Farming methods depended on region, with rice grown in south China and millet in north China. Legacies of ancient China include inventions like the compass, gunpowder, printing, and paper. Architecture featured homes and temples reflecting social status and the influence of Buddhism over time.