An optical spectral coding technique in fiber-grating-based optical code-division multiple-access (OCDMA) system has been investigated in our previous work. In this thesis, the same architecture is set up to investigate the reduction of multiple-access interference caused by the overlapping wavelength from undesired users. Furthermore, the reduction of optical beat interference (OBI) induced by those adjacent grating chips is examined. The reduction of multiple access interference (MAI) and OBI induced by those adjacent grating chips. FBG written as M-sequence and Walsh codes is proposed for such MAI and OBI cancellation in spectrally balanced photo-detectors. Theoretically, M-sequence and Walsh codes are characterized by nearly the same number of "on" chips (i.e., logic "1" chips) and "off" chips (i.e., logic "0" chips). It is seen that the differential decoding scheme characterizes a better performance on eliminating the MAI and OBI problem by mutual cancellation in reflected and transmitted branches of wavelength chips. Furthermore, we propose that the wavelength interleaving allocation method can result in a guard band to suppress OBI. It is shown that SIR has 13 dB improvement with the proposed scheme.