The beam first passes through the "buncher" cavity resonator, through grids attached to each side. The buncher grids have an oscillating AC potential across them, produced by standing wave oscillations within the cavity, excited by the input signal at the cavity's resonant frequency applied by a coaxial cable or waveguide. The direction of the field between the grids changes twice per cycle of the input signal. Electrons entering when the entrance grid is negative and the exit grid is positive encounter an electric field in the same direction as their motion, and are accelerated by the field. Electrons entering a half-cycle later, when the polarity is opposite, encounter an electric field which opposes their motion, and are decelerated.