A numerical simulation study of the performance of encoding and decoding of short optical pulse in OCDMA (Optical Code Division Multiple Access) systems under non-linear optical effects is presented. The performance of encoding and decoding short pulses is obtained through use of device FBG (fiber Bragg grating) where the codes are inserted through discrete jumps in the optical phase (±π). The multiuser interference is also the object of the present study, where a figure of merit (interference figure) is used to quantify the interference in multiuser auto and cross correlation. We evaluate the dependence of the multiuser interference for the coupling constant of FBG. Finally, the interference inserted in the autocorrelation due to nonlinear effects generated in the nonlinear switching of the coded pulse in a dual core nonlinear directional coupler is examined, where temporal broadening of pulses decoded is observed.