Farting is from the gas that is produced of the chemical process of breaking down carbohydrates and proteins by enzymes and bacteria. A fart comes out through the butt due to a process called peristalsis. During this process the small intestines squeezes all its contents towards the butt in several contractions. Visit www.heptune.com/farts.html for more information.
Flatulence is the expulsion through the rectum of a mixture of gases that are byproducts of the digestion process of mammals and other animals. The medical term for the mixture of gases is flatus, informally known as a fart, or simply (in American English) gas. The gases are expelled from the rectum in a process colloquially referred to as "passing gas", "breaking wind" or "farting". Flatus is brought to the rectum by the same peristaltic process which causes feces to descend from the large intestine. The noises commonly associated with flatulence are caused by the vibration of the anal sphincter, and occasionally by the closed buttocks.Intestinal gas is composed of varying quantities of exogenous sources (air that is ingested through the nose and mouth) and endogenous sources (gas produced within the digestive tract). The exogenous gases are swallowed (aerophagia) when eating or drinking or increased swallowing during times of excessive salivation (as might occur when nauseated or as the result of gastroesophageal reflux disease). The endogenous gases are produced either as a by-product of digesting certain types of food, or of incomplete digestion. Anything that causes food to be incompletely digested by the stomach and/or small intestine may cause flatulence when the material arrives in the large intestine, due to fermentation by yeast or prokaryotes normally or abnormally present in the gastrointestinal tract.