Unit 7- Logic Simplification

14
Digital Electronic Systems Unit 7 Logic Simplification Given a logic circuit, derive the Boolean expression Boolean algebra provides a concise way to express the operation of a logic circuit by a combination of logic gates so that the output can be determined for all combinations of the input values. To derive the Boolean expression (Boolean function) for a logic circuit, start at the left-most inputs and work towards the final output, writing the expression for each gate. There are three basic rules that must be adhered to when writing Boolean expressions. 1. Brackets have the highest precedence in Boolean expressions, so the contents of brackets must be implemented first. 2. AND operations are performed before OR operations. 3. A NOT operator in the Boolean expression is indicated by a bar over part (or all) of the expression. For a NOT operator, implement the part of the expression underneath the bar first, and then invert it. Ex. 1 Derive the Boolean expression for the following logic circuit. Ex. 2 Derive the Boolean expression for the following logic circuit. 1

description

microcontrollers and electronics,MCU Unit,beginners course,

Transcript of Unit 7- Logic Simplification

Page 1: Unit 7- Logic Simplification

Digital Electronic Systems Unit 7

Logic Simplification

Given a logic circuit, derive the Boolean expression

Boolean algebra provides a concise way to express the operation of a logic circuit by a combination of logic gates so that the output can be determined for all combinations of the input values. To derive the Boolean expression (Boolean function) for a logic circuit, start at the left-most inputs and work towards the final output, writing the expression for each gate.

There are three basic rules that must be adhered to when writing Boolean expressions.

1. Brackets have the highest precedence in Boolean expressions, so the contents of brackets must be implemented first.

2. AND operations are performed before OR operations.3. A NOT operator in the Boolean expression is indicated by a bar over part (or all) of the

expression. For a NOT operator, implement the part of the expression underneath the bar first, and then invert it.

Ex. 1 Derive the Boolean expression for the following logic circuit.

Ex. 2 Derive the Boolean expression for the following logic circuit.

Ex. 3 Derive the Boolean expression for the following logic circuit.

1

Page 2: Unit 7- Logic Simplification

Digital Electronic Systems Unit 7

Ex. 4 Derive the Boolean expression for the following logic circuit.

Given a Boolean function, derive the truth table

Ex. 5: Derive the truth table for the following function.

Method 1

Once the Boolean expression for a given circuit is determined, a truth table can be developed. The truth table shows the expected output for each possible combination of inputs.

INPUT INPUT INPUT INPUT OUTPUTA B C D F

0 0 0 0 1 1 1 1 0 0 10 0 0 1 1 1 1 1 0 0 10 0 1 0 1 1 0 1 0 0 10 0 1 1 1 1 0 1 0 0 10 1 0 0 1 0 1 1 1 0 10 1 0 1 1 0 1 1 1 0 10 1 1 0 1 0 0 1 1 0 10 1 1 1 1 0 0 1 1 0 11 0 0 0 0 1 1 1 0 0 11 0 0 1 0 1 1 1 0 1 11 0 1 0 0 1 0 1 0 1 11 0 1 1 0 1 0 1 0 1 11 1 0 0 0 0 1 1 0 0 11 1 0 1 0 0 1 1 0 0 11 1 1 0 0 0 0 0 0 0 01 1 1 1 0 0 0 0 0 0 0

2

Page 3: Unit 7- Logic Simplification

Digital Electronic Systems Unit 7

Method 2

This is a less cumbersome method. Simplify the Boolean Function to sum of products form and group as many terms as possible. (This will give the minimised Boolean expression.) Then develop the truth table, from the resulting function.

This is the minimised Boolean function in sum of products form. Now develop the truth table for this function

INPUT INPUT INPUT INPUT OUTPUTA B C D

0 0 0 0 1 1 1 10 0 0 1 1 1 1 10 0 1 0 1 1 0 10 0 1 1 1 1 0 10 1 0 0 1 0 1 10 1 0 1 1 0 1 10 1 1 0 1 0 0 10 1 1 1 1 0 0 11 0 0 0 0 1 1 11 0 0 1 0 1 1 11 0 1 0 0 1 0 11 0 1 1 0 1 0 11 1 0 0 0 0 1 11 1 0 1 0 0 1 11 1 1 0 0 0 0 01 1 1 1 0 0 0 0

Ex. 6: Derive the truth table for the following function.

Ex. 7: Derive the truth table for the following function. F AB A B

Ex. 8: Derive the truth table for the following function.F AB A B

Ex. 9: Derive the truth table for the following function.

3

Page 4: Unit 7- Logic Simplification

Digital Electronic Systems Unit 7

Given a Boolean expression, derive the logic circuit

In interpreting the Boolean expression, the same three basic rules apply as when deriving the Boolean expression from the logic circuit.

1 Brackets have the highest precedence in Boolean expressions, so the contents of brackets must be implemented first.

2 A NOT operator in the Boolean function is indicated by a bar over part of the function. In the presence of a NOT operator, implement the part of the function underneath the bar first, and then invert it.

3 AND operations are performed before OR operations.

It is also good practice to write the value of the function at all intermediate points along the way on the logic circuit in order to minimise errors.

Ex. 10 Derive the logic circuit for the following Boolean function

To derive the logic circuit for this expression, you must first have . To get this term you must first have the terms and . Before you can have the term you must have . In summary, logic operations must be done in the correct order.

It is usually best to reduce a circuit to its Sum of Products (SOP) form. In this case

To derive the logic circuit for this expression, you must first have and . (Remember AND before OR.) However, to get , you must first have . The correct order of evaluation for the reduced function is shown in the diagram.

4

Page 5: Unit 7- Logic Simplification

Digital Electronic Systems Unit 7

Draw the logic circuits to implement the following Boolean expressions.

Ex. 11 Ex. 12 Ex. 13 Ex. 14 Ex. 15 Ex. 16 Ex. 17 Ex. 18 Ex. 19

Ex. 20

Ex. 21

Ex. 22

Ex. 23

5

Page 6: Unit 7- Logic Simplification

Digital Electronic Systems Unit 7

Simplification of Logic Circuits using Boolean Algebra

Using the Rules and Laws of Boolean Algebra, it is possible to simplify a Boolean expression for a logic circuit. A simplified Boolean expression uses the fewest gates possible to implement a given expression. This is best described by taking an example.

Ex 24 Simplify the following Boolean expression

Draw the logic circuit for the original expression and for the simplified expression and compare the number of gates.

As can be seen from the diagram given below, the number of gates used to implement the network has been reduced from 5 in the original form to 2 in the minimised form. It should be noted that while the output functions are different, the actual outputs produced are identical for all possible input logic combinations.

6

Page 7: Unit 7- Logic Simplification

Digital Electronic Systems Unit 7

Simplify the following Boolean expressions for logic circuits as much as possible. Draw the logic circuit for the original expression and for the simplified expression and compare the number of gates.

Ex. 25

Ex. 26

Ex. 27

Ex. 28

Ex. 29

7

Page 8: Unit 7- Logic Simplification

Digital Electronic Systems Unit 7

Standard forms of Boolean Expressions

The form of Boolean expression indicates the type of logic gate to be used to implement the function. The two most common forms are the sum of products form and the product of sums form. Both types are made up of AND, OR and NOT gates.

The Sum-of-Products (SOP) FormExample

The Product-of-Sums (POS) FormExample

8

Page 9: Unit 7- Logic Simplification

Digital Electronic Systems Unit 7

A SOP may contain a single variable term (for example ). A POS may also contain a single variable.

A single bar representing an inverter can NOT extend over more than one variable in both the SOP and POS formats.

The domain of a general Boolean expression is defined as the set of variables contained in the SOP/POS expression. For example, the domain of the function

is the set of variables A,B,C,D.

Any logic expression can be converted to SOP or POS form by applying Boolean algebra techniques.

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

A non-standard SOP is converted into a standard form using Boolean algebra rule 6 - . Multiply each nonstandard product by a term made up of the sum of a missing

variable and its complement. Repeat until all product terms contain all variables in the domain.

Ex 30 Convert into standard SOP form.

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

A non-standard POS is converted into a standard form using Boolean algebra rule 8 - . Add to each nonstandard product a term made up of the product of a missing

variable and its complement. Apply rule 12 - . Repeat until all sum terms contain all variables in the domain

9

Page 10: Unit 7- Logic Simplification

Digital Electronic Systems Unit 7

Ex 31 Convert into standard POS form

Introduction to Minterms

Minterms are the various outputs produced when the various combinations of input variables (or their complements) are ANDed together. The concept is more clearly explained by the following example.

InputA

InputB

InputC

Minterms F

0 0 0 m0= 0

0 0 1 m1= 1

0 1 0 m2= 1

0 1 1 m3= 0

1 0 0 m4= 0

1 0 1 m5= 0

1 1 0 m6= 0

1 1 1 m7= 1

For a logic function with three inputs, there are eight minterms (m0-m7). The function F is given by

Thus a function can be expressed as a sum of minterms, that is the minterms are ORed together.

10