Refer to the diagram, in which S1 and D1 represent the origi…