- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

#### Presentation Transcript

**1. **1 COMP541 Combinational Logic Montek Singh
Jan 16, 2007

**2. **2 Today Basics of digital logic (review)
Basic functions
Boolean algebra
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)
Variables named with single letters in examples
Really use words when designing circuits
Basic Functions
AND
OR
NOT

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

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

**6. **6 NOT Unary
Symbol is bar
C = A
Truth table ->
Inversion

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

**8. **8 AND Gate

**9. **9 OR Gate

**10. **10 Inverter

**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 2n rows
where n = # of variables

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

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

**17. **17 Table of Identities

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

**19. **19 Single Variable Identities

**20. **20 Commutativity Operation is independent of order of variables

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

**22. **22 Distributivity Can substitute arbitrarily large algebraic expressions for the variables
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

**27. **27 Fewer Gates

**28. **28 Consensus Theorem
The third term is redundant
Can just drop
Proof in book, but in summary:
For third term to be true, Y & Z both 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
Recall: Interchange AND and OR, and 1s & 0s
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 ? ABZ
Sum terms – OR ? X + A
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 2n minterms
Like binary numbers from 0 to 2n-1
In book, numbered same way (with decimal conversion)

**35. **35 Maxterms 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
m1 + m3 + m4 + m6

**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

**41. **41 Recap 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
Talk about FPGA internals
Overview of components on board
Downloading and testing
Karnaugh maps: mechanical synthesis approach (quick)