Nonvolatile optoelectronic memories integrated with the functions of sensing, data storage, and data processing are promising for the potential Internet of things (IoT) applications. To meet the requirements of IoT devices, multifunctional memory devices with low power consumption and secure data storage are highly desirable. This study demonstrates an optoelectronic resistive switching memory integrated with sensing and logic operations by adopting organic-inorganic hybrid CH 3 NH 3 PbI 3-x Cl x perovskites, which possess unusual defect physics and excellent light absorption. The CH 3 NH 3 PbI 3-x Cl x cell exhibits low operation voltage of 0.1 V with the assistance of light illumination, longterm retention property, and multiple resistance states. Its unique optoelectronic characteristics enable to perform logic operation for inputting one electrical pulse and one optical signal, and detect the coincidence of electrical and optical signal as well. This design provides possibilities for smart sensor in IoT application.