Binary logicCombinational LogicTruth tablesThe Binary ConnectionExampleIllegal InputsLogic PrimitivesComplex expressionsTiming diagramFunctions of two variablesNANDs and NORsXORs and XNORsWhat’s left? Seattle Pacific University EE 1210 - Logic System Design TruthTables-1Binary logicBinary logic is a mathematical system that lets us reason about logic statementsIF The garage door is openAND The engine is runningTHEN The car can be backed out of the garageIF The N-S light is greenAND The E-W light is redAND (The N-S light has been green for more than 45 sec. OR There are no cars on the N-S road)THEN The N-S lights can be changed from green to yellowThe car can be backedout only when both conditions are trueThe light will become yellow only if it’s been green for > 45 seconds or nobody is on the road Seattle Pacific University EE 1210 - Logic System Design TruthTables-2Combinational LogicIF The garage door is openAND The engine is runningTHEN The car can be backed out of the garageEach input can beeither True or FalseWhat is the output for each combination of inputs?Door Open? Engine Running? OK to Back OutFalse False FalseFalse True FalseTrue False FalseTrue True TrueThere are 2N combinations to be considered for N binary inputs. Seattle Pacific University EE 1210 - Logic System Design TruthTables-3Truth tablesX Y X and YF F FF T FT F FT T T•Truth tables enumerate all possible input combinations•For each input, tabulate the output•There may be more than one independent outputX not XF TT FInput OutputX Y X or YF F FF T TT F TT T T•A truth table that enumerates all input combinations completely defines any logic functionFor n inputs: 2n rows Seattle Pacific University EE 1210 - Logic System Design TruthTables-4The Binary ConnectionX Y X and Y0 0 00 1 01 0 01 1 1•Truth or Falsehood is a Binary operation•Everything is either True or False, no in-betweens•Represent True using ‘1’•Represent False using ‘0’X not X0 11 0Input Output2.2X Y X or Y0 0 00 1 11 0 11 1 1Note: Number combinations in binary numeric order:00, 01, 10, 11 Seattle Pacific University EE 1210 - Logic System Design TruthTables-5Example•Function F(a,b,c,d) should be 1 whenever there are an even number of inputs that are 1•Function G(a,b,c,d) should be 1 whenever c is 1 or d is 1, but not when a or b is 1 a b c d F G0 0 0 0 1 00 0 0 1 0 10 0 1 0 0 10 0 1 1 1 10 1 0 0 0 00 1 0 1 1 00 1 1 0 1 00 1 1 1 0 01 0 0 0 0 01 0 0 1 1 01 0 1 0 1 01 0 1 1 0 01 1 0 0 1 01 1 0 1 0 01 1 1 0 0 01 1 1 1 1 0 Seattle Pacific University EE 1210 - Logic System Design TruthTables-6Illegal Inputs•The women’s basketball team is looking for good players (women 5’9” or taller)•The data available is:•M: True if male•F: True if female•T: True if 5’9” or taller•S: True if < 5’9”•Many combinations are impossible•Can’t be Male and Female•Can’t be Tall and Short•Impossible input combinations are marked with an ‘X’•Called a don’t careXXXXX00XX10XXXXX1111011110110011110101011001000111100110101000101100010010000000GoodSTFM Seattle Pacific University EE 1210 - Logic System Design TruthTables-7Logic Primitivesx y z x y zx y z x y z- - - -(( ) )( ) ( )precedence rulesNOT before AND before ORx x,not(x)xx’x y x y x y xy- , , & ,x and yxyxyx y x y x y , , |x or yxyx+y Seattle Pacific University EE 1210 - Logic System Design TruthTables-8Complex expressionsZ A B C DZ A B C D - - - - ( )( ( ( )))T C D2 ( )CDT2T B T1 2 -( )CDT1BZ A T -( )1CDBAZ Seattle Pacific University EE 1210 - Logic System Design TruthTables-9Timing diagram•A timing diagram may be used to express the behavior of a logic systemA B C T1 T2 Z0 0 0 1 0 00 0 1 1 1 10 1 0 1 1 10 1 1 1 1 11 0 0 0 0 01 0 1 0 1 01 1 0 0 1 01 1 1 0 1 0BCZAT2T1ABCT1T2Z101010101010Inputs0 0 0 0 1 1 1 10 0 1 1 0 0 1 10 1 0 1 0 1 0 11 1 1 1 0 0 0 00 1 1 1 0 1 1 10 1 1 1 0 0 0 0 Seattle Pacific University EE 1210 - Logic System Design TruthTables-10Functions of two variablesF0 0 0 0 0 F1 0 0 0 1 F2 0 0 1 0 F3 0 0 1 1 F4 0 1 0 0 F5 0 1 0 1 F6 0 1 1 0 F7 0 1 1 1 F8 1 0 0 0 F9 1 0 0 1 F10 1 0 1 0 F1 1 1 0 1 1 F12 1 1 0 0 F13 1 1 0 1 F14 1 1 1 0 F15 1 1 1 1 X 0 0 1 1 Y 0 1 0 1 0 X • Y X Y X + Y X Y 1 There are sixteen functions of two variables…We’ve only seen eight of them so far Seattle Pacific University EE 1210 - Logic System Design TruthTables-11NANDs and NORsX Y Z0 0 10 1 11 0 11 1 0X nand Y = not (X and Y) = X Y-X Y Z0 0 10 1 01 0 01 1 0X nor Y = not (X or Y) = X Y Seattle Pacific University EE 1210 - Logic System Design TruthTables-12XORs and XNORsX Y Z0 0 00 1 11 0 11 1 0Exclusive OR - XORXOR - True if both inputsare differentZ X Y X Y Z0 0 10 1 01 0 01 1 1Equivalence gate - XNORXNOR - True if both inputsare the sameZ X Y Seattle Pacific University EE 1210 - Logic System Design TruthTables-13What’s left?Remaining functions are implication functions, which aren’t commonly usedF0 0 0 0 0 F1 0 0 0 1 F2 0 0 1 0 F3 0 0 1 1 F4 0 1 0 0 F5 0 1 0 1 F6 0 1 1 0 F7 0 1 1 1 F8 1 0 0 0 F9 1 0 0 1 F10 1 0 1 0 F1 1 1 0 1 1 F12 1 1 0 0 F13 1 1 0 1 F14 1 1 1 0 F15 1 1 1 1 X 0 0 1 1 Y 0 1 0 1 0 X • Y X Y X + Y X Y 1 X YX YX Y-X
View Full Document