Resistive switching (RS) memristor has been widely used in the in-memory computation systems. Due to the strong information processing capability and low area cost of the ternary logic, the development of the three-state RS memristor was promoted. Here, we demonstrate a three-state RS phenomenon on Pt/BiFeO3/SrRuO3 structure. After applying a positive voltage to the thin film for a period, an abrupt RS effect occurs, where the three-state RS behavior can be obtained. By analyzing the conduction mechanisms of the current-voltage curves and the behavior of the capacitance-voltage curves, the three-state storage capability of the memristor can be ascribed to the movement of oxygen vacancies and the trapping/detrapping of charge carriers at the interface. The ternary OR logic gate was also designed with three steps by using only one memristor.