All-optical Boolean XOR operation is demonstrated on pseudo-data patterns at 20 Gb/s with a three optical input semiconductor optical amplifier-assisted Sagnac switch. Bit pattern switching has been achieved with low energies of the incoming clock and data pulses and low pattern dependence on the switched-out pulses.