The carbon cycle describes the movement of carbon through producers, consumers, and decomposers. Carbon dioxide enters producers through photosynthesis and is consumed by consumers when eating other organisms. Decomposers and respiration return carbon to the atmosphere as carbon dioxide. The oceans and rocks store large amounts of carbon but exchange it slowly.
The nitrogen cycle involves transformation of nitrogen between organic and inorganic forms by microbes and other organisms. Nitrogen is fixed from the atmosphere by lightning, industrial processes, and microbial activity. Plants and microbes assimilate nitrogen from the soil and it is returned through ammonification, nitrification, and denitrification.