When the two-photon absorption of a high intensity pump beam takes place in a semi conductor optical amplifier there is an associated fast phase change of a weak probe signal. A scheme to realize fast all-optical XOR logic function using two-photon absorption induced phase change has been analyzed. Rate equations for semiconductor optical amplifiers, for input data signals with high intensity, configured in the form of a Mach-Zehnder interferometer has been solved. The input intensities are high enough so that the two-photon induced phase change is larger than the regular gain induced phase change. The model shows that both XOR operation and pseudorandom binary sequence generation at 250 Gb/s with good signal to noise ratio is feasible. Keywords: semiconductor optical amplifier, two-photon absorption, optical logic INTRODUCTION In future high-speed communication systems, optical logic gates are expected to play an important role in switching, signal regeneration, addressing, header recognition, data encoding and encryption, etc.[1]. In recent years, optical logic based on several different schemes have been demonstrated and reported, including that based on dual semiconductor optical amplifier (SOA) Mach-Zehnder interferometer (MZI)[2-3], semiconductor laser amplifier (SLA) loop mirror [4], ultrafast nonlinear interferometers [5], four-wave mixing process in SOA[6] or cross gain (XGM) or cross phase (XPM) modulation in nonlinear devices[7]. Among these schemes, the SOA based MZI has the advantage of being relatively stable, simple and compact. However, to the authors knowledge, all these schemes have a lim itation of signal bit rate of up to 40 or 80 Gb/s. A scheme for higher data rate logic using quantum dot (QD) based optical amplifier[8,9] has been analyzed[10]. Another process that can result in a fast phase change of a probe signal is two-photon absorption of a pump beam[11-15]. Pump-probe experiments have shown that phase changes take place in a duration ~ 1 ps or less when the pump and probe signals are injected into a semiconductor optical amplifier[11-14]. In this work, we present a model of XOR and a pseudorandom binary sequence (PRBS) generator based on two-photon absorption (TPA) of pump beams. The proposed device is a Mach-Zehnder interferometer (MZI) each arm of which has a semiconductor optical amplifier (SOA). Th e pump beams are the data signals which are injected into each arm. The probe beam is a weaker signal injected into the middle arm. The pump and probe beams have single pulse durations ~ 0.5 ps. The concept of XOR using SOA based MZI is the same as has been described and demonstrated earlier for XOR[1-6]. The principal new element of the current an alysis is that the phase change ( GI ) due to the pump beam has a fast component, the magnitude of which is given by[11-13] GI = -(1/2) ED