Efficient application of the electro-optic effect in a lithium-niobate-based Mach-Zehnder interferometer to construct universal gates has been demonstrated. The study is carried out by simulating the proposed device with the beam propagation method, and the results are verified using MATLAB. Various parameters influencing the performance of the device (such as speed, latency, and power consumption) also have been taken into account.