a b s t r a c tIn order to optimize the performance of three level code division multiplexing (3LCDM) at 2×20 Gb/s data rate, signal level spacing technique is investigated in this paper. The 3LCDM performance is improved considerably using both electrical and optical level spacing optimization configurations. The results demonstrate that by optimization, in conditions of the optical signal-to-noise ratio, an improvement of around 4.5 dB can be achieved in both approaches as well as 3.3 dB in the electrical configuration and 3.5 dB in the optical configuration can be accomplished for the 3LCDM in terms of the receiver sensitivity.