Presentation is loading. Please wait.

Presentation is loading. Please wait.

EET 1131 Unit 5 Boolean Algebra and Reduction Techniques

Similar presentations


Presentation on theme: "EET 1131 Unit 5 Boolean Algebra and Reduction Techniques"— Presentation transcript:

1 EET 1131 Unit 5 Boolean Algebra and Reduction Techniques
Read Kleitz, Chapter 5 (but you can skip Section 5-6). Exam #1 (on Units 1 to 4) next week. Homework #5 and Lab #5 due next week. Quiz next week. -Take Quiz #4 -Preview Exam #1. -Handouts: Unit 5 practice sheet, slide 32 (K-map procedure). -Fire up Multisim.

2 Reduction Techniques Reduction techniques let us take a digital circuit and reduce it to a simpler but equivalent circuit. Example: The two circuits show below are equivalent to each other. (In other words, whenever you give them both the same inputs, they’ll produce the same output.) Given the prevalence of software that can do reduction for us, these manual techniques are less important today than they were 20 years ago. But you should still be familiar with the basic ideas.

3 Two Primary Methods The two primary manual reduction methods use:
Boolean algebra: a set of rules that let us transform Boolean expressions into equivalent Boolean expressions. Karnaugh maps (also called K-maps): similar to truth tables. The Karnaugh-map method provides a step-by-step procedure. If you follow the steps correctly, you’ll get the right answer. The Boolean-algebra method requires more ingenuity on your part, but may be quicker.

4 Boolean Algebra Boolean algebra is a set of rules first laid out by George Boole ( ) for manipulating Boolean expressions. The rules are similar to the rules of regular algebra for manipulating numeric expressions. Our book lists these rules as: 3 laws 10 rules 2 theorems

5 Example #1 Example #2 Boolean Addition and Multiplication
The OR operation is often called Boolean addition. Variables that are ORed together form a sum term. The AND operation is often called Boolean multiplication. Variables that are ANDed together form a product term. The expression (A+B+C)(D+E) is the product of two sum terms. Example #1 The expression AB + CD + AD is the sum of three product terms. Example #2

6 The commutative law of addition states that
Commutative Laws The commutative law of addition states that The order in which variables are ORed makes no difference. A + B = B + A The commutative law of multiplication states that Show what this means in terms of gates. The order in which variables are ANDed makes no difference. AB = BA

7 The associative law of addition states that
Associative Laws The associative law of addition states that When ORing more than two variables, the result is the same regardless of the grouping of the variables. A + (B +C) = (A + B) + C The associative law of multiplication states that Show what this means in terms of gates. When ANDing more than two variables, the result is the same regardless of the grouping of the variables. A(BC) = (AB)C

8 Distributive Law The distributive law is the factoring law. A common variable can be factored from an expression just as in ordinary algebra. That is AB + AC = A(B+ C) The distributive law can be illustrated with equivalent circuits: A(B+ C) AB + AC

9 Distributive Law (Continued)
Another form of the distributive law is the same as the FOIL (First-Outer-Inner-Last) rule that you’ve learned in math classes: (A + B)(C + D) = AC + AD + BC + BD

10 Rules of Boolean Algebra
7. A . A = 0 2. A . 1 = A 8. A + A = 1 9. A = A = 3. A + 0 = A 4. A + 1 = 1 10. (a) A + AB = A + B (b) A + AB = A + B Rule 10 can be derived from the others, so it is not necessary. -Discuss Rules 1 to 9 in terms of truth tables of basic gates. 5. A . A = A 6. A + A = A

11 Applying the Rules In the rules and laws on the previous slides, you can replace any single variable (such as A) with any expression. For example: Rule 1 says that A . 0 = 0 More generally, any expression ANDed with 0 is equal to 0: (A + BC + DE) . 0 = 0 Another example: Rule 6 says that A + A = A So (AB + CD) + (AB + CD) = (AB + CD) Do some examples.

12 DeMorgan’s Theorems DeMorgan’s 1st Theorem The complement of a product of variables is equal to the sum of the complemented variables. AB = A + B Above it was written with two variables, but it applies more generally. For example: ABCD = A + B + C + D

13 DeMorgan’s Theorems DeMorgan’s 2nd Theorem The complement of a sum of variables is equal to the product of the complemented variables. A + B = A . B Above it was written with two variables, but it applies more generally. For example: A+B+C+D = A . B . C . D

14 Example Solution = DeMorgan’s Theorems
Apply DeMorgan’s theorem to remove the overbar covering both terms from the expression X = C + D. Solution To apply DeMorgan’s theorem to the expression, you can break the overbar covering both terms and change the sign between the terms. This results in X = C . D. Deleting the double bar gives X = C . D. = Do practice sheet question 1. -Then do some examples of derivations.

15 NAND equals “Negative OR”

16 NOR equals “Negative AND”

17 Alternative Symbols for Inverter, NAND, and NOR

18 Example Solution Boolean Analysis of Logic Circuits
Combinational logic circuits can be analyzed by writing the expression for each gate and combining the expressions according to the rules for Boolean algebra. Example Apply Boolean algebra to derive the expression for X. Solution Write the expression for each gate: (A + B ) C (A + B ) Do practice sheet question 2. = C (A + B )+ D X Applying DeMorgan’s theorem: X = C (A B) + D = A B C + D

19 Example Solution Boolean Analysis of Logic Circuits
Use Multisim to generate the truth table for the circuit in the previous example. Set up the circuit using the Logic Converter as shown. (Note that the logic converter has no “real-world” counterpart.) Solution Double-click the Logic Converter to open it. Then click on the conversion bar on the right side to see the truth table for the circuit (see next slide).

20 Boolean Analysis of Logic Circuits
The simplified logic expression can be viewed by clicking Simplified expression

21 Universal Gates NAND gates are sometimes called universal gates because they can be used to produce the other basic Boolean functions. A A A AB B Inverter AND gate A A Show how to use Multisim’s logic converter to generate NAND-only logic circuits. A + B A + B B B OR gate NOR gate

22 Universal Gates NOR gates are also universal gates and can form all of the basic gates. A A A A + B B Inverter OR gate A A AB AB B B AND gate NAND gate

23 Simplifying NAND Circuits
Recall that, according to Demorgan’s theorem, the following two representations of a NAND gate are equivalent: In many cases, this lets you redraw all-NAND circuits in ways that are much easier to read. See example on next slide.

24 Simplifying NAND Circuits
For example, the following circuit uses the two equivalent symbols for a NAND gate: A C X = A C + A B A B The logic is easy to read if you (mentally) cancel the two connected bubbles on a line.

25 Examples of expressions in SOP form:
Sum-of-Products form A Boolean expression is in sum-of-products form (SOP) when it’s written as the sum of one or more products. In SOP form, an overbar cannot extend over more than one variable. Examples of expressions in SOP form: A B C + A B A B C + C D AB +AC + D -The K-map technique requires you first to put your expression in SOP form. The book also discusses product-of-sums form (POS), in which two or more sum terms are multiplied, as in the following examples: SOP form is more widely used than POS form. (A + B)(A + C) (A + B + C)(B + D) (A + B)(B+C)D

26 Many Boolean expressions are in neither SOP form nor POS form.
SOP and POS forms Many Boolean expressions are in neither SOP form nor POS form. Example 1: A(B + C + BC) + (AB + AB)C Example 2: AB + C(AD + BD) But every expression can be converted to SOP form by applying some or all of the following: DeMorgan’s theorems, the distributive law, and the commutative law. -Convert the slide’s two examples to SOP form: A’B’C + A’BC + ABC + AB’C and AB + A’CD + BCD’. -Set up these 2 examples to both sides of the screen.

27 REVIEW: Writing the SOP Expression for any Truth Table
Given the truth table for a circuit, it’s easy to write an SOP-form expression for that circuit. Step 1. For each of the truth table’s rows with a 1 in the output column, list the corresponding product term of the input variables. Step 2. Form the OR of the product terms from Step 1. See example on next slide…

28 A B C X 1 Example: Writing the SOP Expression for a Truth Table
1 Do practice sheet question 3.

29 Writing the Truth Table for any SOP Expression
Given an SOP expression , it’s easy to write the truth table. Step 1. Based on the number of input variables, build the truth table’s input columns. Step 2. For each product term in the SOP expression, place a 1 in the truth table’s output column for all rows that make the product term a 1. Step 3. After completing Step 2 for all product terms in the SOP expression, place a 0 in the output column for all other rows. -Do this with the two examples given above, and use Multisim to check.

30 Each cell differs from an adjacent cell by only one variable.
Karnaugh maps The Karnaugh map (K-map) is a tool for simplifying expressions with 3 or 4 variables. For 3 variables, 8 cells are required (23). The map shown is for three variables labeled A, B, and C. Each cell represents one possible product term. Each cell differs from an adjacent cell by only one variable. -Of the two techniques for logic simplification, Boolean algebra requires ingenuity, and in some cases it’s hard to know when you’re finished; K-maps give us a mechanical procedure. To create the K-map to simplify an expression, you must first get the expression in SOP form.

31 Example Solution Karnaugh maps
Cells in a K-map must be labeled in the order shown. C C Example Read the terms for the yellow cells. AB Solution Do as Practice Question 4. The cells are ABC and ABC.

32 Karnaugh Map Procedure
If you’re starting with a Boolean expression that is not in SOP form, convert it to SOP form. Set up the K-map, labeling its rows and columns. Place 1s in the appropriate squares. Group adjacent 1s in groups of 8, 4, 2, or 1. You want to maximize the size of the groups and minimize the number of groups. Follow this order: Circle any octet. Circle any quad that contains one or more 1s that haven’t already been circled, using the minimum number of circles. Circle any pair that contains one or more 1s that haven’t already been circled, using the minimum number of circles. Circle any isolated 1s that haven’t already been circled. Read off the term for each group by including only those complemented or uncomplemented variables that do not change throughout the group. Form the OR sum of the terms generated in Step 5. Do the two examples from above.

33 Example Solution Karnaugh maps
K-maps can simplify combinational logic by grouping cells and eliminating variables that change. Example Group the 1’s on the map and read the minimum logic. Solution C changes across this boundary 1. Group the 1’s into two overlapping groups as indicated. Read each group by eliminating any variable that changes across a boundary. B changes across this boundary Do as Practice Question 5. The vertical group is read AC. The horizontal group is read AB. X = AC +AB

34 Karnaugh maps A 4-variable map has an adjacent cell on each of its four boundaries as shown. Each cell is different only by one variable from an adjacent cell. Grouping follows the rules given in the text. The following slide shows an example of reading a four variable map using binary numbers for the variables…

35 Example Solution Karnaugh maps X X = AD +AD
Group the 1’s on the map and read the minimum logic. B changes C changes across outer boundary Solution 1. Group the 1’s into two separate groups as indicated. Read each group by eliminating any variable that changes across a boundary. B changes C changes Do as Practice Question 5. The upper (yellow) group is read as AD. The lower (green) group is read as AD. X X = AD +AD


Download ppt "EET 1131 Unit 5 Boolean Algebra and Reduction Techniques"

Similar presentations


Ads by Google