You've seen and heard the word octane with relation to cars and gasoline all your life. Well, unless you never pumped gasoline into your car. Ever wonder what it means? Well, the basic answer is, the higher the octane number the more smoothly the gasoline will burn in you engine, reducing any "knocking" and increasing efficiency and mpg.
But that still doesn't tell us much. Where does this number come from, how is it determined, and what chemical and physical properties of the fuel control the final rating?
A little chemistry is needed to explain this.
Octane rating is measured relative to a mixture of 2,2,4-trimethylpentane, CH3-C(CH3)2-CH2-CH(CH3)-CH3(an isomer of octane; it has eight carbons) and n-heptane (7 carbons in a straight line).
Arbitrarily but unsurprisingly, the octane is given an octane number of 100, while the heptane is assigned 0. Mixtures of the two are then used in engine to access their different octane numbers. Incidentally, there are hydrocarbons with octane numbers (not to be confused with octane numbers compounds!) higher than 100, for jet and rocket fuels (which of course cannot be allowed to knock or fail).
You're probably asking at this point: why not just give me pure 2,2,4-trimethylpentane at the gas pump and "put a tiger in my tank?" Well, they could, but there'll be another tiger in your bank account as it would be horribly expensive. Why? Now, finally, we get to petroleum, oil, that is pumped out of the ground. Petroleum is not one compound; it is instead a mixture of many, many different chemicals. The cheapest way to separate them is by "fractional" distillation, which is rather like a much more complicated and expensive kind of distillation than used to turn wine into cognac, or mash into beer or whiskey, or just to extract straight ethanol.
So, trying to fractionate pure 2,2,4-trimethylpentane, or any pure chemical, out of crude petroleum is so expensive that only a professional race driver could afford it, if they wanted to -- they actually use other, better, fuels. It is far easier and cheaper to just take an entire fraction of the distillation process and use that as gasoline. Now we come to problem two, the big problem. This fraction, untreated, will not perform well in gasoline engines because its octane number is simply not up there enough; certainly not the 86 of the standard gasoline you buy at the pump. So -- what might we add to the fraction to get its octane number up to 86, or 89, or 91-93 (pump standards)?
The standard method for boosting octane is to add an additive. The first additive (that I know of) was tetraethyl lead. Because of its spherical shape, this compound was very effect. It did have a serious downside however. Burning it in a car engine spewed lead and lead compounds into the atmosphere, where it could be inhaled/absorbed into bodies and do real damage there -- rather like mercuric compounds. Thus, tetraethyl lead was gradually phased out, and the search for a safer additive was undertaken. The first(?) of these was methyl tert-ethyl ether, or methyl - O - C(Me)3. Like tetraethyl lead it also it is also highly spherical, making it an excellent octane booster. Unfortunately, it ran into another problem. It tended to seep into groundwater from tanks, poisoning water supplies. So it too, in the end was phased out.
Nowadays we mix up to 10% corn-ethanol (drinking alcohol) into gasoline to improve its anti-knock properties. A second reason is that, ethanol being derived from atmospheric carbon dioxide, doesn't increase the level of this important greenhouse gas, thus helping to fight anthropogenic climate warming. Many environmentalists was to increase it to 15% -- but there are negatives to it to that cause others to rid it altogether is gasoline. The problem is gasoline containing ethanol is especially subject to absorbing atmospheric moisture, then forming gums, solids, or two phases (a hydrocarbon phase floating on top of a water-alcohol phase), all of which shorten the lives of engines. This is why ethanol is still not the perfect additive. It also takes a great quantity of land to grow a sufficient quantity of corn, which drives it and other vegetables up in price.
I claim no knowledge of what a perfect additive would be. Perhaps we will have migrated from natural gasoline to syn-fuel mixtures derived from algae/plants first, via genetic engineering (as we already are), if that is, electricity and hydrogen/LNG don't get there first.