Compounds which have one of the following structural units, on heating with a halogen ( Cl2, Br2, or I2) in the presence of a base like NaOH or KOH give rise to a haloform (chloroform, Iodoform). )
As in Acetone, Acetophenone, Acetaldehyde.
As in Ethanol, 2-Propanaol.
Chloroform: It is prepared by heating bleaching powder [Cl2 + Ca(OH2) ] and ethanol. Chloroform is a colorless liquid, generally preserved in the presence of small amounts of ethanol (negative catalyst) to prevent the formation of carbonyl chloride ( phosgene) which is highly poisonous. Chloroform was used as an anesthetic during surgery; it is no longer used now because of side effects like liver and cardiac toxicity. Halothane is the anesthetic used now. (CF3CHBrCl).
Net reaction using NaOH as the base
Aldehydes and ketones with a methyl group next to the carbonyl group, will also give rise to haloform. The difference is the oxidation step will not be there. Substitution of the three alpha-hydrogens by halogen atoms take place in the second step. The hydrogens replaced by halogens are all from the same side of the carbonyl group, in compounds like CH3COCH3. Once a hydrogen is replaced by halogen the other hydrogen atoms at that carbon become more acidic causing further substitution at the same place.
Attack of the base on the trisubstituted compound results in haloform.
The reaction using Iodine gives rise to a yellow precipitate of Iodoform. It is called Iodoform test useful in diagnosis of methyl ketones or aldehydes also alcohols that have a group as indicated earlier. Thus ethanol can be distinguised from methanol, because ethanol gives a positive Iodoform test while methanol does not.