Optics is a candidate for digital communication and data processing where tremendous operational speed is the basic requirement. Conventional electronic systems cannot compete in this arena. Nonlinear optical materials may find important uses in optical switches. In this paper, a new idea for all-optical time-domain multiplexing and demultiplexing with the massive use of nonlinear optical materials is reported. The scheme exploits some special characteristics of such materials.