It seems impossible that a gallon of gasoline, which weighs about 6.3 pounds, could produce 20 pounds of carbon dioxide (CO2) when burned. However, most of the weight of the CO2 doesn't come from the gasoline itself, but the oxygen in the air.
When gasoline burns, the carbon and hydrogen separate. The hydrogen combines with oxygen to form water (H2O), and carbon combines with oxygen to form carbon dioxide (CO2).
A carbon atom has a weight of 12, and each oxygen atom has a weight of 16, giving each single molecule of CO2 an atomic weight of 44 (12 from carbon and 32 from oxygen).
Therefore, to calculate the amount of CO2 produced from a gallon of gasoline, the weight of the carbon in the gasoline is multiplied by 44/12 or 3.7.
Since gasoline is about 87% carbon and 13% hydrogen by weight, the carbon in a gallon of gasoline weighs 5.5 pounds (6.3 lbs. x .87).
We can then multiply the weight of the carbon (5.5 pounds) by 3.7, which equals 20 pounds of CO2!