Magnesium is more electro positive than aluminum hence it functions as the anode. Six electrons are lost/gained in the redox process as shown in the oxidation and reduction half reaction equations above. Magnesium is oxidized to magnesium ion while aluminum is reduced to elemental aluminum.