Most atoms do not have eight electrons in their valence electron shell. Some atoms have only a few electrons in their outer shell, while some atoms lack only one or two electrons to have an octet. In cases where an atom has three or fewer valence electrons, the atom may lose those valence electrons quite easily until what remains is a lower shell that contains an octet. Atoms that lose electrons acquire a positive charge as a result because they are left with fewer negatively charged electrons to balance the positive charges of the protons in the nucleus. Positively charged ions are called cations. Most metals become cations when they make ionic compounds.
Some atoms have nearly eight electrons in their valence shell and can gain additional valence electrons until they have an octet. When these atoms gain electrons, they acquire a negative charge because they now possess more electrons than protons. Negatively charged ions are called anions. Most nonmetals become anions when they make ionic compounds.
We can use electron configurations to illustrate the electron transfer process between sodium atoms and chlorine atoms.
As demonstrated here, a sodium atom (Na) has one valence electron in the third principal energy level. It is likely to achieve an octet in its outermost shell by losing its one valence electron. The cation produced in this way, Na+, is called the sodium ion to distinguish it from the element. The sodium ion, Na+, has the electron configuration with an octet of electrons from the second principal energy level. It is now the same as that of the noble gas neon. The term isoelectronic refers to an atom and an ion of a different atom (or two different ions) that have the same electron configuration. The sodium ion is isoelectronic with the neon atom. The equation below illustrates this process.