The steps that produces the products carbon dioxide, water and carbon monoxide begins with the step of introducing the fuel-air mixture to the piston, then the piston is expands (going upwards) and simultaneously a spark plug ignites. This allows combustion to occur and form these flue gases.