We present experimental results on a new method for ultrafast all-optical l
ogic, which utilizes four-wave mixing on polarization-modulated signals. Th
e technique allows advanced operations such as exclusive-os and three-bit a
ddition with carry bit. Furthermore, we show that on-the-fly error-correcti
on encoding and decoding of a simple Hamming code is achieved when these ga
tes are used on the bits of a spectrally structured word. These gates may b
e suitable for logic operations in an optoelectronic front end, which moves
some of the necessary computation of data to the optical domain, before de
tection. (C) 2001 Optical Society of America.