We investigated the operation of an all-optical error detection circuit consisting of an all-optical exclusive OR (XOR) gate for an encoder and two-stage all-optical XOR gates for a decoder using SOA-MZI’s. 10Gbps and 40Gbps operation of all-optical XOR gates were obtained. We achieved error signals in the syndrome at 10Gbps based on the all-optical XOR gates for the first time.