The feasibility of implementing an all-optical NAND gate for 160Gb/s return-to-zero data pulses using a single quantum-dot semiconductor optical amplifier (QD-SOA)-based Mach–Zehnder interferometer is theoretically investigated and demonstrated. The proposed scheme exploits a modified Fredkin gate simultaneously driven by the pair of data streams between which the Boolean NAND function is to be executed, a sequence of continuous pulses and the complement of the first data input. The impact of the peak data power as well as of the QD-SOAs current density, small signal gain and electron relaxation time from the excited state to the ground state on the amplitude modulation of the switching outcome is explored and assessed by means of numerical simulation. The interpretation of the obtained results allows to specify the conditions under which the QD-SOAs must be biased to operate so that the defined performance metric becomes acceptable. By following the extracted guidelines whose satisfaction is technologically feasible and making a suitable choice for the critical parameters the NAND gate can be realized both with logical correctness and high quality at the target ultrafast data rate while being cascadable and scaleable for constructing more complex all-optical circuits.