Abstract All optical logic gates are building blocks for all optical data processors. One way of designing optical logic gates is using threshold switching which can be realized by combining an optical resonator with nonlinear Kerr effect. In this paper we showed that a novel structure consisting of nonlinear photonic crystal ring resonator which can be used for realizing optical NAND/NOR and majority gates. The delay time of the proposed NAND/NOR and majority gates are 2.5 ps and 1.5 ps respectively. Finite difference time domain and plane wave expansion methods were used for simulating the proposed optical logic gates. The total footprint of the proposed structure is about 988 μm2.