Positive electrode (anode) negatively charged OH- ions and non-metal ions are attracted to the positive electrode if halide ions (Cl-, Br-, I-) and OH- are present, then the halide ion is discharged at the anode, loses electrons and forms a halogen (chlorine, bromine or iodine) if no halide ions are present, then OH- is discharged at the anode, loses electrons and forms oxygen gas; in both cases, the other negative ion remains in the solution.