Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fall 2005 L14: Boolean Logic and Basic Gates Quick announcements Deadline for HW3 extended to 11/14/2005 Grading formula in grade so far does not include.

Similar presentations


Presentation on theme: "Fall 2005 L14: Boolean Logic and Basic Gates Quick announcements Deadline for HW3 extended to 11/14/2005 Grading formula in grade so far does not include."— Presentation transcript:

1 Fall 2005 L14: Boolean Logic and Basic Gates Quick announcements Deadline for HW3 extended to 11/14/2005 Grading formula in grade so far does not include extra credit. Used for grade promotion. Grades histogram. AVG(grades so far = 33.04)

2 Fall 2005 L14: Boolean Logic and Basic Gates LECTURE 14: Transistors to logic gates Boolean Logic Basic logic gates Introduction to switching logic Turning logic circuits into switching expressions Simplifying switching expressions, Karnaugh Maps (no time)

3 Fall 2005 L14: Boolean Logic and Basic Gates From Transistors to Computer Chips

4 Fall 2005 L14: Boolean Logic and Basic Gates Transistors - Where it all starts Transistors are physical structures –Bipolar Junction Transistors –Field Effect Transistors For digital logic, you can think of a transistor as a switch that has two states: ON and OFF Wiring transistors together, we can create logic functions and storage elements

5 Fall 2005 L14: Boolean Logic and Basic Gates Example: MOSFET (Metal Oxide Semiconductor Field Effect Transistor) Two different types of MOSFET –p channel –n channel SourceGateDrain

6 Fall 2005 L14: Boolean Logic and Basic Gates Transistor as a Switch The voltage on the gate decides if the switch will be open (i.e., OFF) or closed (i.e., ON) Source Gate Drain Source Gate

7 Fall 2005 L14: Boolean Logic and Basic Gates CMOS - Complementary Metal Oxide Semiconductors Today, CMOS is the most common technology used for manufacturing digital computer chips Combines p-channel and n-channel MOSFETS High levels of integration are possible Low power requirements

8 Fall 2005 L14: Boolean Logic and Basic Gates MOSFETs Source Gate Drain n-Channel p-Channel Gate Drain Designed so that when Gate voltage is high, switch is ON Designed so that when Gate voltage is low, switch is ON

9 Fall 2005 L14: Boolean Logic and Basic Gates Transistors and Logic Gates Transistors can be connected together with wires Connect transistors to create simple, logical functions - these functions are called logic gates In modern computer chips, the transistors and wires are very, very small

10 Fall 2005 L14: Boolean Logic and Basic Gates CMOS Inverter InputOutput Vdd = High Ground = Low = 0V InputOutput High Low

11 Fall 2005 L14: Boolean Logic and Basic Gates NOT Logic Gate The NOT logic gate is an inverter Logical function: A or A Input A Input A Output

12 Fall 2005 L14: Boolean Logic and Basic Gates CMOS NAND Logic Gate Input A Output Vdd = High Ground = Low = 0V Input A Output Input B Input B

13 Fall 2005 L14: Boolean Logic and Basic Gates NAND Logic Gate Logical function NAND AB alternatively (AB) Input A Input A Output Input B Input B

14 Fall 2005 L14: Boolean Logic and Basic Gates AND Logic Gate Logical function AND AB Input A Input A Output Input B Input B

15 Fall 2005 L14: Boolean Logic and Basic Gates OR Logic Gate Logical function OR A + B Input A Input A Output Input B Input B

16 Fall 2005 L14: Boolean Logic and Basic Gates NOR Logic Gate Input A Input A Output Input B Input B Logical function NOT OR (A + B) alternatively (A + B)

17 Fall 2005 L14: Boolean Logic and Basic Gates XOR Logic Gate Logical function Exclusive OR A B + A B alternatively AB + AB Input A Input A Output Input B Input B

18 Fall 2005 L14: Boolean Logic and Basic Gates Truth Tables Truth Tables are used to define the output for any given combination of inputs Input A Output Input B Input A Output Input B Input C

19 Fall 2005 L14: Boolean Logic and Basic Gates Using Truth Tables to Create Digital Logic Functions Input x Output Input y Input z

20 Fall 2005 L14: Boolean Logic and Basic Gates A Generalized Procedure for Creating a Digital Logic Design from a Truth Table Canonical Sum of Products form –Create an input line for each input variable, and branch off another line with a NOT gate to form the complement of the variable. –You will need as many AND gates as there are 1s in the truth table. The inputs to each AND gate are the input variables or their complements - as indicated by the truth table entries. –For example if x=0, y=1, and z=0 and OUTPUT=1, you will need x, y, and z as inputs into one of the AND gates –You will need one OR gate. All of the outputs of the AND gates will go into the OR gate. The output of the OR gate is the output function for the circuit

21 Fall 2005 L14: Boolean Logic and Basic Gates A Generalized Procedure for Creating a Digital Logic Design from a Truth Table Canonical Product of Sums form –Create an input line for each input variable, and branch off another line with a NOT gate to form the complement of the variable. –You will need as many OR gates as there are 0s in the truth table. The inputs to each OR gate are the input variables or their complements - as indicated by the truth table entries. –For example if x=0, y=0, and z=1 and OUTPUT=0, you will need x, y, and z as inputs into one of the OR gates –You will need one AND gate. All of the outputs of the OR gates will go into the AND gate. The output of the AND gate is the output function for the circuit

22 Fall 2005 L14: Boolean Logic and Basic Gates Canonical Sum of Products Using sum of products is one way to get a correct circuit design from a truth table Approach doesnt always give you the most efficient circuit design!

23 Fall 2005 L14: Boolean Logic and Basic Gates Boolean Algebra George Boole, 19 th Century mathematician Developed a mathematical system (algebra) involving logic –later known as Boolean Algebra Primitive functions: AND, OR and NOT The power of BA is theres a one-to-one correspondence between circuits made up of AND, OR and NOT gates and equations in BA + means OR, means AND, x means NOT

24 Fall 2005 L14: Boolean Logic and Basic Gates Switching Algebra Identities Identity Law 1 A = A0 + A = A Null Law 0 A = 01 + A = 1 Idempotent Law AA = AA + A = A Inverse Law AA = 0A + A = 1

25 Fall 2005 L14: Boolean Logic and Basic Gates More Switching Algebra Identities Commutative Law AB = BAA + B = B + A Associative Law (AB)C = A(BC) (A + B) + C = A + (B + C) Absorption Law A(A + B) = AA + AB = A Distributive Law A + BC = (A + B)(A + C) A(B + C) = AB + AC

26 Fall 2005 L14: Boolean Logic and Basic Gates One Other Theorem: Involution A = A (A) = A

27 Fall 2005 L14: Boolean Logic and Basic Gates DeMorgans Law A B = A + B alternatively (AB) = A + B A + B = A B alternatively (A + B) = A B Very useful for simplifying functions!

28 Fall 2005 L14: Boolean Logic and Basic Gates Turning a Switching Expression into A Digital Logic Circuit The expression has the directions ands turn into and gates; ors turn into or gate, complements can be not gates…. Example: xy + z = output x y z output

29 Fall 2005 L14: Boolean Logic and Basic Gates Working with Switching Algebra Quickie Quiz 1 (Draw this circuit) f (A,B,C) =A + B + A B C A B C A B F(A,B,C)

30 Fall 2005 L14: Boolean Logic and Basic Gates Working with Switching Algebra Complicated functions can be simplified using Boolean Algebra

31 Fall 2005 L14: Boolean Logic and Basic Gates Another Example Whats the logic function? ((A + B) B) Simplify using DeMorgans Law and identities = (A + B) + B = A + (B + B) = A + 1 = 1 Input A Output Input B

32 Fall 2005 L14: Boolean Logic and Basic Gates Working with Switching Algebra QUICKIE QUIZ (Simplify this function) f (w,x,y,z) = x y + w x y z + x y = y (x + x + w x z) = y ( 1) = y

33 Fall 2005 L14: Boolean Logic and Basic Gates Simplified solutions arent always unique f(x,y,z) = x y z + x y z + x y z + x y z + x y z + x y z = x z + x y + y z = x y + y z + x z = x z + y z + y z + x z

34 Fall 2005 L14: Boolean Logic and Basic Gates Karnaugh Maps A Tool for Simplifying Logic Functions Karnaugh map for three variables – a truth table turned on its side x y z

35 Fall 2005 L14: Boolean Logic and Basic Gates Karnaugh Maps Karnaugh maps are tools to help you visually/graphically group the 1s in a truth table to develop simplified expressions From the logic expression, you can develop a logic- gate-level design implementing the function

36 Fall 2005 L14: Boolean Logic and Basic Gates Representing Functions Using a Karnaugh Map x y z

37 Fall 2005 L14: Boolean Logic and Basic Gates Karnaugh Map Guidelines (1 of 3) Prepare the map using the truth table inputs Each 1 on the Karnaugh map represents a min-term for a sum of products expression of the truth tables function You can simplify the logic expression by combining the product terms (the min terms) that are grouped on the Karnaugh map Groups of two, four, eight, (any power of two) 1 s on the map can be used to develop a simpler expression of fewer variables

38 Fall 2005 L14: Boolean Logic and Basic Gates Karnaugh Map Guidelines (2 of 3) Groups can wrap around the sides of the Karnaugh map –Top and bottom rows –Right-most and left-most columns Determine which variables can be eliminated from the min-terms using the row and column entries of the Karnaugh map Any variable that appears as both a 1 and a 0 in the grouping can be eliminated from the product term For a complete expression, you need to have expressions for every 1 on the Karnaugh map and combine the terms in a sum of products expression

39 Fall 2005 L14: Boolean Logic and Basic Gates Karnaugh Map Guidelines (3 of 3) You can have a 1 included in more than one simplified expression Redundancy is okay if you end up with the same or fewer terms in your sum of products expression Combine the simplified expressions into a sum of products form Translate the sum of products form into a logic gate design

40 Fall 2005 L14: Boolean Logic and Basic Gates Another Example Input x Output Input y Input z

41 Fall 2005 L14: Boolean Logic and Basic Gates Another Example with Three Variables x y z f(x,y,z) = z + x y z


Download ppt "Fall 2005 L14: Boolean Logic and Basic Gates Quick announcements Deadline for HW3 extended to 11/14/2005 Grading formula in grade so far does not include."

Similar presentations


Ads by Google