The efficient application of the Mach–Zehnder interferometer (MZI) structure for the construction of the well-known logic gates is described. It deals with the effect of the varying voltages of each electrode on the performance of MZI. It has been found that power transmission gets switched with the variation of voltage in the electrodes. The results are of prime importance for optical gate implementation as well as being useful in the signal router. There is a commercial demand of optical gates and signal routers in dense wavelength division multiplexing. The result is also verified by proper analysis using OptiBPM and matlab softwares.