Carbohydrates are formed by green plants from carbon dioxide and water during the process of photosynthesis. Carbohydrates serve as energy sources and as essential structural components in organisms; in addition, part of the structure of nucleic acids, which contain genetic information, consists of carbohydrate.