Memristor is the fourth passive device, that has the advantages of high speed, low power consumption, convenient integration, simple structure, and compatibility with CMOS technology. However, the current implementation of memristors is based on new materials. Although the process is compatible, the fabrication process is complicated and the materials are expensive. It is difficult to realize the large-scale commercial application of memristors. The photoelectric memristor model, proposed by our research group, is well compatible with CMOS technology, and it can be used in digital circuits to achieve faster-switching speed and higher integration density. Therefore a special XOR gate was designed and simulated by Multisim software. The model can be used as an XOR gate from its output waveform characteristics. The XOR gate enables the coexistence of computational and memory circuits, and reduce area and circuit power consumption. Also, it will have broad application prospects in logic operation, brain neural network, computer processing and the like.