Recently, the use of optical multiple-access techniques have been widely adopted for telecommunication systems, where optical fibers are used due to their efficient bandwidth and the speed limitation of electronic devices used before. One important technique is the Direct-Sequence Optical Code-Division Multiple Access (DS-OCDMA) which is used as an access method in optical fiber networks. DS-OCDMA requires a family of suitable optical codes (with corresponding encoders and decoders) for optical signals, where Fiber Bragg Gratings (FBGs) are used as encoding/decoding devices for creating optical codes necessary for such a network. In this thesis, the analysis and simulation of FBGs are carried out. The main expressions for reflection and transmission coefficients are derived and the effects of various fiber grating parameters are simulated. The use of FBGs for encoding and decoding an optical signal in OCDMA system is investigated and its performance is simulated. simulation results are carried out using MATLAB 7 software. The results indicates clearly that a high performance optical encoder/decoder for OCDMA systems can be obtained using super-structured fiber Bragg gratings (SSFBGs).