HI can be prepared by combing H2 and I2. This reaction is used to generate high-purity samples. This mixture of gases is being irradiated with the wavelength of light equal to the dissociation energy of I2, about 578 nm. This supports a mechanism whereby I2 first dissociates into 2 iodine atoms, which each attach themselves to a side of an H2 molecule and break the H−H bond.