![ladder logic program calculator ladder logic program calculator](https://cdn.instrumentationtools.com/wp-content/uploads/2018/11/Siemens-PLC-Comparators-Logic.png)
When the button is pressed AND the door is closed then turn on the motor.Let's turn again to some simple statements but this time using automation examples. This is abitrary though as it may make more sense to use what is called failsafe logic and have an ON bit as a FALSE condition. Typically having a bit ON represents a TRUE condition while OFF is FALSE. In the PLC it all boils down to our now familiar binary system of a 1 or a 0. In the world of automation these types of TRUE or FALSE conditions come down to a device being ON or OFF, CLOSED or OPEN, PRESENT or ABSENT, 24 VOLTS or 0 VOLTS. Now we could get more complex but all that we'd be doing is using these simple building blocks. You'll notice that they all involve three types of comparisions: AND, OR and NOT. Now these are pretty simple decisions especially if you're a ten year old boy. If Mom comes out AND orders me inside OR it get's dark then I'll stop playing.
![ladder logic program calculator ladder logic program calculator](https://media.geeksforgeeks.org/wp-content/cdn-uploads/program-to-make-a-simple-calculator.png)
![ladder logic program calculator ladder logic program calculator](https://i.ytimg.com/vi/H2Y_Ij-kmZk/maxresdefault.jpg)
What is true for us is also true of PLCs.