In the light-dependent reactions, a photon of light hits an electron located in the thylakoid membrane of the chloroplast in photosystem II. This causes the electron to gain energy and jump to a higher energy state, generating an oxygen molecule at the same time which can be released into the atmosphere. This electron then travels down an electron-transport chain through a series of electron carries. As it does, energy is released. This energy can be used to pump H+ ions across the membrane through ATP synthase, which phosphorylates ADP at the same time, generating ATP. The electron then travels to photosystem I, where a similiar reaction occurs. However, this time NADP+ is reduced, creating NADPH instead of ATP.