New computing-in-memory architecture based on memristors can achieve in situ storage and computing of data, which greatly improves the computing efficiency of the hardware system. Here, a reliable bilayer structured TaO x /Al 2 O 3 memristor with a 2 nm Al 2 O 3 insertion layer is demonstrated. This device exhibits stable and gradual switching behavior with a low set/reset voltage (0.61 V/−0.49 V) and multilevel conductance characteristics. It is further indicated that the device has a larger ON/Off ratio (≈148×) and better nonlinearity of conductance modulation by inserting an Al 2 O 3 layer. Various forms of synaptic plasticity are mimicked, such as long-term potentiation/depression (LTP/LTD), paired-pulse facilitation (PPF), and spike-timing-dependent plasticity (STDP). Based on the quasi-linear conductance modulation characteristics, excellent classification accuracy (90.4%) is achieved for the applications of handwritten digit recognition. Moreover, the logic operations (intersection, union, and complement) are implemented on a 3 × 5 memristor array, which shows an efficient way to design versatile and reliable devices and provides a novel idea for neuromorphic computing and in-memory logic operation.