Вы находитесь на странице: 1из 25

4

BOOLEAN ALGEBRA

At the end of the lesson, students should be able to:


1. 2. 3. 4. Explain the INVERTER, AND, OR, NAND and NOR gate using Boolean Algebra. Describe DeMorgans theorems to Boolean expression and evaluate Boolean expression. Simplification using Boolean algebra into Sum-Of-Product (SOP) form. Explain of dont care condition.

UNIT 4: BOOLEAN ALGEBRA

INTRODUCTION

Boolean algebra is the mathematic of digital system. This topic covers laws, rules and theorem of Boolean algebra and their application to digital circuits. You will also learning the Boolean operations and expressions in terms of their relationship to NOT, AND, OR, NAND and NOR gates introduce.

4.1

NOT, AND, OR, NAND BOOLEAN ALGEBRA

AND

NOR

GATES

USING

Boolean algebra is the mathematics of digital systems. A basic knowledge of Boolean algebra is indispensable to the study and analysis of logic circuits.

Variable, complement and literal


Variable, complement and literal are the terms used in Boolean algebra. i. Variable - Symbol (usually an italic uppercase letter to represent a logical quantity) - Single variable can have a 1 or 0 value.

ii.

Complement - Is the inverse of a variable and is indicated by a bar over the variable (over bar) - Example: A A , if A = 1 then A 0

iii.

Literal

- A literal is a variable or the complement of a variable. - For example: B indicates the complement of B.

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

78

UNIT 4: BOOLEAN ALGEBRA

Boolean Addition
Boolean addition is equivalent to the OR operation and the basic rules are illustrated with their relation to the OR gate as follows:

In Boolean algebra, a sum term is a sum of literals. 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 are1. A sum term is equal to 0 only if each of the literals is 0.

Example 1:
Determine the values of A, B, C and D that make the sum term

A B C D equal to 0.
Solution;

A B C D 0 1 0 1 0 0 0 0 0

Boolean Multiplication
Boolean Multiplication is the equivalent to the AND operation and the basic rules are illustrated with their relation to the AND gate as follows:

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

79

UNIT 4: BOOLEAN ALGEBRA

In Boolean algebra, a product term is the product of literals. Some examples of product terms are

AB, AB, ABCandABCD


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.

Example2:
Determine the values of A, B, C and D that make the product term ABC D equal to 1.

Solution;

ABC D 1.0.1.0 1.1.1.1 1

Laws And Rules Of Boolean Algebra


Laws of Boolean Algebra The basic of Boolean algebra: -

1.

A + B = B + A

2.

AB = BA

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

80

UNIT 4: BOOLEAN ALGEBRA

3.

A + (B + C) = (A + B) + C

4.

A (BC) = (AB) C

5.

A (B + C) = AB + AC

Twelve Basic Rules of Boolean Algebra There are 12 basic rules that are useful in manipulating and simplifying Boolean expressions. Rule 1. A + 0 = A

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

81

UNIT 4: BOOLEAN ALGEBRA

Rule 2.

A + 1 = 1

Rule 3.

A . 0 = 0

Rule 4.

A . 1 = A

Rule 5.

A + A = A

Rule 6.

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

82

UNIT 4: BOOLEAN ALGEBRA

Rule 7.

A . A = A

Rule 8.

A A 0

Rule 9.

A A

Rule 10. A + AB = A

A AB A 1 B
A 1 A

- factoring

- rule 2: (1 + B) = 1 - rule4: A . 1 = A

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

83

UNIT 4: BOOLEAN ALGEBRA

Rule 11.

A AB A B
A AB A AB AB AA AB AB
- rule 10: A = A + AB

- rule 7: A = AA

AA AB A A AB - rule 8: adding AA = 0
A A A B

- factoring - rule 6: A A 1 - rule 4: drop the 1

1 A B A B

Rule 12. (A + B)(A + C) = A + BC

A B A C AA AC AB BC
A AC AB BC
- rule 7: AA = A

A1 C AB BC
( A 1) AB BC

- factoring - rule 2: 1 + C=1 - factoring - rule 2: 1 + B=1 - rule 4: A .1 =A

A1 B BC A 1 BC
A BC

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

84

UNIT 4: BOOLEAN ALGEBRA

4.2

DEMORGANS THEOREMS

DeMorgans theorem is important because it show us how to find the equivalent of NAND and NOR gates. State DeMorgans Theorem Two DeMorgans theorem are: Sign . Change to +, breaks the bar

a.
Sign + Change to ., breaks the bar

b.

Relate DeMorgans Theorem to the equivalency of the: i. NAND and negative-OR gates Inputs 0 0 1 1 0 1 0 1 Output 1 1 1 0 1 1 1 0

ii.

NOR and negative-AND gates Inputs 0 0 1 1 0 1 0 1 Output 1 0 0 0 1 0 0 0

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

85

UNIT 4: BOOLEAN ALGEBRA

Notice the equality of the two output columns in each truth table. This shows that the equivalent gates perform the same logic function.

Example 1:
Apply DeMorgans theorems to the expression XYZ and X Y Z

Solution;

XYZ X Y Z

X Y Z XY Z

Applying DeMorgans Theorem

Example 1:
Applying DeMorgans theorem to the expression below:

Solution;

Assume

and

From DeMorgan rule (b): (1) (2) Insert (2) into (1)

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

86

UNIT 4: BOOLEAN ALGEBRA

Example 2:
Simplify the expression

Solution:
Step 1: DeMorgan Rule (a) : Assume and

Step 2: DeMorgan Rule (b) :

Example 3:
Simplify the expression

Solution:
Step 1 : Step 2 : DeMorgan Rule (b) : Rule 1: A+(B+C)=(A+B)+C

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

87

UNIT 4: BOOLEAN ALGEBRA

4.3

SIMPLIFICATION USING BOOLEAN ALGEBRA INTO SUM OF PRODUCTS (SOP) AND PRODUCT OF SUM (POS) FORM

When two or more product terms are summed by Boolean addition, the resulting expression is a sum-of-products (SOP). Some examples are: -

AB ABC ABC CDE BC D AB ABC AC


Also an SOP expression can contain a single-variable term as in A + A B C + B C D. In an SOP expression, a single over bar cannot extend over more than one variable; however, more than one variable in a term can have an over bar. For example, an SOP expression can have the term ABC but not ABC

Domain of a Boolean expression The domain of a general Boolean expression is the set of variables contained in the expression in either complemented or un-complemented form. For example: i. ii.

AB ABC is the set of variables A, B and C ABC C DE BC D is the set of variables A, B, C, D and E

Implementation of an SOP expression. Implementation an SOP expression simply requires from the outputs of two or more AND gates. A product term is produced by an AND operation, and the sum (addition) of two or more product terms is produced by an OR operation. Therefore, an SOP expression can be implemented by AND-OR logic in which the output of a number of AND gates connect to the inputs of an OR gate. Example AB + BCD + AC in figure 4.1.

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

88

UNIT 4: BOOLEAN ALGEBRA

Figure 4.1: Implementation of the SOP expression AB + BCD + AC

Convert a General Expression to SOP Form

Example 1:
Convert each of the following Boolean expression to SOP form: a. A B + B (CD + EF) b. (A + B) (B + C + D) c.

A B C
a. A B + B (CD + EF) =

Solution;

b. (A + B) (B + C + D) =AB+AC+AD+BB+BC+BD = AB+AC+AD+B+BC+BD

c.

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

89

UNIT 4: BOOLEAN ALGEBRA

The Standard SOP Form 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 ABC D ABC D is a standard SOP expression.


Convert Product Terms to Standard SOP Step 1: multiply each nonstandard product term by made up of the sum of a missing variable and its complement. Step 2: repeat step 1 until all resulting product terms contain all variables in the domain in either complemented or un-complemented form.

Example 1:
Convert the following Boolean expression into standard SOP form:

ABC AB ABCD
Solution;
- A B C is missing variable D or D ABC AB ABCD ABC ( D D) ABCD ABC D

AB AB(C C ) ABC ABC


ABC ( D D) ABCD ABC D

- AB is missing variable C or C and D or D

ABC( D D) ABCD ABC D

ABC AB ABCD ABCD ABC D A BCD A BC D


A BC D ABC D ABC D

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

90

UNIT 4: BOOLEAN ALGEBRA

Binary Representation of a Standard Product Term A standard product term is equal to 1 for only one combination of variable values.

Example 1:
The product term ABC D 1; when A = 1, B = 0, C = 1 and D = 0

ABC D 1 0 1 0 1 1 1 1 1
Example 2:
Determine the binary values for the following standard SOP expression equal to 1.

Solution;

ABCD ABCD ABC D

The term ABCD 1 ; when A = 1, B = 1, C = 1 and D = 1

ABCD 1 1 1 1 1
The term ABCD 1 ; when A = 1, B = 0, C = 0 and D =1

ABCD 1 0 0 1 1 1 1 1 1
The term ABC D 1 ; when A = 0, B = 0, C = 0 and D = 0

ABC D 0 0 0 0 1 1 1 1 1
The SOP expression equals 1 when any or all of the three product terms is 1

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

91

UNIT 4: BOOLEAN ALGEBRA

Simplification Using Boolean Algebra Into Product Of Sums (Pos) Form

Product-of-Sums (POS). When two or more sum terms are multiplied, the resulting expression is a product-of-sums (POS). Some examples are: -

( A B)( A B C ) ( A B C )(C D E)( B C D) ( A B)( A B C )( A C )


A can contain a single-variable term as in A( A B C )( B C D) . In a POS expression, a single over bar cannot extend POS expression

over more than one variable; however, more than one variable in a term can have an over bar. Example, a POS expression can have term A B C but not

A B C.

Implementation of a POS Expression. POS expression simply requires AND in the outputs of two or more OR gates. A sum term is produced by an OR operation, and the product of two or more sum terms is produced by AND operation. Therefore, a POS expression can be implemented by logic in which the outputs of a number of OR gates connect to the inputs of an AND gate.

Example (A + B)(B + C + D)(A +C) in Figure 4.2.

Figure 4.2: Implementation of the POS expression (A + B)(B + C + D)(A +C)


Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

92

UNIT 4: BOOLEAN ALGEBRA

The Standard POS Form. A standard POS expression is one in which all the variables in the domain appear in each sum term in the expression. For example: -

Is a standard POS expression, any nonstandard POS expression can be converted to the standard form using Boolean algebra.

Convert a Sum Term to Standard POS Procedure: 1. Add to each nonstandard product term a term made up of the product of the missing variable and its complement. This results in two sum terms. 2. Apply rule 12: A + B C = (A + B)(A + C) 3. Repeat step 1 until resulting sum terms contain all variables in the domain in either complemented or un-complemented form.

Example 1:
Convert the following Boolean expression into standard POS form.

( A B C )( B C D)( A B C D)
Solution;
( A B C) - Missing D D - Add D D

( A B C D)( A B C D)
( B C D) - Missing A A - Add A A

( A B C D)( A B C D)

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

93

UNIT 4: BOOLEAN ALGEBRA

( A B C D)( A B C D)( A B C D)( A B C D)( A B C D)

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

94

UNIT 4: BOOLEAN ALGEBRA

Binary representation of a standard sum Term.

A standard sum term is equal to 0, for only one combination of variables values.

Example 2:
The sum term A B C D = 0 when A = 0, B = 1, C = 0 and D = 1

A B C D 0 1 0 1
Example 3:
Determine the binary values of the variables for which the following standard POS expression is equal to 0.

( A B C D)( A B C D)( A B C D)
Solution;
The term ( A B C D) 0 when A=0, B=0, C=0 and D=0

( A B C D) 0 0 0 0 0
The term ( A B C D) 0 when A=0, B=1, C=1 and D=0

( A B C D) 0 1 1 0 0
The term ( A B C D) 0 when A=1, B=1, C=1 and D=1

( A B C D) 1 1 1 1 0
The POS expression equals 0 when any of the three SUM terms equals 0.

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

95

UNIT 4: BOOLEAN ALGEBRA

Convert Standard SOP to Standard POS The binary values of the product terms in a given standard SOP expression are not present in the equivalent standard POS expression. Also, the binary values that are not represented in the SOP expression are present in the equivalent POS expression. Therefore, to convert from standard SOP to standard POS, the following steps are taken: Step 1: Step 2: Step 3: Evaluate each product term in the SOP expression. That is, determine the binary numbers that represent the product terms. Determine all of the binary numbers not included in the evaluation in step 1. Write the equivalent sum term for each binary number from step 2 and express in POS form.

Example 4:
Convert the following SOP expression to an equivalent POS expression

ABC ABC ABC ABC ABC


Solution;

ABC ABC ABC ABC ABC = 000 + 010 + 101 + 110 + 111
Variables = 3 N=2n = 23 = 8 possible combinations Truth table A 0 0 0 0 1 1 1 1
Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

B 0 0 1 1 0 0 1 1

C 0 1 0 1 0 1 0 1

SOP/POS SOP POS SOP POS POS SOP SOP SOP

96

UNIT 4: BOOLEAN ALGEBRA

So, the POS must contain the other three, which are 001, 011 and 100.

The Different Between SOP and POS Form

SOP Equation From Truth Table Output = 1 Where A = 1 A = 0 Equation

POS

From Truth Table Output = 0 Where A = 0 A = 1

4.3

USE OF DONT CARE CONDITION TO SIMPLIFY LOGIC FUNCTION

Sometimes a situation arises in which some input variable combinations are not allowed. For example, recall that in the BCD code, there are six invalid combinations: 1010, 1011, 1100, 1101, 1110 and 1111, Since these un-allowed states will never occur in a application involving BCD code, they can be treated as dont care terms with respect to their effect on the output. That is, for these dont care terms either a 1 or 0 may be assigned to the output; it really does not matter since they will never occur.

The dont care terms can be used to advantage on the Karnaugh map. Figure 4.3 shows that for each dont care term, an X is placed in the cell. When grouping the 1s, the Xs can be treated as 1s to make larger grouping or as 0s if they cannot be used to advantage. The larger a group, the simpler the resulting term will be. The truth table in figure 4.3(a) describes a logic function that has a 1 output only when the BCD code for 7, 8 or 9 is present on the inputs. If dont cares are used as 1s, the resulting expression for the function is A + BCD, as indicated in part (b). If the dont care are not used as 1s, the resulting expression is:

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

97

UNIT 4: BOOLEAN ALGEBRA

So you can see the advantage of using dont care terms to get the simplest expression.

Figure 4.3: Example of the use of dont care condition to simplify an expression

SUMMARY

In this topic, we have learn about the operation of the basic logic gate like the INVERTER or NOT, AND, OR, NAND and NOR gate. Student also should be understand about the operation of the exclusive-OR gate and exclusive-NOR gate. Student should be able to identify the shape of logic gate symbols according to the ANSI/IEEE (American National Standard Institute/ International Electrical Electronic Engineering). To understand more about digital signal input and output, student must be construct timing diagrams that showing the proper time relationships of inputs and outputs for the various logic gates. Student also learned about the characteristic of IC CMOS(Complimentary Metal Oxide Semiconductor) and TTL(Transistor-Transistor Logic) families to know the differ from each other in propagation delay time, power dissipation, speed-power product and fan-out,
Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

98

UNIT 4: BOOLEAN ALGEBRA

They also learned how to troubleshoot the logic gates for opens and shorts by using the oscilloscope.

EXERCISE

1. If A = 0, what does A equal? ______________________________

2. Determine the values of A, B and C that make the sum term A B C equal to 0. _____________________________

3. Determine the values of A, B and C that make the product term ABC equal to 1. ______________________________

4. Apply the associative law of addition to the expression A + (B + C + D)

5. Apply the distributive law to the expression A (B + C + D).

6. Which of the following rules states that if one input of an AND gate is always 1, the output is equal to the other input? a. A + 1 = 1 b. A + A = A c. A . A = A d. A . 1 = A

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

99

UNIT 4: BOOLEAN ALGEBRA

7. Apply DeMorgans theorems to each of the following expressions: a. (A + B + C) D b. ABC + DEF

c. AB + CD + EF

8. Convert A B C + (A + B)(B + C + A B) to SOP form.

9. Convert the expression WX Y XYZ W X Y to standard form.

10. Convert the expression (A + B)(B + C) to standard POS form.

11. Determine the binary values for the POS expression below equal to 0

( X Y Z )( X Y Z )( X Y Z )( X Y Z )( X Y Z )

REFERENCE

1. Digital System Principle And Applications, Tocci, R.J, Prentice Hall international 2. Digital Fundamentals, Floyd T.L, Merrill Publishing. 3. BPL(K) Module : TFV 2033 Digital Electronics 1. 4. Digital Electronics (Teaching Module), KUITHO.

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

100

UNIT 4: BOOLEAN ALGEBRA

Fatma Syazana Zaini Pegawai Latihan Vokasional IKM Besut, 2010

101

Вам также может понравиться