Presentation is loading. Please wait.

Presentation is loading. Please wait.

Digital Logic Design Week 4 Boolean algebra. Laws and rules De Morgan’s theorem Analysis of logic circuits Standard forms Project 1 preparation.

Similar presentations


Presentation on theme: "Digital Logic Design Week 4 Boolean algebra. Laws and rules De Morgan’s theorem Analysis of logic circuits Standard forms Project 1 preparation."— Presentation transcript:

1 Digital Logic Design Week 4 Boolean algebra

2 Laws and rules De Morgan’s theorem Analysis of logic circuits Standard forms Project 1 preparation

3 Boolean algebra George Boole British mathematician and philosopher. An Investigation of the Laws of Thought on Which are Founded the Mathematical Theories of Logic and Probabilities (1854) Claude Shannon American electrical engineer. First to apply Boole’s work to design of logic circuits (1937)  Boolean algebra is the mathematics of digital systems  deals with values 0 and 1, and just three operations: addition, multiplication, and complement

4 Boolean operations Boolean addition differs from binary addition! There is no carry in Boolean addition 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 1 0 · 0 = 0 0 · 1 = 0 1 · 0 = 0 1 · 1 = 1 0’ = 1 1’ = 0 Boolean addition Boolean multiplication Complement

5 Boolean operations 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 1 0 · 0 = 0 0 · 1 = 0 1 · 0 = 0 1 · 1 = 1 0’ = 1 1’ = 0 Boolean addition Boolean multiplication Complement ANDORNOT

6 Sums and products Sum terms are generated by OR gates  Examples of sum terms: A+BA+B’A+B+C’  Variables are symbols representing Boolean values 0,1  A, B and C are variables  Literals are variables or complement of variables  A, B’ and C’ are literals

7 Sums and products Boolean addition is the same as the OR function, so… – sum term is 1 if one or more of the literals are 1 – sum term is 0 only if each literal is 0 Example: Determine the values of the variables A,B,C,D that make the sum term A+B’+C+D’ = 0 Literals A, B’, C and D’ must all equal zero if sum=0 A = B’ = C = D’ = 0A=0, B=1, C=0, D=1

8 Sums and products Product terms are generated by AND gates  Examples of product terms: ABAB’ABC’ Example: Determine the values of the variables A,B,C,D that make the product term AB’CD’ = 1 Literals A, B’, C and D’ must all equal 1 if product=1 A = B’ = C = D’ = 1A=1, B=0, C=1, D=0 A B X Remember: A·B often written simply as AB

9 Boolean algebra Laws and rules De Morgan’s theorem Analysis of logic circuits Standard forms Project 1 preparation

10 Commutative laws For addition: A + B = B + A The order in which variables are ORed makes no difference For multiplication: A · B = B · A The order in which variables are ANDed makes no difference

11 Associative laws For addition: A + (B + C) = (A + B) + C For multiplication: A(BC) = (AB)C

12 Distributive law Expresses the process of factoring A(B + C) = AB + AC

13 Rules of Boolean algebra  Rules 1–9 from definitions of AND, OR and NOT  Rules 10–12 derived from simpler rules and three laws 12. (A + B)(A + C) = A + BC 1. A + 0 = A 2. A + 1 = 1 3. A · 0 = 0 4. A · 1 = A 5. A + A = A 7. A · A = A 6. A + A = 1 8. A · A = 0 9. A = A = 10. A + AB = A 11. A + AB = A + B

14 A couple of the simpler rules A + 0 = A – A variable ORed with 0 is always equal to the variable A · 1 = A  A variable ANDed with 1 is always equal to the variable

15 Proving rules 10–12 Rule 10: A + AB = A A + AB= A·1 + ABRule 4: A·1 = A = A(1 + B)Factoring (Distributive Law) = A·1Rule 2: 1+B = 1 = ARule 4: A·1 = A Complete the following truth table, and hence prove A+AB=A ABABA+AB -------------------------------------0 01 101

16 Proving rules 10–12 Rule 11: A + A’B = A+B A + A’B= (A + AB) + A’BRule 10: A = A+AB = (AA + AB) + A’BRule 7: A = AA = AA + AB + AA’ + A’BRule 8: adding AA’=0 = (A+A’)(A+B)Factoring = 1·(A+B)Rule 6: A+A’=1 = A+BRule 4: drop the 1

17 Proving rules 10–12 Rule 12: (A+B)(A+C) = A + BC Complete the following truth table & prove (A+B)(A+C) = A+BC ABCA+BA+C(A+B)(A+C)BCA+BC -------------------------------------------------------------------------------------- 000 001 010 011 100 101 110 111

18 Duality Principle Any Boolean equality remains valid if we exchange: 1 ↔ 0 AND ↔ OR – This explains why rules 1–8 appear in pairs Example: Apply the duality principle to Rule 1: A+0 = A A + 0 = A → A · 1 = A (Rule 4)

19 Boolean algebra Laws and rules De Morgan’s theorem Analysis of logic circuits Standard forms Project 1 preparation

20 De Morgan’s Theorem A · B = A + BA + B = A · B  Extends to more than two variables  Example:  Each variable can also represent a combination of other variables  Example:

21 Applying De Morgan’s Theorem

22 Use De Morgan’s theorem to simplify the expression

23 Boolean algebra Laws and rules De Morgan’s theorem Analysis of logic circuits Standard forms Project 1 preparation

24 Boolean expression for a logic circuit Begin at the circuit inputs and work towards final output Write expression for each gate output

25 Constructing a truth table for a logic circuit 0 0 0 0 0 0 0 Truth table ABCDA(B+CD) --------------------------------------------- 00000 0001...... 1111... I do NOT recommend using this method to construct the truth table! It’s far too slow

26 Constructing a truth table for a logic circuit  A·(B+C·D)=1  Equals 1 only if A=1 and B+C·D=1  So expression equals 0 for top half of truth table, where A=0  B+C·D=1  Equals 1 when B=1 or C·D=1 or both  B=1 and C·D=0 →B C D=100,101,110  B=0 and C·D=1 →B C D=011  B=1 and C·D=1 →B C D=111 We can now fill in the truth table quickly Use of “standard forms” will simplify the creation of a truth table from logic expression

27 ABCDA·(B+C·D) ------------------------------------------------------------- 00000 00010 00100 00110 01000 01010 01100 01110 10000 10010 10100 10111 11001 11011 11101 11111 A=0 B=0 and C·D=1 B=1 and C·D=0 B=1 and C·D=1

28 Boolean algebra Laws and rules De Morgan’s theorem Analysis of logic circuits Standard forms Project 1 preparation

29 Standard forms All Boolean expressions can be converted into either of two standard forms:  Sum-of-products (SOP) form  Product-of-sums (POS) form Makes the following much easier and systematic:  Evaluation  Simplification  Implementation Truth table from Boolean expression Fewer gates for same function Logic gates to implement expression SOP this week; POS in week 5

30 Sum-of-products (SOP) Sum-of-products (SOP) expressions are product terms summed by Boolean addition Examples: The following expressions are not in SOP form: Remember: “summed” by Boolean addition means OR-ed together

31 AND/OR implementation of SOP SOP expressions simply require ORing outputs of AND gates Domain of a Boolean expression is the set of variables in the expression Example: domain of the expression for X in the figure above is A, B, C, D

32 Conversion to SOP form Convert the following expression to SOP form: Any logic expression can be changed to SOP form simply by applying Boolean algebra

33 Standard SOP form Standard SOP expression All variables in the domain appear in each product term in the expression Example: The following expression is not in standard SOP form: Why not?Missing or in first term, and missing or in second term Product terms involving all variables in the domain are called minterms

34 Conversion to standard SOP form Product terms missing variables can always be expanded to standard form using Boolean algebra rules and Example: First term is missing the variable C

35 Truth tables from standard SOP expressions  Truth table: list of all possible input combinations and corresponding output (0 or 1)  Place a 1 in output column for each input combination that makes the standard SOP expression a 1  0 in remaining rows ABCXproduct term ---------------------------------- 0001 0011 0100 0110 1000 1010 1100 1111

36 Boolean algebra Laws and rules De Morgan’s theorem Analysis of logic circuits Standard forms Project 1 preparation

37 On Sunday (16 Nov), the class will be given a Boolean expression involving 4 variables (A,B,C,D) Project 1  Marked by demonstration to me in week 5 theory section  5 parts, each of equal value: a)Expand given expression to sum-of-products (SOP) form b)Create truth table for expression c)Expand SOP into standard SOP form d)Implement original expression in Logisim using gates e)Enter SOP expression into Logisim, and confirm that the resulting truth table produced by Logisim matches your truth table in part b)

38 Project 1— sample question a)Expand to SOP: b)Truth table: Z=1 only for ABCD=0101,0111,1101 c)Standard SOP: d)Logisim circuit: e)In Logisim: Project > Analyze Circuit enter expression at Expression tab view truth table at Table tab Week04_projectdemo.circ


Download ppt "Digital Logic Design Week 4 Boolean algebra. Laws and rules De Morgan’s theorem Analysis of logic circuits Standard forms Project 1 preparation."

Similar presentations


Ads by Google