This paper presents all-optical AND, XOR, and NOT logic gates based on the light beam interference effect. Each logic gate is simply composed of a Y-branch waveguide with two input ports and one output port in the two-dimensional triangular-lattice photonic crystals. The designed logic gates are analyzed and simulated by the plane wave expansion and finite difference time-domain method. Simulation results show that the proposed all-optical structures really function as AND, XOR, and NOT logic gates, possess a small size of less than 11.6 μm × 13.8μm and low power consumption. The contrast ratio of the proposed devices reaches 5.4 dB for the AND gate, 33 dB for the XOR and NOT gates, respectively, by precisely controlling the phase differences and properly choosing the size of the scattering rods.