We demonstrate an all-optical XOR logic gate for 40-Gbaud quadrature phase-shift keying (QPSK) tributaries in a silicon nanowire for the first time. The XOR logic operation is realized based on four-wave mixing (FWM) in the C-band. Experimental results show negligible power penalty at a bit error ratio (BER) of compared with the back-to-back signals. The BER floor appears at BER of for both and tributaries of the logic operation, and the main reasons are the optical signal-to-noise ratio (OSNR) deterioration caused by nonlinear loss due to free carrier absorption (FCA) and two-photon absorption (TPA) and the cross-phase modulation (XPM)-induced phase impairments.