The process of extracting ATP from NADH and FADH2. Electrons from NADH and FADH2 pass along an electron transport chain. The chain consists of proteins that pass these electrons from one carrier protein to the next. Alone each step of the chain, the electrons give up energy used to phosphorylate ADP to ATP. NADH provides electrons that have enough energy to generate about 3 ATP, while FADH2 generates about 2 ATP.