A computer program puts many very simple instructions together to perform one meaningful instruction such as multiplying two decimal numbers. For the circuit shown, if no current were supplied at the base then the 'gate' would remain closed and no current would flow from 5 volts to ground through the transistor. If current was supplied at the base then the transistor would 'open' and current could flow from 5 volts down to ground through the transistor. This electrically controlled switch is the basic building block of all digital electronics. Simple digital electronic components carry out the functions of Boolean algebra.
Boolean algebra is the manipulation of logical statements to determine truth or false.
Turn on the hydraulic pump if and only if the system is enabled, the operator is pressing both palm buttons, the emergency stop button is not pressed and the proximity sensor does not sense probable interference with any moving parts. This safety circuit could be realized with relay logic, but a more energy efficient and portable method would be to use digital electronics. The circuit shown above will control the hydraulic pump as described. In the state shown the E-Stop is not made, both palm buttons are made and the proximity sensor does not sense anything. In this state the hydraulic pump is turned on.