All-optical logic gates are indispensable elements in optical devices and optical computing. Our logic gates are based on bidimensional photonic crystals, where the pillars radius and lattice constant are chosen in such a way that the logic gates are actuated at the wavelength of 1550 nm. The contrast ratios for the NOT, XOR, NOR, and XNOR gates are 26.82 dB, 26.77 dB, 8.34 dB, and 20.17 dB respectively. The response time of the different logic gates is approximately 8.5 ps, resulting in a data transmission rate of 0.117 Tb/s. One of the advantages of our study, from the logic gate NOT we could design all the other gates such as XOR, NOR, and XNOR.