Complex IV uses the energy gained from the transfer of electrons to H+ and O2 to pump four additional protons across the mitochondrial inner membrane. Therefore, complex IV contributes to the proton gradient in two ways: 1) by using up four protons in a chemical reaction (to form water) and 2) by transporting four more protons across the membrane.