Fermentation is process by which yeast converts various simple sugars into ethyl alcohol and carbon dioxide gas. It can take many forms, and only certain types of fermentation produce end results which are pleasant to drink. Chemically, the conversion by which yeast turns sugar into alcohol is:
Sugar → Alcohol + Carbon Dioxide + Energy
or, in chemical notation:
C6H12O6 → 2C2H5OH + 2CO2 + energy
Yeast is also capable of producing energy aerobically (with oxygen extracted from the air) by the conversion: Sugar + Oxygen → Carbon Dioxide + Water + Energy
C6H12O6 + 6O2 → 6CO2 + 6H2O + energy
The second conversion produces far more energy, largely because the entire sugar molecule is broken down and converted, but is only possible in the presence of sufficient oxygen; the first conversion on the other hand can be carried out with only sugar present. For this reason, fermentation for the production of alcohol should take place in a low oxygen environment to ensure that sugar is converted to alcohol instead of carbon dioxide and water. It is often desirable, however, to have the wort well oxygenated at the start of the fermentation process to ensure a fast initial growth of yeast while aerobic conversion is possible, followed by a change to anaerobic respiration and the production of alcohol when the dissolved oxygen in the wort is depleted.