In this paper a novel all-optical logic NAND, NOR and XOR gate based on nonlinear directional coupler theory is demonstrated. We use the identical structure which contains three waveguides, for designing these gates; the only difference however, is the power of inputs light beam. In other words, while a beam with 4 W/μm in power considered as logical one, the output is NAND gate and if a beam with 6 W/μm in power considered as logical one, the same output, will be represented, the NOR function. In this case, an other waveguide of the structure is represented the XOR gate. Therefore this case, shows both NOR/XOR gates simultaneously. By use of three waveguides and adjusting the refractive index of waveguides and selecting the proper waveguide length, NAND/NOR/XOR gates can be obtained. The operation of these gates is simulated by use of Rsoft's BeamPROP simulator.