A rectifier is a device that converts alternating current (AC), which periodically reverses direction, to direct current (DC), which flows…