The present invention provides a method for detecting events in an input signal. The method volatile resistive switching component to detect the events in the input signal. The method comprising identifying the events based on sampling an output from the resistive switching component.