Recently, with the improvement of the requirements for fast and efficient data processing in the era of artificial intelligence, new forms of computing have come into being. Developing memristor devices that can simulate the brain's computing neutral network is particularly important for applications in the field of artificial intelligence. However, there are still some challenges in their biological function simulation and related circuit design. In this work, a memristor based on perovskite rare earth nickelates (RNiO3) is presented with excellent electrical performance, including three orders of magnitude higher current switching ratio and good repeatability, and can achieve bidirectional conductance regulation like weight modulation in bio-synapse. Furthermore, the synaptic like characteristics of the device have been mimicked successfully, such as excitatory postsynaptic current (EPSC), paired pulse facilitation (PPF), classical double pulse spike time-dependent plasticity (classical pair-STDP), triplet spike time-dependent plasticity (triplet-STDP), short-term plasticity (STP), long-term plasticity (LTP), the refractory period phenomenon and learning and forgetting rules. In particular, two synaptic devices and a leaky integrate-and-fire (LIF) neuron device are used to achieve a logic gate circuit to realize "AND", "OR", and "NOT" functions. The device paves the way for the application of high-density circuits in artificial intelligence.