When sodium chloride is doped with magnesium chloride, some of the sites of Na+ ions are occupied by Mg2+ ions. For each Mg2+ ion introduced, two Na+ ions are removed to maintain the electrical neutrality. One of these lattice site is occupied by Mg2+ ion and the other is remain vacant. This is categorised as Impurity defects.