If the number of electrons in the outermost shell of the atom of an element is less than or equal to 4, then the valency of the element is equal to the number of electrons in the outermost shell. On the other hand, if the number of electrons in the outermost shell of the atom of an element is greater than 4, then the valency of that element is determined by subtracting the number of electrons in the outermost shell from 8.
The atomic number of chlorine, sulphur and magnesium are 17, 16 and 12 respectively.
The distribution of electrons in chlorine is 2, 8, 7.
The distribution of electrons in sulphur is 2, 8, 6.
The distribution of electrons in magnesium is 2, 8, 2.
Therefore, the number of electrons in the outer most shell of chlorine, sulphur, and magnesium atoms are 7, 6, and 2 respectively.
Thus, the valency of chlorine = 8 −7 = 1
The valency of sulphur = 8 − 6 = 2
The valency of magnesium = 2