We investigated the feasibility of using an optical divider circuit with a semiconductor optical amplifier-Mach-Zehnder interferometer(SOA-MZI)-based exclusive OR (XOR) gate for an all-optical forward error detection and correction scheme with a cyclic code. We employed a conventional cyclic code scheme: the same divider circuit acts as both encoder and decoder with a given generator polynomial. The divider circuit consists of cascaded XOR circuits and feedback lines. Therefore, the performance of the XOR circuit is one of the key factors for realizing an all-optical scheme. We numerically investigated the operation performance of the SOA-MZI-based all-optical XOR gate. Dynamic operation was simulated using rate equations via the transfer matrix method. The XOR function was also investigated experimentally. The eye diagram obtained from the simulation at a bit rate of 10Gbps showed good qualitative agreement with experimental results. Additionally, we confirmed that the optimal condition for a high quality factor (Q-factor) is obtained with equal power for each signal. Next, we demonstrated all-optical divider processing with the SOA-MZI-based XOR circuit and a feedback line that forms the generator polynomial x+1. The preliminary results for division operation could be verified.