3The Binary Concept Many things can be thought of as existing in one of two states.These two states can be defined as “high” or “low”,“on” or “off”, “yes” or “no”, and “1” or “0”.5Vhigh, on, yes, 1low, off, no, 0BinarySignal
4The Binary ConceptThis two-state binary concept, applied to gates, can bethe basis for making decisions.The gate is a device that hasone or more inputs with whichit will perform a logical decisionand produce a result at itsone output.
5Gate Decision Making The Logical AND Light Switch AND High Beam Gate High Beam SwitchThe automotive high beam lightcan only be turned on when thelight switch AND high beam switchare on.
6Gate Decision Making The Logical OR Passenger Door Switch OR Dome Gate LightDriver Door SwitchThe automotive dome light willbe turned on when the passengerdoor switch OR the driver doorswitch is activated.
7AND Function The outcome or output is called Y and the input signals are called A, B, C, etc.Binary 1 represents the presence of a signal or theoccurrence of some event, while binary 0 representsthe absence of the signal or nonoccurrence of the event.
8AND Gate Function Application – Example 1 Basic RulesThe device has twoor more inputs andone outputIf any input is 0,the output will be 0If all inputs are 1,the output will be 1
9AND Gate Function Application – Example 2 The AND gate operateslike a series circuit.The light will be “on”only when bothswitch A and switch Bare closed.
10OR Function An OR gate can have any number of inputs but only one output.The OR gate output is 1 if one or more inputs are 1.
11OR Gate Function Application – Example 1 Basic RulesIf all inputs are 0,the output will be 0If one or more inputs are 1, the output will be 1
12OR Gate Function Application – Example 2 The OR gate operateslike a parallel circuit.The light will be “on”if switch A or switch Bis closed.
13NOT Function The NOT function has only one input and one output. The NOT output is 1 if the input is 0.The NOT output is 0 if the input is 1.Since the output is always the reverse of the inputit is called an inverter.
14NOT Gate Application – Example 1 Acts like a normallyclosed pushbuttonin series with theoutput.The light will be “on” if the pushbutton is not pressed.The light will be “off” if the pushbutton is n pressed.
15NOT Gate Application – Example 2 If the power is “on”(1) and the pressureswitch is not closed(0), the warningindicator will be “on”Low-pressureindicating circuitWhen the pressurerises to close thepressure switch, thewarning indicatorwill be switched "off"
16NAND Function The NAND gate functions like an AND gate with an inverter connected to its output.The only time the NAND gate output is 0 is whenall inputs are binary 1.
17NOR Function The NOR gate functions like an OR gate with an inverter connected to its output.The only time the NAND gate output is 1 is whenall inputs are binary 0.
18XOR (exclusive-OR) Function The XOR function hastwo inputs and one output.The output of this gate is HIGH only when one input orthe other is HIGH, but not both.It is commonly used for comparison of two binarynumbers.
191. The two binary states can be defined as: “high” or “low”“on” or “off”1” or “0”all of these2. A gate can have one or more outputs butonly one input. (True/False)
203. The ______ table shows the resulting output for each possible gate input conditions. a. input status c. datab. output status d. truth4. A light that is "off" or a switch that is "open"would normally be represented by a binary 1.(True/False)5. The OR function, implemented using contacts,requires contacts connected in series. (True/False)
216. With an AND gate, if any input is 0, the output will be 0 6. With an AND gate, if any input is 0, the output will be (True/False)7. The symbol shown is that of a(an)_________ .AND gateOR gateNAND gateinverter
228. Which of the following gates is commonly used for the comparison of two binary numbers?NANDNORXORNOT9. The basic rule for an XOR function is that ifone or the other, but not both, inputs are 1 theoutput is 1. (True/False)10. A NAND gate is an AND gate with an inverterconnected to the output. (True/False)
23Gate Boolean Equations YANDY = A BGateBoolean EquationORABYY = A + BNOTAYY = A
24Boolean Equation – Example 1 Each logic function can beexpressed in terms of aBoolean expression
25Boolean Equation – Example 2 Any combination of control can be expressed in terms of a Boolean equationABY = AB + CA + BY = (A + B) C
26Boolean Equation – Example 2 ABY = AB + CA + BY = (A + B) C
27Circuit Development Using A Boolean Expression – Example 1 1. AND gate with Input A and B2. OR gate with Input C an output from previous AND gate.
28Circuit Development Using A Boolean Expression – Example 2 AND gate with Input B and C
29Producing A Boolean Expression From A Given Circuit – Example 1
30Producing A Boolean Expression From A Given Circuit – Example 2Logic equation: Y = AB + AB
31Hard Wired versus Programmed Logic The term hardwired logic refers to logic controlfunctions that are determined by the way devicesare interconnected.Hardwired logic can beimplemented using relaysand relay ladder schematics.Hardwired logic is fixed:it is changeable only by alteringthe way devices are connected.
32Hardwired Stop/Start Motor Control Circuit Ladder rungLadder railControl scheme is drawnbetween two verticalsupply lines.
33Programmed Stop/Start Motor Control Circuit A rung is the contact symbolism required to controlan output. Each rung is a combination of inputconditions connected from left to right with thesymbol that represents the output at the far right.The input and output field devices remain the sameas those required for the hardwired circuit.The instructions used are the relay equivalent ofnormally open (NO) and normally closed (NC)contacts and coils
43Selecting Word-Level Logic Instructions If you want to know when matching bits in two differentwords are both ON use the AND instruction.If you want to know when one or both matching bits intwo different words are ON use the OR instruction.If you want to know when one or the other bit ofmatching bits in two different words is ON use theXOR instruction.If you want to reverse the status of bits in a word usethe NOT instruction.
44Programmed AND Instruction There is a 1 atB3:10 onlywhen Source Aand B bits are1 and input Ais true
45Programmed AND Instruction There is a 1 atB3:10 onlywhen Source Aand B bits are1 and input Ais true
46Programmed OR Instruction There is a 1 atB3:20 wheneither or boththe SourceA or B bits are 1
47Programmed XOR Instruction There is anoutput onlywhen Source Aand B bits aredifferent
48Programmed NOT Instruction The bits fromB3:9 are sentto B3:10 andinverted wheninput A is true
4911. Hardwired logic is changeable only by altering the way devices are connected.(True/False)12. Each programmed rung is a combination ofinput conditions connected from left to right withthe symbol that represents the output at the farright.(True/False)
5013. Which gate logic shown represents the Boolean equation: ( A + B ) C = Y(a)(b)(c)(d)
5114. The correct Boolean equation for the combination logic gate circuit shown is: a. Y = A B C D c. Y = ( A + B ) ( C + D )b. Y = ( AB ) + ( CD ) d. Y = ( AB ) + ( CD )
5215. The correct Boolean equation for the combination logic gate circuit shown is: a. Y = ( A + B + C ) D c. Y = ( AB + C ) Db. Y = ( A + B ) ( C + D ) d. Y = ( ABC ) D
5316. The correct Boolean equation for the combination logic gate circuit shown is: a. Y = A B C c. Y = A + B + Cb. Y = ( A B ) C d. Y = ( AB ) + ( BC )
5417. The correct Boolean equation for the ladder logic program shown is:a. Y = (A B) + (CD) c. Y = A + B + C + Db. Y = (A+B ) (C+D) d. Y = ABCD
5518. The correct Boolean equation for the ladder logic program shown is:a. Y = (A B) + (CD) c. Y = A + B + C + Db. Y = AB (C+D) d. Y = ABC + D
5619. If you want to know when matching bits in two different words are both "on", you would use the _____ logic instruction.a. AND c. XORb. OR d. NOT20. If you want to reverse the state of bits in a word, you would use the ______ logic instruction.a. AND c. XORb. OR d. NOT