The nonlinearities of a semiconductor optical amplifier (SOA) are exploited to realize various all-optical signal processing at ultrahigh speed. We demonstrate reconfigurable logic gates with XNOR, AND, NOR, OR, and NOT functions based on various nonlinearities of single SOA, including four-wave mixing, cross gain modulation and transient cross phase modulation. Since the modulation speed of the SOA is limited by the recovery time of carrier density, a detuning optical bandpass filter with 0.32nm-bandwidth follows the SOA to enhance the modulation speed. Multi-logic gates at 40Gbit/s are obtained with single SOA.