1. A method of programming a programmable element having both a source electrode and a drain electrode on a base, the base being contacted by a reference voltage contact, and the base comprising oxygen vacancies having a mobility for drifting under an applied electric field, the method comprising the steps of: applying positive voltage pulses to the source electrode and to the drain electrode to obtain a first programming state; applying negative voltage pulses to the source electrode and to the drain electrode to obtain a second programming state; applying a positive voltage pulse to the source electrode and a negative voltage pulse to the drain electrode to obtain a third programming state; and applying a negative voltage pulse to the source electrode and a positive voltage pulse to the drain electrode to obtain a fourth programming state; wherein the applied voltage pulses are relative to a reference voltage of the reference voltage contact.