All-fiber logical devices based on the nonlinear directional coupler