Magnesium is the element with atomic number 12
electron congfiguration =
1s22s22p63s2
orbital spin diagram = attached picture
Ion of magnesium is Mg2+ where two electrons from last orbital
are taken out so the configuration is
1s22s22p6
orbital diagram - attached picture

Answer