EECS 42 Intro. Digital Electronics Fall 23 Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 EECS 42 Introduction to Digital Electronics ndrew R. Neureuther Lecture # Prof. King: asic Digital locks 2 Min Quiz asic Circuit nalysis and Transients Logic Functions, Truth Tables Circuit Symbols, Logic from Circuit Schwarz and Oldham.,.2 393-42 Midterm /2: Lectures # -9: 4 Topics See slide 2 Length/Credit Review T http://inst.eecs.erkeley.edu/~ee42/ Copyright 23, Regents of University of California EECS 42 Intro. Digital Electronics Fall 23 Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 First Midterm Exam: Topics asic Circuit nalysis (KVL, KCL) Equivalent Circuits and Graphical Solutions for Nonlinear Loads Transients in Single Capacitor Circuits Node nalysis Technique and Checking Solutions Exam is in class 9:4-:45 M, Closed book, Closed notes, ring a calculator, Paper provided Copyright 23, Regents of University of California
EECS 42 Intro. Digital Electronics Fall 23 Logic Functions Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 Logic Expression : To create logic values we will define True, as oolean and False, as oolean. Moreover we can associate a logic variable with a circuit node. Typically we associate logic with a high voltage (e.g. 2V) and and logic with a low voltage (e.g. V). Example: The logic variable H is true (H=) if ( and and C are ) or T is true (logic ), where all of,,c and T are also logical variables. Logic Statement: H = if and and C are or T is. We use dot to designate logical and and + to designate logical or in switching algebra. So how can we express this as a oolean Expression? oolean Expression: H = ( C) + T Note that there is an order of operation, just as in math, and ND is performed before OR. Thus the parenthesis are not actually required here. Copyright 23, Regents of University of California EECS 42 Intro. Digital Electronics Fall 23 Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 Logical Expressions Standard logic notation : ND: OR : dot + sign Examples: X = ; Y = C Examples: W = + ; Z = ++C NOT: bar over symbol for complement Example: Z = With these basic operations we can construct any logical expression. Order of operation: NOT, ND, OR (note that negation of an expression is performed after the expression is evaluated, so there is an implied parenthesis, e.g. means ( ). Copyright 23, Regents of University of California 2
EECS 42 Intro. Digital Electronics Fall 23 Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 Logic Function Example oolean Expression: H = ( C) + T This can be read H= if ( and and C are ) or T is, or H is true if all of,,and C are true, or T is true, or The voltage at node H will be high if the input voltages at nodes, and C are high or the input voltage at node T is high Copyright 23, Regents of University of California EECS 42 Intro. Digital Electronics Fall 23 Logic Function Example 2 Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 You wish to express under which conditions your burglar alarm goes off (=): If the larm Test button is pressed (=) OR if the larm is Set (S=) ND { the door is opened (D=) OR the trunk is opened (T=)} oolean Expression: = + S(D + T ) This can be read = if = or S= ND (D OR T =), i.e. = if { = } or {S= ND (D OR T =)} or is true IF { is true} OR {S is true ND D OR T is true} or The voltage at node H will be high if {the input voltage at node is high} OR {the input voltage at S is high and the voltages at D and T are high} Copyright 23, Regents of University of California 3
EECS 42 Intro. Digital Electronics Fall 23 Copyright 23, Regents of University of California Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 Evaluation of Logical Expressions with Truth Tables Truth Table for Logic Expression C T H H = ( C) + T EECS 42 Intro. Digital Electronics Fall 23 Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 Evaluation of Logical Expressions with Truth Tables The Truth Table completely describes a logic expression In fact, we will use the Truth Table as the fundamental meaning of a logic expression. Two logic expressions are equal if their truth tables are the same Copyright 23, Regents of University of California 4
EECS 42 Intro. Digital Electronics Fall 23 Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 The Important Logical Functions The most frequent (i.e. important) logical functions are implemented as electronic building blocks or gates. We already know about ND, OR and NOT What are some others: Combination of above: inverted ND = NND, inverted OR = NOR nd one other basic function is often used: the EXCLUSIVE OR which logically is or except not and Copyright 23, Regents of University of California EECS 42 Intro. Digital Electronics Fall 23 Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 ND Some Important Logical Functions (or C) + (or + + C+ DK) ( lh OR INVERT or NOT not (or ) not ND = NND (only when and = ) not OR = NOR ( l h ) exclusive OR = XOR (only when, differ) i t Copyright 23, Regents of University of California 5
EECS 42 Intro. Digital Electronics Fall 23 Logic Gates Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 These are circuits that accomplish a given logic function such as OR. We will shortly see how such circuits are constructed. Each of the basic logic gates has a unique symbol, and there are several additional logic gates that are regarded as important enough to have their own symbol. The set is: ND, OR, NOT, NND, NOR, and EXCLUSIVE OR. ND C= NND C = OR C=+ NOR C = + NOT C= EXCLUSIVE OR Copyright 23, Regents of University of California EECS 42 Intro. Digital Electronics Fall 23 Logic Circuits Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 With a combination of logic gates we can construct any logic function. In these two examples we will find the truth table for the circuit. X Y C It is helpful to list the intermediate logic values (at the input to the OR gate). Let s call them X and Y. Now we complete the truth tables for X and Y, and from that for C. (Note that X = and Y = and finally C = X + Y) X Y C Interestingly, this is the same truth table as the EXCLUSIVE OR Copyright 23, Regents of University of California 6
EECS 42 Intro. Digital Electronics Fall 23 Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 EECS 42 Introduction to Digital Electronics ndrew R. Neureuther Lecture # Prof. King: asic Digital locks 2 Min Quiz asic Circuit nalysis and Transients Logic Functions, Truth Tables Circuit Symbols, Logic from Circuit Schwarz and Oldham.,.2 393-42 Midterm /2: Lectures # -9: 4 Topics See slide 2 Length/Credit Review T http://inst.eecs.erkeley.edu/~ee42/ Copyright 23, Regents of University of California EECS 42 Intro. Digital Electronics Fall 23 Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 First Midterm Exam: Topics asic Circuit nalysis (KVL, KCL) Equivalent Circuits and Graphical Solutions for Nonlinear Loads Transients in Single Capacitor Circuits Node nalysis Technique and Checking Solutions Exam is in class 9:4-:45 M, Closed book, Closed notes, ring a calculator, Paper provided Copyright 23, Regents of University of California
EECS 42 Intro. Digital Electronics Fall 23 Logic Functions Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 Logic Expression : To create logic values we will define True, as oolean and False, as oolean. Moreover we can associate a logic variable with a circuit node. Typically we associate logic with a high voltage (e.g. 2V) and and logic with a low voltage (e.g. V). Example: The logic variable H is true (H=) if ( and and C are ) or T is true (logic ), where all of,,c and T are also logical variables. Logic Statement: H = if and and C are or T is. We use dot to designate logical and and + to designate logical or in switching algebra. So how can we express this as a oolean Expression? oolean Expression: H = ( C) + T Note that there is an order of operation, just as in math, and ND is performed before OR. Thus the parenthesis are not actually required here. Copyright 23, Regents of University of California EECS 42 Intro. Digital Electronics Fall 23 Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 Logical Expressions Standard logic notation : ND: OR : dot + sign Examples: X = ; Y = C Examples: W = + ; Z = ++C NOT: bar over symbol for complement Example: Z = With these basic operations we can construct any logical expression. Order of operation: NOT, ND, OR (note that negation of an expression is performed after the expression is evaluated, so there is an implied parenthesis, e.g. means ( ). Copyright 23, Regents of University of California 2
EECS 42 Intro. Digital Electronics Fall 23 Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 Logic Function Example oolean Expression: H = ( C) + T This can be read H= if ( and and C are ) or T is, or H is true if all of,,and C are true, or T is true, or The voltage at node H will be high if the input voltages at nodes, and C are high or the input voltage at node T is high Copyright 23, Regents of University of California EECS 42 Intro. Digital Electronics Fall 23 Logic Function Example 2 Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 You wish to express under which conditions your burglar alarm goes off (=): If the larm Test button is pressed (=) OR if the larm is Set (S=) ND { the door is opened (D=) OR the trunk is opened (T=)} oolean Expression: = + S(D + T ) This can be read = if = or S= ND (D OR T =), i.e. = if { = } or {S= ND (D OR T =)} or is true IF { is true} OR {S is true ND D OR T is true} or The voltage at node H will be high if {the input voltage at node is high} OR {the input voltage at S is high and the voltages at D and T are high} Copyright 23, Regents of University of California 3
EECS 42 Intro. Digital Electronics Fall 23 Copyright 23, Regents of University of California Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 Evaluation of Logical Expressions with Truth Tables Truth Table for Logic Expression C T H H = ( C) + T EECS 42 Intro. Digital Electronics Fall 23 Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 Evaluation of Logical Expressions with Truth Tables The Truth Table completely describes a logic expression In fact, we will use the Truth Table as the fundamental meaning of a logic expression. Two logic expressions are equal if their truth tables are the same Copyright 23, Regents of University of California 4
EECS 42 Intro. Digital Electronics Fall 23 Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 The Important Logical Functions The most frequent (i.e. important) logical functions are implemented as electronic building blocks or gates. We already know about ND, OR and NOT What are some others: Combination of above: inverted ND = NND, inverted OR = NOR nd one other basic function is often used: the EXCLUSIVE OR which logically is or except not and Copyright 23, Regents of University of California EECS 42 Intro. Digital Electronics Fall 23 Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 ND Some Important Logical Functions (or C) + (or + + C+ DK) ( lh OR INVERT or NOT not (or ) not ND = NND (only when and = ) not OR = NOR ( l h ) exclusive OR = XOR (only when, differ) i t Copyright 23, Regents of University of California 5
EECS 42 Intro. Digital Electronics Fall 23 Logic Gates Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 These are circuits that accomplish a given logic function such as OR. We will shortly see how such circuits are constructed. Each of the basic logic gates has a unique symbol, and there are several additional logic gates that are regarded as important enough to have their own symbol. The set is: ND, OR, NOT, NND, NOR, and EXCLUSIVE OR. ND C= NND C = OR C=+ NOR C = + NOT C= EXCLUSIVE OR Copyright 23, Regents of University of California EECS 42 Intro. Digital Electronics Fall 23 Logic Circuits Lecture : 9//25/3.R. Neureuther Version Date 9/4/3 With a combination of logic gates we can construct any logic function. In these two examples we will find the truth table for the circuit. X Y C It is helpful to list the intermediate logic values (at the input to the OR gate). Let s call them X and Y. Now we complete the truth tables for X and Y, and from that for C. (Note that X = and Y = and finally C = X + Y) X Y C Interestingly, this is the same truth table as the EXCLUSIVE OR Copyright 23, Regents of University of California 6