The present study was designed and simulated for an all optical half-adder, based on 2D photonic crystals. The proposed structure in this work contains a hexagonal lattice. The main advantages of the proposed designation can be highlighted as its small sizing as well as simplicity. Furthermore, the other improvement of this half-adder can be regarded as providing proper distinct space in output between “0” and “1” as logical states. This improvement reduces the error in the identification of logical states (i.e., 0 and 1) at output. Because of the high photonic band gap for transverse electric (TE) polarization, the TE mode calculations are done to analyze the defected lines of light. The logical values of “0” and “1” were defined according to the amount of electrical field.