Logic Symbols with Truth Tables UFFER INVERTER ND NND OR NOR XOR 6.7 Digital Logic, Spring 22 XNOR Digital logic can be described in terms of standard logic symbols and their corresponding truth tables. The electronics companies have made transistor based chips that carry out the function of each of these. The horizontal lines represent inputs or outputs (in the examples above read from left to right). The small circles at the outputs on the right correspond to an inverter (performs a logical NOT operation to the output).
oolean lgebra ND = = = = OR + = + = + = + = XOR = = = = NOT If =, then = If =, then = 6.7 Digital Logic, Spring 22 2 The action of logic circuits can be understood in terms of oolean logic. We will typically use three elements of this. First you should recall that in our short hand notation is FLSE and is TRUE. The ND operation is indicated by a dot (which is often left out), and the logical table above looks familiar. The OR operation is indicated by a + sign, and the set of outcomes is mostly familiar, but notice that TRUE or TRUE is TRUE. The NOT operation is simply and inversion and is indicated by a bar over the state. We will also have occasional need for the EXLUSIVE OR gate which is similar to the OR but is indicated by a + with a circle around it and TRUE EXLUSIVE OR TRUE is FLSE. 2
Logic Gates & oolean Expressions = =+ = = =+ = = =++ = = =++ 6.7 Digital Logic, Spring 22 3 We can rewrite the logic gate in terms of oolean algebra. Notice that the ND and OR gates can be extended to beyond two inputs, in fact they can have any number. 3
Table of Logic Identities ) + = + 2) = 3) +(+) = (+)+ 4) () = () 5) (+) = + 6) (+)(+D) = +D++D 7) = 8) = 9) = ) = ) + = 2) + = 3) + = 4) = 5) = 6) + = 7) = 8) + = 9) = + 2) + = + 2) + = + 22) =+=(+) 23) = + 6.7 Digital Logic, Spring 22 4 oolean algebra is simple once you are used to it but takes some getting to know. The above sets of identities are straightforward to show. The first column you probably know (if you say them out in terms of TRUE and FLSE) and second column entries can be figured out and do not need to be memorized. 4
DeMorgan s Theorem (X+) = X Not of the quantity, X OR is equal to NOT X ND NOT X = X X X+ X+ X X X ompress to = 6.7 Digital Logic, Spring 22 5 DeMorgan s theorem is probably the most important of the identities that are not immediately known. Here we show that it is true. Notice that DeMorgan s theorem make concrete the concept that there are many ways of achieving the same truth table. In fact we will demonstrate latter that all logic can be created with NND gates alone (though this is usually not the most convenient method). lso note that the bubble inverting the input or output of a device can take the place of an inverter. 5
DeMorgan s Theorem 2 second version is or X X = X + = = X 6.7 Digital Logic, Spring 22 6 nother versions of DeMorgan s theorem, this time taking a ND type circuit to an OR. Since all logic could be created with NNDs and NNDs can be mapped into NORs then all logic could also be constructed solely out of NORs. 6
Problem: onvince yourself that 6.7 Digital Logic, Spring 22 7 Write out the truth table of this and convince yourself that you can not simply invert all inputs and outputs and have the same action. 7
DeMorgan s Theorm says ubble Pushing or fi fi Note: as we quoted DeMorgan s Theorm, it said = + fi Now we add a NOT to each output: or fi fi 6.7 Digital Logic, Spring 22 8 Now we look at a much more general statement of De Morgan s theorem. 8
ubble Pushing 2.) change ND to OR or OR to ND. 2.) invert all inputs and outputs. fi fi fi 6.7 Digital Logic, Spring 22 9 This does not sound as elegant or mathematical as DeMorgan s theorem, but it covers a much broader set of examples. 9
Generalized DeMorgan s Theorem = + + + + = 6.7 Digital Logic, Spring 22 The entire thing can be generalized to any number of inputs and always keeps the same structure.
Logic Gate NOT NND equivalent circuits NND Equivalent = ND = NND OR =+ 6.7 Digital Logic, Spring 22 s we said, all logic can be written in terms of NNDs and here are some examples. Notice that in some cases the two inputs of the NND are tied together to make an inverter.
Logic Gate NND equivalent circuits 2 NND Equivalent NOR =+ + XOR XNOR 6.7 Digital Logic, Spring 22 2 2
Using an ND as an enable gate: lock input enable Using an OR as an enable gate: lock lock Enablers f clk =MHz, T clk =ms out f clk =MHz, T clk =ms clock Input enable out clock ms 2 3 4 5 6 7 8 enable disable 2 3 4 4ms ms 2 3 4 5 6 7 8 out Input enable input enable out 4 5 3ms 6.7 Digital Logic, Spring 22 3 One of the many uses of digital logic is to enable a signal to be transmitted. In this case the clock is the signal and the ND or OR acts to control if it is transmitted. Notice the different actions and the output states when the device is disabled. 3
ND-OR-INVERT Gates Logic circuit for POS expression: D X = (+)(+D) X Logic circuit for SOP expression: D D X = +D++D X 6.7 Digital Logic, Spring 22 4 ou can directly build digital circuits from oolean logic. Two two circuits are the same, the left written as a product of sums and the right as a sum of products. There are also approaches to simplifying a network (including software packages). 4
Switch or { select 6.7 Digital Logic, Spring 22 5 This shows the simple action of a multiplexer, it takes two inputs and switches the output between them. 5
74LS57 Data Sheet 6.7 Digital Logic, Spring 22 6 There are higher level devices that are designed for specific applications. Here is a already implemented multiplexer. 6
74LS57 Data Sheet 2 6.7 Digital Logic, Spring 22 7 7
74LS57 Data Sheet 3 6.7 Digital Logic, Spring 22 8 8
74LS57 Data Sheet 4 6.7 Digital Logic, Spring 22 9 9
Multiplexer S S D 2 3 4 output S S transmitted input D 6.7 Digital Logic, Spring 22 2 The multiplexer can be expanded to many more lines. Notice that in this case each ND gate has been expanded to three inputs so that the full coding can appear at each. We would need to add one more input to each ND for every power of two increase in the number of inputs. How do you build the same circuit using the NDs only as enables? 2
Demultiplexer S S data select D E input data S S input routed to: D Disabled output are held on HIGH 6.7 Digital Logic, Spring 22 2 Of course the opposite action can also be implemented. sends one signal to one of many lines. demultiplexer 2
D to 7-Segment Decoder (LED) RI RO LT 2 3 +5V +V 7447 a b c d e f g ommon-anode LED display a b c d e f g dp dp +5V 6.7 Digital Logic, Spring 22 22 nother complex chip, in this case designed to control an LED numeric display. 22
7447 Data Sheet 6.7 Digital Logic, Spring 22 23 23
7447 Data Sheet 2 6.7 Digital Logic, Spring 22 24 24
7447 Data Sheet 3 6.7 Digital Logic, Spring 22 25 25
7447 Data Sheet 4 6.7 Digital Logic, Spring 22 26 26