


























































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



























































Variable, complement, and literal are terms used in Boolean algebra. A variable is a symbol used to represent a logical quantity. Any single variable can have a 1 or a 0 value. The complement is the inverse of a variable and is indicated by a bar over variable (overbar). For example, the complement of the variable A is A. If A = 1, then A = 0. If A = 0, then A = 1. The complement of the variable A is read as "not A" or "A bar." Sometimes a prime symbol rather than an overbar is used to denote the complement of a variable; for example, B' indicates the complement of B. A literal is a variable or the complement of a variable.
Boolean Addition Recall from part 3 that Boolean addition is equivalent to the OR operation. In Boolean algebra, a sum term is a sum of literals. In logic circuits, a sum term is produced by an OR operation with no AND operations involved. Some examples of sum terms are A + B, A + B, A + B + C, and A + B + C + D. A sum term is equal to 1 when one or more of the literals in the term are 1. A sum term is equal to 0 only if each of the literals is 0.
Example Determine the values of A, B, C, and D that make the sum term A + B + C + D equal to 0.
Boolean Multiplication Also recall from part 3 that Boolean multiplication is equivalent to the AND operation. In Boolean algebra, a product term is the product of literals. In logic circuits, a product term is produced by an AND operation with no OR operations involved. Some examples of product terms are AB, AB, ABC, and ABCD. A product term is equal to 1 only if each of the literals in the term is 1. A product term is equal to 0 when one or more of the literals are 0. Example Determine the values of A, B, C, and D that make the product term ABCD equal to 1.
■ Laws of Boolean Algebra The basic laws of Boolean algebra-the commutative laws for addition and multiplication, the associative laws for addition and multiplication, and the distributive law-are the same as in ordinary algebra.
Commutative Laws ►The commutative law of addition for two variables is written as A+B = B+A This law states that the order in which the variables are ORed makes no difference. Remember, in Boolean algebra as applied to logic circuits, addition and the OR operation are the same. Fig.(4-1) illustrates the commutative law as applied to the OR gate and shows that it doesn't matter to which input each variable is applied. (The symbol ≡ means "equivalent to.").
This law states that it makes no difference in what order the variables are grouped when ANDing more than two variables. Fig.(4-4) illustrates this law as applied to 2-input AND gates.
Fig.(4-4) Application of associative law of multiplication.
Distributive Law : ►The distributive law is written for three variables as follows: A(B + C) = AB + AC This law states that ORing two or more variables and then ANDing the result with a single variable is equivalent to ANDing the single variable with each of the two or more variables and then ORing the products. The distributive law also expresses the process of factoring in which the common variable A is factored out of the product terms, for example, AB + AC = A(B + C). Fig.(4-5) illustrates the distributive law in terms of gate implementation.
Fig.(4-5) Application of distributive law.
■ Rules of Boolean Algebra Table 4-1 lists 12 basic rules that are useful in manipulating and simplifying Boolean expressions. Rules 1 through 9 will be viewed in terms of their application to logic gates. Rules 10 through 12 will be derived in terms of the simpler rules and the laws previously discussed.
Table 4-1 Basic rules of Boolean algebra.
Rule 1. A + 0 = A A variable ORed with 0 is always equal to the variable. If the input variable A is 1, the output variable X is 1, which is equal to A. If A is 0, the output is 0, which is also equal to A. This rule is illustrated in Fig.(4-6), where the lower input is fixed at 0.
Fig.(4-6)
Rule 5. A + A = A A variable ORed with itself is always equal to the variable. If A is 0, then 0
Fig.(4-10)
Rule 6. A + A = 1 A variable ORed with its complement is always equal to 1. If A is 0, then 0 + 0 = 0 + 1 = 1. If A is l, then 1 + 1 = 1+ 0 = 1. See Fig.(4-11), where one input is the complement of the other.
Fig.(4-11)
Rule 7. A. A = A A variable ANDed with itself is always equal to the variable. If A = 0, then 0.0 = 0; and if A = 1. then 1.1 = 1. Fig.(4-12) illustrates this rule.
Fig.(4-12)
Rule 8. A. A = 0 A variable ANDed with its complement is always equal to 0. Either A or A will always be 0: and when a 0 is applied to the input of an AND gate. the output will be 0 also. Fig.(4-13) illustrates this rule.
Fig.(4-13)
Rule 9 A = A The double complement of a variable is always equal to the variable. If you start with the variable A and complement (invert) it once, you get A. If you then take A and complement (invert) it, you get A, which is the original variable. This rule is shown in Fig.(4-14) using inverters.
Fig.(4-14)
Rule 10. A + AB = A This rule can be proved by applying the distributive law, rule 2, and rule 4 as follows: A + AB = A( 1 + B) Factoring (distributive law) = A. l Rule 2: (1 + B) = 1 = A Rule 4: A. 1 = A
The proof is shown in Table 4-2, which shows the truth table and the resulting logic circuit simplification.
Rule 12. (A + B)(A + C) = A + BC This rule can be proved as follows: (A + B)(A + C) = AA + AC + AB + BC Distributive law = A + AC + AB + BC Rule 7: AA = A = A( 1 + C) + AB + BC Rule 2: 1 + C = 1 = A. 1 + AB + BC Factoring (distributive law) = A(1 + B) + BC Rule 2: 1 + B = 1 = A. 1 + BC Rule 4: A. 1 = A = A + BC
The proof is shown in Table 4-4, which shows the truth table and the resulting logic circuit simplification.
Table 4-
DeMorgan, a mathematician who knew Boole, proposed two theorems that are an important part of Boolean algebra. In practical terms. DeMorgan's theorems provide mathematical verification of the equivalency of the NAND and negative-OR gates and the equivalency of the NOR and negative-AND gates, which were discussed in part 3. One of DeMorgan's theorems is stated as follows: The complement of a product of variables is equal to the sum of the complements of the variables, Stated another way, The complement of two or more ANDed variables is equivalent to the OR of the complements of the individual variables.
The formula for expressing this theorem for two variables is XY = X + Y
DeMorgan's second theorem is stated as follows: The complement of a sum of variables is equal to the product of the complements of the variables. Stated another way, The complement of two or more ORed variables is equivalent to the AND of the complements of the individual variables,
The formula for expressing this theorem for two variables is X + Y = X Y Fig.(4-15) shows the gate equivalencies and truth tables for the two equations above.
Applying DeMorgan's Theorems The following procedure illustrates the application of DeMorgan's theorems and Boolean algebra to the specific expression
Step l. Identify the terms to which you can apply DeMorgan's theorems, and think of each term as a single variable. Let A + BC = X and D(E + F) = Y.
Step 2. Since X + Y = X Y,
Step 3. Use rule 9 (A = A) to cancel the double bars over the left term (this is not part of DeMorgan's theorem).
(A + BC) (D(E + F)) = (A + BC)(D(E + F ))
Step 4. Applying DeMorgan's theorem to the second term,
(A + BC)(D(E + F)) = (A + BC)(D + (E + F ))
Step 5. Use rule 9 (A = A) to cancel the double bars over the E + F part of the term. (A + BC)(D + E + F) = (A + BC)(D + E + F)
Example Apply DeMorgan's theorems to each of the following expressions:
(a) (A + B + C)D (b) ABC + DEF (c) AB + CD + EF
Example The Boolean expression for an exclusive-OR gate is AB + AB. With this as a starting point, use DeMorgan's theorems and any other rules or laws that are applicable to develop an expression for the exclusive-NOR gate.
Boolean algebra provides a concise way to express the operation of a logic circuit formed by a combination of logic gates so that the output can be determined for various combinations of input values.
Boolean Expression for a Logic Circuit To derive the Boolean expression for a given logic circuit, begin at the left- most inputs and work toward the final output, writing the expression for each gate. For the example circuit in Fig.(4-16), the Boolean expression is determined as follows:
The expression for the left-most AND gate with inputs C and D is CD. The output of the left-most AND gate is one of the inputs to the OR gate and B is the other input. Therefore, the expression for the OR gate is B + CD. The output of the OR gate is one of the inputs to the right-most AND gate and A is the other input. Therefore, the expression for this AND gate is A(B + CD), which is the final output expression for the entire circuit.
Table 4-
A simplified Boolean expression uses the fewest gates possible to implement a given expression.
Example Using Boolean algebra techniques, simplify this expression: AB + A(B + C) + B(B + C) Solution Step 1: Apply the distributive law to the second and third terms in the expression, as follows: AB + AB + AC + BB + BC Step 2: Apply rule 7 (BB = B) to the fourth term. AB + AB + AC + B + BC Step 3: Apply rule 5 (AB + AB = AB) to the first two terms. AB + AC + B + BC Step 4: Apply rule 10 (B + BC = B) to the last two terms.
Step 5: Apply rule 10 (AB + B = B) to the first and third terms. B+AC At this point the expression is simplified as much as possible.
Fig.(4-17) Gate circuits for example above.
Example Simplify the Boolean expressions: 1- AB + A(B + C) + B(B + C). 2- [AB( C + BD) + A B]C 3- ABC + ABC + A B C + ABC + ABC
Fig.(4-18) Implementation of the SOP expression AB + BCD + AC.
Fig.(4-19) This NAND/NAND implementation is equivalent to the AND/OR in figure above.
The Standard SOP Form So far, you have seen SOP expressions in which some of the product terms do not contain all of the variables in the domain of the expression. For example, the expression ABC + ABD + ABCD has a domain made up of the variables A, B, C. and D. However, notice that the complete set of variables in the domain is not represented in the first two terms of the expression; that is, D or D is missing from the first term and C or C is missing from the second term. A standard SOP expression is one in which all the variables in the domain appear in each product term in the expression. For example, ABCD + ABCD
Converting Product Terms to Standard SOP : Each product term in an SOP expression that does not contain all the variables in the domain can be expanded to standard SOP to include all variables in the domain and their complements. As stated in the following steps, a nonstandard SOP expression is converted into standard form using Boolean algebra rule 6 (A + A = 1) from Table 4-1: A variable added to its complement equals 1. Step 1. Multiply each nonstandard product term by a term made up of the sum of a missing variable and its complement. This results in two product terms. As you know, you can multiply anything by 1 without changing its value. Step 2. Repeat Step 1 until all resulting product terms contain all variables in the domain in either complemented or uncomplemented form. In converting a product term to standard form, the number of product terms is doubled for each missing variable.
Example Convert the following Boolean expression into standard SOP form: ABC + AB + ABCD Solution The domain of this SOP expression A, B, C, D. Take one term at a time. The first term, ABC, is missing variable D or D, so multiply the first term by (D + D) as follows: ABC = ABC(D + D) = ABCD + ABCD In this case, two standard product terms are the result. The second term, AB, is missing variables C or C and D or D, so first multiply the second term by C + C as follows: AB = AB(C + C) = ABC + ABC