Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 COMP541 Combinational Logic Montek Singh Jan 16, 2007.

Similar presentations


Presentation on theme: "1 COMP541 Combinational Logic Montek Singh Jan 16, 2007."— Presentation transcript:

1 1 COMP541 Combinational Logic Montek Singh Jan 16, 2007

2 2Today  Basics of digital logic (review) Basic functions Basic functions Boolean algebra Boolean algebra Gates to implement Boolean functions Gates to implement Boolean functions  Identities and Simplification (review?)

3 3 Binary Logic  Binary variables Can be 0 or 1 (T or F, low or high) Can be 0 or 1 (T or F, low or high) Variables named with single letters in examples Variables named with single letters in examples Really use words when designing circuits Really use words when designing circuits  Basic Functions AND AND OR OR NOT NOT

4 4AND  Symbol is dot C = A · B C = A · B  Or no symbol C = AB C = AB  Truth table ->  C is 1 only if Both A and B are 1 Both A and B are 1

5 5OR  Symbol is + Not addition Not addition C = A + B C = A + B  Truth table ->  C is 1 if either 1 Or both! Or both!

6 6NOT  Unary  Symbol is bar C = Ā C = Ā  Truth table ->  Inversion

7 7Gates  Circuit diagrams are traditional to document circuits  Remember that 0 and 1 are represented by voltages

8 8 AND Gate Timing Diagrams

9 9 OR Gate

10 10Inverter

11 11 More Inputs  Work same way  What’s output?

12 12 Representation: Schematic  Schematic = circuit diagram

13 13 Representation: Boolean Algebra  For now equations with operators AND, OR, and NOT  Can evaluate terms, then final OR  Alternate representations next

14 14 Representation: Truth Table  2 n rows where n = # of variables

15 15Functions  Can get same truth table with different functions  Usually want ‘simplest’ Fewest gates, or using only particular types of gates Fewest gates, or using only particular types of gates More on this later More on this later

16 16Identities  Use identities to manipulate functions  I used distributive law … … to transform from … to transform from to

17 17 Table of Identities

18 18Duals  Left and right columns are duals  Replace AND and OR, 0s and 1s

19 19 Single Variable Identities

20 20Commutativity  Operation is independent of order of variables

21 21Associativity  Independent of order in which we group  So can also be written as and

22 22Distributivity  Can substitute arbitrarily large algebraic expressions for the variables Distribute an operation over the entire expression Distribute an operation over the entire expression

23 23 DeMorgan’s Theorem  Used a lot  NOR  invert, then AND  NAND  invert, then OR

24 24 Truth Tables for DeMorgan’s

25 25 Algebraic Manipulation  Consider function

26 26 Simplify Function Apply

27 27 Fewer Gates

28 28 Consensus Theorem  The third term is redundant Can just drop Can just drop  Proof in book, but in summary: For third term to be true, Y & Z both must be 1 For third term to be true, Y & Z both must be 1 Then one of the first two terms must be 1! Then one of the first two terms must be 1!

29 29 Complement of a Function  Definition: 1s & 0s swapped in truth table  Mechanical way to derive algebraic form Take the dual Take the dual  Recall: Interchange AND and OR, and 1s & 0s Complement each literal Complement each literal

30 30 Mechanically Go From Truth Table to Function

31 31 From Truth Table to Func  Consider a truth table  Can implement F by taking OR of all terms that are 1

32 32 Standard Forms  Not necessarily simplest F  But it’s a mechanical way to go from truth table to function  Definitions: Product terms – AND  ĀBZ Product terms – AND  ĀBZ Sum terms – OR  X + Ā Sum terms – OR  X + Ā This is logical product and sum, not arithmetic This is logical product and sum, not arithmetic

33 33 Definition: Minterm  Product term in which all variables appear once (complemented or not)

34 34 Number of Minterms  For n variables, there will be 2 n minterms  Like binary numbers from 0 to 2 n -1  In book, numbered same way (with decimal conversion)

35 35Maxterms  Sum term in which all variables appear once (complemented or not)

36 36 Minterm related to Maxterm  Minterm and maxterm with same subscripts are complements  Example

37 37 Sum of Minterms  Like the introductory slide  OR all of the minterms of truth table row with a 1

38 38 Complement of F  Not surprisingly, just sum of the other minterms  In this case m 1 + m 3 + m 4 + m 6

39 39 Product of Maxterms  Recall that maxterm is true except for its own case  So M1 is only false for 001

40 40 Product of Maxterms  Can express F as AND of all rows that should evaluate to 0 or

41 41Recap  Working (so far) with AND, OR, and NOT  Algebraic identities  Algebraic simplification  Minterms and maxterms  Can now synthesize function (and gates) from truth table

42 42 Next Time  Lab Prep Demo lab software Demo lab software Talk about FPGA internals Talk about FPGA internals Overview of components on board Overview of components on board Downloading and testing Downloading and testing  Karnaugh maps: mechanical synthesis approach (quick)


Download ppt "1 COMP541 Combinational Logic Montek Singh Jan 16, 2007."

Similar presentations


Ads by Google