  A programmable optical computer has remained an elusive concept. To construct
a practical computing primitive equivalent to an electronic Boolean logic, one
should find a nonlinear phenomenon that overcomes weaknesses present in many
optical processing schemes. Ideally, the nonlinearity should provide a
functionally complete set of logic operations, enable ultrafast all-optical
programmability, and allow cascaded operations without a change in the
operating wavelength or in the signal encoding format. Here we demonstrate a
programmable logic gate using an injection-locked Vertical-Cavity
Surface-Emitting Laser (VCSEL). The gate program is switched between the AND
and the OR operations at the rate of 1 GHz with Bit Error Ratio (BER) of 10e-6
without changes in the wavelength or in the signal encoding format. The scheme
is based on nonlinearity of normalization operations, which can be used to
construct any continuous complex function or operation, Boolean or otherwise.
