1. A method of programming a continuously variable resistor comprising a first electrode connected to a first chalcogenide layer, the first chalcogenide layer connected to a second chalcogenide layer having metal interspersed therein and thus making the second chalcogenide layer a metal-rich chalcogenide layer, and a second electrode electrically connected to the second chalcogenide layer, and wherein the continuously variable resistor has a resistance value that is variable, the method comprising: configuring the continuously variable resistor to have a negative differential resistance behavior, the continuously variable resistor being set to a first resistance state; applying a first voltage pulse within a first voltage potential range to the continuously variable resistor to change the resistance state of the continuously variable resistor from the first resistance state to a second resistance state, and wherein the change in resistance from the first resistance state to the second resistance state corresponds to a small decrease in resistance of approximately 20%; and applying a second voltage pulse within a second voltage potential range to the continuously variable resistor to change the resistance state of the continuously variable resistor from the second resistance state to a third resistance state, and wherein the change in resistance from the second resistance state to the third resistance state corresponds to a small increase in resistance of approximately 20%.