Digital encoders are one of the key devices required in optical communication and digital signal processing systems. In this paper, a new photonic crystal structure is used to design all optical 4x2 encoder constructed from GaAs rods with square lattice in the pentane bachground based on plasmonic effect. Gold rods have also been used at the interface of dielectric rods and lines defect, which create plasmonic properties into the photonic crystal structure. The designed optical device is composed of four input waveguides and two output waveguides with two ring resonators at the resonant wavelength of 1.4mm with TM polarization. The presented encoder platform has the small size of 19 mm ×33 mm, that makes it to integration into all optical communication systems. The encoder operation is simulated and analyzed with numerical Finite Difference Time Domain (FDTD) method hand Plane Wave Expansion (PWE) method. In the proposed structure, we have shown that by selecting the appropriate radius size for the resonant cavities, the desirable wavelength can be obtained. The maximum values of transmission e ciency for the rst and second outputs are 82% and 96%, respectively. Resonant cavities are also located in the crystal lattice in such a way that by activating third input, 50% and 48% of the input signal will be obtained in each output ports indicating (1,1) logic state. So the new plasmonic photonic crystal encoder could be future applicable in the eld of optical computing.