Since in the previous existing optical designs, the electronic-optic-electronic conversion has not been completely eliminated. Construction of the optical circuits with nonlinear waveguides can overcome this drawback. The authors have developed a nonlinear directional coupler theory to describe novel all-optical parity circuits. By using three channels, appropriate adjusting of the refractive indices, and selecting the correct length for coupling event, even/odd parity circuits can be obtained. The operation of these circuits is simulated with the aid of RSoft CAD-Layout (BeamPROP) simulator.