During photosynthesis, carbon dioxide and water molecules enter a chloroplast. Light splits water into its component hydrogen and oxygen atoms. The oxygen atoms are combined to form oxygen gas (O2) that escapes into the atmosphere. The hydrogen and carbon dioxide are incorporated into molecules of sugar (glucose is shown here).