Develop a PLC program that will simulate the gate array logic as shown in the below figure. Gate Array Logic…