This paper constructs and discusses a 1×2 decoder based on two-dimensional photonic crystals. The designed decoder is a priority decoder with one main input and one enabled input. This logic circuit's structure is very simple and compact, and it employs a photonic crystal structure with dimensions of 11×11 rods built of GaAs. The calculation results reveal that the output power values for logical mode 1 are extremely close to the power of the light source, whereas the power is very low and close to zero in logical mode 0. As a result, the difference between logical values 0 and 1 in the output will be adequate, and the circuit's accuracy will be good. The finite difference-time domain (FDTD) approach is used for time computations and light propagation in waveguides.