- By
**lali** - Follow User

- 335 Views
- Uploaded on

Download Presentation
## PowerPoint Slideshow about 'Digital Logic CPE231' - lali

**An Image/Link below is provided (as is) to download presentation**

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Ch4: Boolean Algebra and Logic Simplification

- Apply the basic laws and rules of Boolean algebra
- Apply DeMorgan's theorems to Boolean expressions
- Describe gate networks with Boolean expressions
- Evaluate Boolean expressions
- Simplify expressions by using the laws and rules of Boolean algebra
- Convert any Boolean expression into a sum-of-products (SOP) form
- Convert any Boolean expression into a product-of-sums (POS) form
- Use a Karnaugh map to simplify Boolean expressions
- Use a Karnaugh map to simplify truth table functions
- Utilize "don't care" conditions to simplify logic functions

Digital Logic - Spring 08

Boolean function

Laws and rules of Boolean algebra- Boolean algebra is the mathematics of digital systems.
- Boolean function: described by Boolean equation.
- Boolean equation: express logical relationship between binary variables

Digital Logic - Spring 08

Basic laws of Boolean algebra

- Commutative law: the order of variables makes no difference
- X + Y = Y + X
- XY = YX
- Associative law: the result is the same regardless of the grouping of the variables.
- X + (Y + Z) = (X + Y) + Z
- X(YZ) = (XY)Z
- Distributive law: express the process of factoring in which a common variable is factored out the product term.
- XY + XZ = X( Y + Z)
- X + YZ = (X + Y)(X + Z)

Digital Logic - Spring 08

Rules of Boolean algebra

Digital Logic - Spring 08

Continue..

- X + XY = X

= X(1 + Y) …distributive law

= X . 1 … Rule 2

= X … Rule 4

- X + X’Y = X +Y

= (X + XY) + X’Y … Rule 10

= XX + XY + X’y … Rule 7

= XX + XY + XX’ + X’Y …Rule 8

= (X + X’) (X + Y)…Factoring

= 1 . (X+Y) … Rule 6

= X + Y … Rule 4

- (X + Y)(X + Z) = X + YZ

Do it …

Digital Logic - Spring 08

Demorgan’s Theorem

- State the equivalency of NAND & negative-OR:
- State the equivalency of NOR & negative-AND:
- Prove using truth table.

Digital Logic - Spring 08

Examples

- Apply DeMorgans Theorem:
- (AB’+A’B)’
- (XYZ)’
- (X’+Y’+Z’)’
- ((A+B+C)D)’
- ((ABC)’+D+E)’
- (A’B(C+D’)+E)’

Digital Logic - Spring 08

Boolean Analysis of Logic Circuits

- Each logic function can be expressed with three methods:
- Boolean expression
- Logic circuit
- Truth table
- Having a function expressed with one method, you can derive the remaining.

Digital Logic - Spring 08

Example

- The logic circuit shown below implement two logic functions: F1 and F2.
- Analyze the circuit by deriving the Boolean expressions of F1 and F2.
- Once the Boolean expression for a given logic circuit has been determined, a truth table that shows the output for all values of the input variables can be developed. Derive the truth table of the logic functions F1, F2.

Digital Logic - Spring 08

Simplification using Boolean algebra.

- The goal is to reduce a given expression to its simplest form, or to a more convenient one for implementation.
- Use laws, rules and theorems of Boolean algebra to manipulate and simplify an expression

Digital Logic - Spring 08

Examples

- A+AB+AB’C = A
- AB’ + A(B+C)’ + B(B+C)’ = AB’
- ABC’+A’B’C+A’BC+A’B’C’ = ABC’+A’C+A’B’
- (AB)’+(AC)’+A’B’C’ = A’ + B’+ C’
- AB’C(BD+CDE)+AC = A(C’ + B’DE)

Digital Logic - Spring 08

Standard forms for Boolean algebra

- Standardization makes the evaluation, simplification and implementation of Boolean expressions much more systematic and easier.
- All Boolean expressions, regardless of their form, can be converted into either of two forms: sum-of-product, product-of-sum.

Digital Logic - Spring 08

Sum-of-Products (SOP) form

- A product term consists of the product of literals (variables or their complements).
- When two or more products are summed the results is an SOP.
- E.g. AB + ABC , A’B + A’BC’+ AC
- SOP expression can contain a single variable term.
- In SOP a single overbar cannot extend over more than one variable ( )

Digital Logic - Spring 08

Continue…

- Implementation:
- AND/OR
- NAND/NAND
- Conversion from general expressions:
- Apply Boolean algebra techniques.
- E.g. AB + B(CD+EF), ((A+B)’+C)’
- The domain of a Boolean expression is the set of variables contained in the expression either complemented or not.
- SOP may not include the domain of variable in all products. (A’BC + ABD’ + AB’CD)
- A standard SOP expression is a one in which all the variables in the domain appear in each product term. (A’BC + AB’C + ABC’ + A’B’C’)
- A non standard SOP can be converted to the standard one by using the Boolean algebra rule (x + x’ =1).
- Convert wx’y + x’yz’ + wxy’ to the standard sop form.

Digital Logic - Spring 08

The Product-of-Sum (POS) from

- A sum term consists of the sum of literals.
- When two or more sum terms are multiplied the results is an POS.
- E.g. (A+B)(A+B+C), (A’+B)(A’+B+C’)(A+C)
- POS expression can contain a single variable term.
- In POS a single overbar cannot extend over more than one variable ( )

Digital Logic - Spring 08

Continue…

- Implementation:
- OR/AND
- NOR/NOR
- POS may not include the domain of variable in all terms. (A’+B+C)(A+B+D’)(B’+C+D)
- A standard SOP expression is a one in which all the variables in the domain appear in each product term. (A’+B+C)(A+B+C’)(A+B+C’)(A’+B’+C’)
- A non standard POS expression can be converted to the standard form by using the Boolean algebra rule 8 (xx’=0) and rule12((X+Y)(X+Z)= X+YZ).
- Convert (a+b’)(b+c) to the standard POS form.

Digital Logic - Spring 08

Boolean expressions and Truth Table

- A SOP expression is equal to 1 if at least one of the product terms is equal to 1.
- A POS expression is equal to 0 if at least one of the sum terms is equal to 0.
- E.g. determine the truth table for the expressions:
- F1= A’BC’ + AB’C
- F2= (A+B’+C)(A+B+C’)(A’+B’+C’)
- Determine the standard expression from the truth table:
- SOP
- List the binary values of the inputs for which the output is 1.
- Convert the binary values to the corresponding product term.(1 corresponding variable, 0corresponding variable complement)
- POS
- List the binary values of the inputs for which the output is 0.
- Convert the binary values to the corresponding sum term.(0 corresponding variable, 1corresponding variable complement)

Digital Logic - Spring 08

Definition: Minterm

- Product term in which all variables appear once (complemented or not).
- For the variables X, Y and Z example minterms: X’Y’Z’, X’Y’Z, X’YZ’, …., XYZ
- Each minterm represents exactly one combination of the binary variables in a truth table.
- For n variables, there will be 2n minterms.
- Minterms are labeled from minterm 0, to minterm 2n-1

m0 , m1 , m2 , … , m2n-2 , m2n-1

- For n = 3, we have

m0 , m1 , m2 , m3 , m4 , m5 , m6 , m7

Digital Logic - Spring 08

Definition: Maxterm

- Sum term in which all variables appear once (complemented or not)
- For the variables X, Y and Z the maxterms are: X+Y+Z , X+Y+Z’ …. , X’+Y’+Z’
- Minterms and maxterms with the same subscripts are complements:
- Example:

Digital Logic - Spring 08

Standard Form of F:Sum of Minterms

- The same as standard SOP
- OR all of the minterms of truth table for which the function value is 1
- F = m0 + m2 + m5 + m7

Digital Logic - Spring 08

Complement of F

- Not surprisingly, just sum of the other minterms
- In this case

F’ = m1 + m3 + m4 + m6

Digital Logic - Spring 08

Product of Maxterms

- The same as standard POS
- F = m0 + m2 + m5 + m7
- Can express F as AND of all Maxterms of rows that should evaluate to 0

or

Digital Logic - Spring 08

The Karnaugh Map

- A systematic method for simplifying Boolean expressions.
- If properly used, will produce the simplest SOP or POS expression.
- Graphical representation of truth table.
- A box for each minterm
- So 2 variables, 4 boxes
- 3 variable, 8 boxes
- And so on

Digital Logic - Spring 08

Function from K-Map

- Can generate function from K-map

Simplifies to X + Y (in a moment)

Digital Logic - Spring 08

Cell Adjacency

- Cells are arranged so that there is only a single variable change between adjacent cells.
- Each cell is adjacent to the cells that are immediately next to it on any of its four sides.
- A cell is not adjacent to the cells that are diagonally touch any of its corners.
- Adjacency is cylindrical.
- Note that Z’ wraps from left edge to right edge.

Digital Logic - Spring 08

Also Wraps (toroidal topology)

Digital Logic - Spring 08

K-Map SOP minimization

- A minimized SOP expression contains the fewest possible terms with the fewest possible variables per term. And can be implemented with fewer logic gates than a standard expression.
- Mapping
- From truth table
- From standard SOP (Sum of Minterms)
- From a nonstandard SOP
- simplification

Digital Logic - Spring 08

Mapping Examples

- Map the following standard SOP expressions:
- A’B’C + A’BC’ + ABC’ + ABC
- A’BC + AB’C +AB’C’
- A’B’CD + A’BC’D’+ ABC’D + A’B’C’D + AB’CD’
- A’BCD’ + ABCD’ + ABC’D’ + ABCD
- Map the following nonstandard SOP expressions:
- X’ + XY’ + XYZ’
- YZ + X’Z’
- X’Y’ + WX’ + WXY’ + WX’YZ’ + W’X’Y’Z + WX’YZ
- W + Y’Z + WYZ’ + W’XYZ’

Digital Logic - Spring 08

Simplification of SOP expressions

- The minimum SOP expression is obtained by grouping the 1’s and determining the minimum expression from the map.
- Rules of grouping:
- A group must contain a power of 2 cells, i.e. either 1,2,4,8, or 16.
- Each cell must be adjacent to one or more cells in the group, but all cells not need to be adjacent.
- Include the largest possible number of 1’s in a group.
- Each 1 on the map must be included in at least one group.

Digital Logic - Spring 08

Continue..

- Determining the minimum product term of each group:
- For a 3-variable map
- One cell -> 3 literals
- Rectangle of 2 cell s -> 2 literals
- Rectangle of 4 cell s -> 1 literal
- Rectangle of 8 cell s -> Logic 1
- For a 4-variable map
- One cell -> 4 literals
- Rectangle of 2 cell s -> 3 literals
- Rectangle of 4 cell s -> 2 literal
- Rectangle of 8 cell s -> 1 literal
- Rectangle of 16 cell s -> Logic 1

Digital Logic - Spring 08

K-map POS minimization

- A 0 is placed in k-map for each sum term.
- E.g. for A+ B’ + C, a 0 is placed in cell 010.
- Cell with no zeros are for which the expression is 1.
- Mapping procedure:
- Determine the binary value for each sum term in standard SOP.
- In the k-map place zeros in the corresponding cells.

Digital Logic - Spring 08

Simplification of POS expressions

- Group 0s instead of 1s.
- Follow the same rules as grouping 1s.
- Conversion between POS and SOP for the sake of implementation with fewer gates.
- Use the k-map to optimize a SOP expression: (W+X’+Y+Z’)(W’+X+Y’+Z’)(W’+X’+Y’+Z)(W’+X’+Z’)

Digital Logic - Spring 08

Examples:

- Map the following expressions on a k-map:
- A’BC + AB’C + AB’C’
- A’BCD’+ABCD’+ABC’D’+ABCD
- BC+A’C’
- A+ C’D+ACD’+A’BCD’
- (A+B’+C’+D)(A+B+C+D’)(A+B+C+D)(A’+B+C’+D)
- Use the k-map to minimize the following expressions:
- XY’Z+XYZ’+X’YZ+X’YZ’+XY’Z’+XYZ
- W’X’Y’Z’+WX’YZ+WX’Y’Z+W’YZ+WX’Y’Z’
- (X+Y’+Z)(X+Y’+Z’)(X’+Y’+Z)(X’+Y+Z)

Digital Logic - Spring 08

Don’t care conditions

- Some input combinations are not allowed never occurred treated as don’t care.
- For each don’t care term, X is placed in the cell.
- The Xs can be treated as 1s in case of grouping.

Digital Logic - Spring 08

Examples

- Optimize the expression with don’t care conditions:
- F(a,b,c)=∑m(1,2,4), d(a,b,c)= ∑m(0,3,6,7)
- F(a,b,c,d)=∑m(0,1,7,13,15), d(a,b,c,d)= ∑m(2,6,8,9,10)
- F(a,b,c,d)=∑m(2,4,9,12,15), d(a,b,c,d)= ∑m(3,5,6,13)
- F(w,x,y,z)=∏M(3,11,13,15), d(w,x,y,z)= ∑m(0,2,5,8,10,14)

Digital Logic - Spring 08

Download Presentation

Connecting to Server..