Nowadays, the development of optical telecommunication systems requires more efficient all-optical elements appreciation to their high data transmission speeds and reduced electromagnetic interferences. In this work, our objective is to attest by simulation a design of an optical switch using 2D photonic crystals from polystyrene, an organic polymeric material with high Kerr non-linearity. This excellent ultra-fast switching leads us to the exploited in the construction of two new structures of all-optical AND/NAND and OR/NOR logic gates. These structures based on non-linear ring resonator NRR of different radius in order to operate a telecom wavelength of 1550.3 µm using RSoft (Full-Wave) software. The average contrast intensity is between 15.52 and 23.42 dB and low delay time varied from 20 fs to 5.0 ps. Hence, resulting a very high output signal for ON-switching (82–130% of P
in) and a weak signal for OFF-switching (0.2–7% of P
in) through a minimum threshold power around of 1.2 mW/μm2.