  Owing to its potential advantages such as scalability, low latency and power
efficiency, optical computing has seen rapid advances over the last decades. A
core unit of a potential all-optical processor would be the NAND gate, which
can be cascaded to perform an arbitrary logical operation. Here, we present the
design and analysis of cascadable all-optical NAND gates using diffractive
neural networks. We encoded the logical values at the input and output planes
of a diffractive NAND gate using the relative optical power of two
spatially-separated apertures. Based on this architecture, we numerically
optimized the design of a diffractive neural network composed of 4 passive
layers to all-optically perform NAND operation using the diffraction of light,
and cascaded these diffractive NAND gates to perform complex logical functions
by successively feeding the output of one diffractive NAND gate into another.
We demonstrated the cascadability of our diffractive NAND gates by using
identical diffractive designs to all-optically perform AND and OR operations,
as well as a half-adder. Cascadable all-optical NAND gates composed of
spatially-engineered passive diffractive layers can serve as a core component
of various optical computing platforms.
