Question: how are ions separated in a mass spectrometer?
Answer: Tip your bucket into a mass spectrometer. It turns the atoms into ions (electrically charged atoms with either too few or too many electrons). Then it separates the ions by passing them first through an electric field, then through a magnetic field, so they fan out into a spectrum.