Abstract-We demonstrate a reconfigurable 16-channel optical code-division multiple access (OCDMA)/dense wavelength division multiplexing (DWDM) system (4 OCDMA × 4 DWDM × 625 Mb/s) based on novel 31-chip, 40 Gchip/s quaternary phase coding gratings operating at a channel spacing of just 50 GHz. The system performance is studied for cases of both fixed and code-reconfigurable decoders. Error-free performance is achieved in both cases and for all 16 channels.Index Terms-Fiber Bragg grating, optical code-division multiple access, optical fiber communication, wavelength division multiplexing (WDM).