1 / 48

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Lecture 4 Dr. Shi Dept. of Electrical and Computer Engineering. Boolean Algebra. Boolean Algebra. A Boolean algebra is defined with: A set of elements S={0,1} A set of operators +, * A number of axioms or postulates.

samara
Download Presentation

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 4 Dr. Shi Dept. of Electrical and Computer Engineering

  2. Boolean Algebra

  3. Boolean Algebra • A Boolean algebra is defined with: • A set of elements S={0,1} • A set of operators +, * • A number of axioms or postulates

  4. Definition of Boolean Algebra • The operations * and + are commutative: • a + b = b + a • a · b = b · a • The operator * is distributive over +The operation + is distributive over * • a · ( b + c ) = ( a · b ) + ( a · c ) • a + ( b · c ) = ( a + b ) · ( a + c )

  5. Associative Law • Operators * and + are associative • a + (b + c) = (a + b) + c • a · (b · c) = (a · b) · c • The associative law can be derived from the postulates

  6. Comparison with ordinary algebra • The distributive law of + over * is not valid for regular algebra • a + ( b * c ) = ( a + b ) * ( a + c ) • Boolean algebra does not have additive or multiplicative inverses; therefore there are no subtraction or division operations

  7. Truth Tables x’ x · y x + y

  8. Duality • The principle of duality is an important concept. • It says that if an expression is valid in Boolean algebra, the dual of that expression is also valid. • To form the dual of an expression, replace all + operators with * operators, all * operators with + operators, all ones with zeros, and all zeros with ones.

  9. Duality • Example 1 • Given equation a + (b * c) = (a + b) * (a + c) • The dual is as follows: a * (b + c) = (a* b) + (a * c) • Example 2 • Given equation a + 1 = 1 • The dual is as follows a * 0 = 0

  10. DeMorgan’s Theorem • A key theorem in simplifying Boolean algebra expression is DeMorgan’s Theorem. It states: (a + b)’ = a’b’ (ab)’ = a’ + b’ • Complement the expression a(b + z(x + a’)) and simplify. (a(b+z(x + a’)))’ = a’ + (b + z(x + a’))’ = a’ + b’(z(x + a’))’ = a’ + b’(z’ + (x + a’)’) = a’ + b’(z’ + x’a’’) = a’ + b’(z’ + x’a)

  11. Theorem 1(a) • This theorem states: x+x= x • Proof:

  12. Theorem 1(b) • This theorem states: x·x= x • Proof:

  13. Theorem 2(a) • This theorem states: x+1= 1 • Proof:

  14. Theorem 2(b) • This theorem states: x·0= 0 • Proof (hint - use the duality property):

  15. Hard One • Prove: xy + x’z= xy + yz + x’z

  16. CIRCUIT REPRESENTATIONS

  17. Overview • Expressing Boolean functions • Relationships between algebraic equations, symbols, and truth tables • Simplification of Boolean expressions • Minterms and Maxterms • AND-OR representations • Product of sums • Sum of products

  18. x 0 0 0 0 1 1 1 1 y 0 0 1 1 0 0 1 1 z 0 1 0 1 0 1 0 1 F 0 0 0 0 1 0 1 1 x y F = x(y+z’) z y+z’ z’ F = x(y+z’) Boolean Functions • Boolean algebra deals with binary variables and logic operations. • Function results in binary 0 or 1

  19. G 0 0 0 1 0 0 1 1 x xy y G = xy +yz z yz Boolean Functions x 0 0 0 0 1 1 1 1 y 0 0 1 1 0 0 1 1 z 0 1 0 1 0 1 0 1 xy 0 0 0 0 0 0 1 1 yz 0 0 0 1 0 0 0 1 We will learn how to transition between equation, symbols, and truth table.

  20. Boolean Expression Circuit Truth Table Representation Conversion • Need to transition between Boolean expression, truth table, and circuit (symbols).

  21. G 0 0 0 1 0 0 1 1 Truth Table to Expression • Converting a truth table to an expression • Each row with output of 1 becomes a product term • Sum product terms together. x 0 0 0 0 1 1 1 1 y 0 0 1 1 0 0 1 1 z 0 1 0 1 0 1 0 1 Any Boolean Expression can be represented in sum of products form! xyz + xyz’ + x’yz

  22. x x x x 0 0 0 0 1 1 1 1 y 0 0 1 1 0 0 1 1 z 0 1 0 1 0 1 0 1 G 0 0 0 1 0 0 1 1 G x x x x x x x z y G = xyz + xyz’ + x’yz Equivalent Representations of Circuits • All three formats are equivalent • Number of 1’s in truth table output column equals AND terms for Sum-of-Products (SOP)

  23. Reducing Boolean Expressions G = xyz + xyz’ + x’yz • Is this the smallest possible implementation of this expression? No! • Use Boolean Algebra rules to reduce complexity while preserving functionality. • Step 1: Use Theorem 1 (a + a = a) • So xyz + xyz’ + x’yz = xyz + xyz + xyz’ + x’yz • Step 2: Use distributive rule a(b + c) = ab + ac • So xyz + xyz + xyz’ + x’yz = xy(z + z’) + yz(x + x’) • Step 3: Use Postulate 3 (a + a’ = 1) • So xy(z + z’) + yz(x + x’) = xy · 1 + yz · 1 • Step 4: Use Postulate 2 (a · 1 = a) • So xy · 1 + yz · 1 = xy + yz = xyz + xyz’ + x’yz

  24. x 0 0 0 0 1 1 1 1 y 0 0 1 1 0 0 1 1 z 0 1 0 1 0 1 0 1 G 0 0 0 1 0 0 1 1 Reduced Hardware Implementation • Reduced equation requires less hardware! • Same function implemented! x x G x x x z y G = xyz + xyz’ + x’yz = xy + yz

  25. Minterms and Maxterms • Each variable in a Boolean expression is a literal • Boolean variables can appear in normal (x) or complement form (x’) • Each AND combination of terms is a minterm • Each OR combination of terms is a maxterm For example: Minterms x y z Minterm 0 0 0 x’y’z’ m0 0 0 1 x’y’z m1 … 1 0 0 xy’z’ m4 … 1 1 1 xyz m7 For example: Maxterms x y z Maxterm 0 0 0 x+y+z M0 0 0 1 x+y+z’ M1 … 1 0 0 x’+y+z M4 … 1 1 1 x’+y’+z’ M7

  26. x 0 0 0 0 1 1 1 1 y 0 0 1 1 0 0 1 1 z 0 1 0 1 0 1 0 1 G 0 0 0 1 0 0 1 1 Representing Functions with Minterms • Minterm number same as row position in truth table (starting from top from 0) • Shorthand way to represent functions G = xyz + xyz’ + x’yz G = m7 + m6 + m3 = Σ(3, 6, 7)

  27. G 0 0 0 1 0 0 1 1 G’ 1 1 1 0 1 1 0 0 Complementing Functions • Minterm number same as row position in truth table (starting from top from 0) • Shorthand way to represent functions x 0 0 0 0 1 1 1 1 y 0 0 1 1 0 0 1 1 z 0 1 0 1 0 1 0 1 G = xyz + xyz’ + x’yz G’ = (xyz + xyz’ + x’yz)’ = Can we find a simpler representation?

  28. G = a + b+ c G = a + b+ c G’ = (a + b+ c)’ G’ = a’ · b’ · c’ = a’b’c’ Complementing Functions Step 1: assign temporary names • b+ c z • (a+ z)’ = G’ • Step 2: Use DeMorgans’ Law • (a+ z)’ = a’ · z’ • Step 3: Resubstitute (b+c) for z • a’ · z’ = a’ · (b + c)’ • Step 4: Use DeMorgans’ Law • a’ · (b + c)’ = a’ · (b’ · c’) • Step 5: Associative rule • a’ · (b’ · c’) = a’ · b’ · c’

  29. Complementation Example • Find complement of F = x’z + yz • F’ = (x’z + yz)’ • DeMorgan’s • F’ = (x’z)’ (yz)’ • DeMorgan’s • F’ = (x’’+z’)(y’+z’) • Reduction -> eliminate double negation on x • F’ = (x+z’)(y’+z’) This format is called product of sums

  30. x 0 0 0 0 1 1 1 1 y 0 0 1 1 0 0 1 1 z 0 1 0 1 0 1 0 1 G 0 0 0 1 0 0 1 1 Conversion Between Canonical Forms • Easy to convert between minterm and maxterm representations • For maxterm representation, select rows with 0’s G = xyz + xyz’ + x’yz G = m7 + m6 + m3 = Σ(3, 6, 7) G = M0M1M2M4M5 = Π(0,1,2,4,5) G = (x+y+z)(x+y+z’)(x+y’+z)(x’+y+z)(x’+y+z’)

  31. Representation of Circuits • All logic expressions can be represented in 2-level format • Circuits can be reduced to minimal 2-level representation • Sum of products representation most common in industry.

  32. Venn Diagrams

  33. Venn Diagram: A+B

  34. Venn Diagram: A.B

  35. Containment

  36. Venn Diagram: A’B

  37. Venn Diagram: A+B’

  38. Venn Diagram: (A+B’)’ = A’.B

  39. Venn Diagram: A’+B’ =?

  40. Venn Diagram: A’+B’ = (AB)’

  41. Venn Diagram: 3 Variables

  42. Summary • Truth table, circuit, and boolean expression formats are equivalent • Easy to translate truth table to SOP and POS representation • Boolean algebra rules can be used to reduce circuit size while maintaining function • Venn Diagrams can be used to represent Boolean expressions. • All logic functions can be made from AND, OR, and NOT

  43. Codes

  44. Binary Coded Decimal • Binary coded decimal (BCD) represents each decimal digit with four bits • Ex· 0011 0010 1001 = 32910 • This is NOT the same as 0011001010012 • Why do this? Because people think in decimal. 3 2 9

  45. Putting It All Together • BCD not very efficient. • Used in early computers (40s, 50s). • Used to encode numbers for seven-segment displays. • Easier to read?

  46. Gray Code • Gray code is not a number system. • It is an alternate way to represent four bit data • Only one bit changes from one decimal digit to the next • Useful for reducing errors in communication. • Can be scaled to larger numbers.

  47. ASCII Code • American Standard Code for Information Interchange • ASCII is a 7-bit code, frequently used with an 8th bit for error detection.

  48. ASCII Codes and Data Transmission • ASCII Codes • A – Z (26 codes), a – z (26 codes) • 0-9 (10 codes), others (@#$%^&*…·)

More Related