1.0 g magnesium atoms in vapour phase absorbs 50.0 kJ of energy to convert all Mg into Mg ions. The energy absorbed is needed for the following changes :