**3. All optical logic gates**

All-optical logic gates will be the key elements used in next generation optical computer and optical network. All-optical signal processing can handle large bandwidth signals, large information flows and no need of electrical to optical conversion. All-optical logic gates are capable of performing many logic functions. These are expected to find many applications in optical communication, photonic microprocessors, optical signal processors, optical instrumentation, etc. AND logic gate is used to perform address recognition, packet-header modification, and data-integrity verification. All-optical AND-gates have served as sampling gates in optical sampling oscilloscopes (Westlund, et al., 2005) owing to their ultrafast operation compared to traditional electrical methods. XOR gates can perform a diverse set of processing functions, including comparison of data patterns for address recognition and subsequent packet switching, optical generation of pseudorandom patterns, data encryption/decryption, and parity checking. Threshold detector functionality can be realized by XNOR logic gate. All-optical NOT-gates can be used as inverter and switches. Combination of logic gates may be employed to perform basic or complex computing and arithmetic functions such as binary addition, subtraction, comparison, decoding, encoding and flipflops.
