Optical Code Division Multiplexing (OCDMA) is a method used to enable simultaneous transmission of multiple optical data flows over the same fiber using the same wavelength. In OCDMA, isolation between different data flows is achieved using a set of uncorrelated, or loosely correlated, spreading codes to encode the transmitted signal and decode it at the receiver side. The process of encoding and decoding is performed entirely in the optical domain. This increases the granularity of traffic isolation in the optical domain while maintaining higher speed switching because of the all-optical encoding/decoding capability. Although code division multiplexing is a well established technique in wireless transmission where all processing of data and switching are performed electronically, there are many challenges in applying this scheme in the optical domain mainly due to the different characteristics of the medium and the signals values. This book addresses three main aspects of OCDMA: Use of OCDMA for sub- wavelength switching, modeling the performance of OCDMA switching, and design of new mechanisms to enhance the performance of OCDMA.