6.2. DIGITAL LOGIC FUNCTIONS139the ladder diagram.• REVIEW:• Ladder diagrams (sometimes called ”ladder logic”) are a type of electrical notation and symbol-ogy frequently used to illustrate how electromechanical switches and relays are interconnected.• The two vertical lines are called ”rails” and attach to opposite poles of a power supply, usually120 volts AC. L1 designates the ”hot” AC wire and L2 the ”neutral” (grounded) conductor.• Horizontal lines in a ladder diagram are called ”rungs,” each one representing a unique parallelcircuit branch between the poles of the power supply.• Typically, wires in control systems are marked with numbers and/or letters for identiﬁcation.The rule is, all permanently connected (electrically common) points must bear the same label.6.2Digital logic functionsWe can construct simply logic functions for our hypothetical lamp circuit, using multiple contacts,and document these circuits quite easily and understandably with additional rungs to our original”ladder.” If we use standard binary notation for the status of the switches and lamp (0 for unactuatedor de-energized; 1 for actuated or energized), a truth table can be made to show how the logic works:L1L2BAABA BOutput0001011 101111Now, the lamp will come on if either contact A or contact B is actuated, because all it takes forthe lamp to be energized is to have at least one path for current from wire L1 to wire 1. What wehave is a simple OR logic function, implemented with nothing more than contacts and a lamp.We can mimic the AND logic function by wiring the two contacts in series instead of parallel: