A simple scheme for an all-optical AND gate, based on four-wave mixing (FWM) in semiconductor optical amplifier (SOA) is studied. In our proposed scheme an SOA and an optical filter are used, while an additional continuous-wave signal is absent. We have numerically studied four-wave mixing in semiconductor optical amplifier by the finite-difference beam propagation method (FD-BPM). We used the nonlinear propagation equation taking into account gain spectrum dynamic gain saturation which depends on carrier depletion (CD), carrier heating (CH), spectral hole burning (SHB), group velocity dispersion (GVD), self-phase modulation (SPM), and two photon absorption (TPA). The pattern effect in this scheme has been fully reviewed.