The number of protons (p+) in the nuclei of an element's atoms is the atomic number of the element. In this case, the atomic number of magnesium is 12. In a neutral atom, the number of electrons (e-) equals the number of protons. So all neutral magnesium atoms have 12 protons and 12 electrons. Isotopes of an element differ in the number of neutrons (n0).There are three stable isotopes of magnesium (Mg) identified by their mass numbers; magnesium-24, magnesium-25, and magnesium-26. The mass number is the sum of protons and neutrons in the nucleus of an atom. To determine the number of neutrons, subtract the atomic number from the mass number. (mass number - atomic number = no. of neutrons)Magnesium-24: 24 - 12 = 12; An atom of Mg-24 has 12 p+, 12 e-, and 12 n0.Magnesium-25: 25 - 12 = 13; An atom of Mg-25 has 12 p+, 12 e-, and 13 n0.Magnesium-26: 26 - 12 = 14; An atom of Mg-26 has 12 p+, 12 e-, and 14 n0.