1. An all-optical NOT gate comprising: a nonlinear element configured to receive a first optical input signal having constant continuous wave (CW) light, and an amplitude-modulated second optical input signal having data with a binary logic level, the nonlinear element having a resonant frequency tuned relative to the frequency of at least one of the optical input signals so that the nonlinear element outputs the CW light as an optical output signal with a high logic level if the second optical input signal has a low logic level, and the nonlinear element outputs substantially no light as the optical output signal with a low logic level if the optical input signal has a high logic level, the optical output signal thus having a binary logic level that is amplitude-modulated with the amplitude of the high logic level determined substantially by the amplitude of the CW light.