In this research, an all-optical NOR gate is designed and simulated based on two-dimensional photonic crystals. A square lattice has been used to design this structure. This logic gate has two main inputs, a bias input and an output. Because the output of the NOR gate must be “1” for zero inputs, a bias input is required. One of the characteristics of this structure is its small size for use in optical integrated circuits. Also, in order to reduce the detection error in the output, it has been tried that the outputs have a suitable distance in two “0” and “1” logical states. The use of a small number and simple point defects makes the design of this gate easier. The simulation results show that the proposed structure is suitable for working at a wavelength of 1.55µm. Also, the amount of optical power at the output is high in the “1” logical mode and low in the “0” logical mode. This indicates that this structure has a reliable output for detecting logical values. In this paper, a photonic crystal structure is proposed to realize the NOR logic gate, which is small in size and uses simple linear and point defects. The use of very few point defects has made the design simpler and thus easier to build this gate. Due to these characteristics, this structure can be suitable for optically integrated circuits.