dkt 122/3 digital system 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/lecturer...

48
Company LOGO DKT 122/3 DIGITAL SYSTEM 1 BOOLEAN ALGEBRA (PART 2)

Upload: dinhhanh

Post on 21-Mar-2018

223 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Company

LOGO DKT 122/3

DIGITAL SYSTEM 1

BOOLEAN ALGEBRA (PART 2)

Page 2: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Boolean Algebra

Contents

Boolean Operations & Expression

Laws & Rules of Boolean algebra

DeMorgan’s Theorems

Boolean analysis of logic circuits

Simplification using Boolean Algebra

Standard forms of Boolean Expressions

Boolean Expressions & truth tables

Page 3: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

The Karnaugh Map

Karnaugh Map SOP minimization

Karnaugh Map POS minimization

Programmable Logic

Boolean Algebra (Cont.)

Page 4: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Solve this..

B

A

X

(a) Write the equivalent Boolean expression of circuit shown above.

(b) Simplify the Boolean expression found in (a).

C

Page 5: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Solve this..

� Simplify the following Boolean expressions:

� (AB(C + BD) + AB)C

� ABC + ABC + ABC + ABC + ABC

� Write the Boolean expression of the following circuit.circuit.

RULE:Break the longest

bar first!

RULE:Break the longest

bar first!

Page 6: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

� Sum-of-products (SOP)

Refer to two or more product terms, summed (added) by Boolean addition

Standard Forms of Boolean Expressions

summed (added) by Boolean addition

� Product-of-sums (POS)

Refer to multiplication of two or more sum terms

Page 7: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Sum-of-products (SOP)

� In an SOP expression, a single overbarcannot extend over more than one variable

Page 8: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

The standard SOP form

Refer to expression in which all the variables in the domain appear in each product term in the expression

Sum-of-products (SOP)

expression

Example:

ABCD + ABCD + ABCD (standard SOP expression)

ABC + ABD + ABCD (non-standard SOP expression)

Page 9: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

� All variables appear in each product term.� Each of the product term in the expression is

called as minterm.

Example BCACABCBACBAf ++=),,(

Sum-of-products (SOP)

The standard SOP form

Example BCACABCBACBAf ++=),,(

In compact form, f(A,B,C) may be written as

632),,( mmmCBAf ++=

)6,3,2(),,( mCBAf Σ=

Page 10: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Product-of-sums (POS)

� In a POS expression, a single overbarcannot extend over more than one variable

Page 11: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Refer to expression in which all the variables in the domain appear in each sum term in the expression

Example:

Standard Forms of Boolean Expressions

The standard POS form

Example:

(A + B + C)(B + C + D)(A + B + C + D) (non-standard POS expression)

(A + B + C + D)(A + B + C + D) (standard POS expression)

Page 12: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

• All variables appear in each product term.• Each of the product term in the expression is called as maxterm.

Example: )()()(),,( CBACBACBACBAf ++•++•++=

Standard Forms of Boolean Expressions

The standard POS form

Example: )()()(),,( CBACBACBACBAf ++•++•++=

In compact form, f(A,B,C) may be written as

541),,( MMMCBAf =

)5,4,1(),,( MCBAf π=

Page 13: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Identify each of the following expressions as SOP, standard SOP, POS or standard POS:

(i) AB + ABD + ACD(ii) (A + B + C)(A + B + C)(iii) ABC + ABC

Solve this..

(iii) ABC + ABC(iv) A(A + C)(A + B)

Convert the following Boolean expressions to SOP form:

(i) (A + B)(B + C + D)(ii) AB + B(CD + EF)

Page 14: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Convert the following Boolean expressions into standard

SOP form:

AB + ABCD

Solution

Example (Standard SOP)

Solution

1st step: AB = AB (C + C) = ABC + ABC

2nd step: ABC (D + D) + ABC (D + D)

= ABCD + ABCD + ABCD + ABCD

3rd step: ABCD + ABCD + ABCD + ABCD + ABCD

Page 15: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Convert the following Boolean expressions into standard

POS form:

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

Solution

Example (Standard POS)

Solution

1st step: A + B + C = A + B + C + DD

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

2nd step: B + C + D = B + C + D + AA

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

Final answer: Combine answer for 1st and 2nd step

Page 16: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Boolean Expressions & Truth Tables

Converting SOP to Truth Table

� Examine each of the products to determine where the product is equal to a 1.

� Set the remaining row outputs to 0.

Page 17: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Converting POS to Truth Table

�Opposite process from the SOP expressions.

� Each sum term results in a 0.

� Set the remaining row outputs to 1.

Boolean Expressions & Truth Tables

Page 18: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Determining Standard Expressions from Truth Table

INPUT OUTPUT

A B C X

0 0 0 0

SOP Expressions

X = ABC + ABC + ABC +

Boolean Expressions & Truth Tables

0 0 0 0

0 0 1 0

0 1 0 0

0 1 1 1

1 0 0 1

1 0 1 0

1 1 0 1

1 1 1 1

X = ABC + ABC + ABC + ABC

POS Expressions

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

Page 19: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Solve this..

� Convert the following SOP expression to an equivalent POS expression:

CBACBACABABCCBAf +++=),,(

� Develop a truth table for the expression:

)()()()(),,( CBACBACBACBACBAf ++•++•++•++=

CBACBACABABCCBAf +++=),,(

Page 20: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

The Karnaugh Map (K-Map)

� Karnaugh Map (K-map) is an array of cells in which each cell represents a binary value of the input variables

� K-Mapping is used to minimize the number of logic gates that are required in a digital circuit. This will replace Boolean reduction when the This will replace Boolean reduction when the circuit is large.

� The number of cells in a K-map is equal to the total number of possible input variable combinations

� K-Map is similar to Truth Table because it present all possible values of input variables and the resulting output for each value

Page 21: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

� The map is made up of a table of every possible SOP using the number of variables that are being used.

If 2 variables are used, then a 2X2 map is used,

The K-map

is used,

If 3 variables are used, then a 4X2 map is used,

If 4 variables are used, then a 4X4 map is used,

If 5 variables are used, then a 8X4 map is used

Page 22: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

� Mapping Standard SOP Expression

For an SOP in standard form, a 1 is placed on the K-map for each product term in the expression

K-map SOP Minimization

Gray Code

Example of standard SOP form

Page 23: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

� Mapping Non-standard SOP ExpressionExpand the non-standard expression

A + AB + ABC

K-map SOP Minimization

A + AB + ABC

QuestionHow to expand this expression?

QuestionHow to expand this expression?

Page 24: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

● Mapping directly from a truth table to a K-map

K-map SOP Minimization

Thomas L. Floyd

Digital Fundamentals, 9e

Copyright ©2006 by Pearson Education, Inc.Upper Saddle River, New Jersey 07458

All rights reserved.

Page 25: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Notice that the map is going false to true, left to right and top to bottomA

B B

0 10 1

2 variables K-map

K-map SOP Minimization

The upper right hand cell is A B if X= A B then put an X in that cell

This show the expression true when A = 0 and B = 0

A

A

B B

1

A 2 32 3

Page 26: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

If X=AB + AB then put an X in both of these cells

A

A

B B

1

1

2 variables K-map

K-map SOP Minimization

these cells

From Boolean reduction we know that A B + A B = B

From the Karnaugh map we can circle adjacent cell and find that X = B

A

A

B B

1

1

A 1

Page 27: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Gray Code 0 1

C C

K-map SOP Minimization

3 variables K-map

00 A B

01 A B

11 A B

10 A B

0 10 1

2 32 3

6 76 7

4 54 5

Page 28: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

0 1

K-map SOP Minimization

X = A B C + A B C + A B C + A B C

3 variables K-map

00 A B

01 A B

11 A B

10 A B

0 1

C C

Each 3 variable term is one cell on a 4 X 2

Karnaugh map

Each 3 variable term is one cell on a 4 X 2

Karnaugh map

1 1

1 1

Page 29: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

0 1

One

X = A B C + A B C + A B C + A B C

K-map SOP Minimization

3 variables K-map

00 A B

01 A B

11 A B

10 A B

0 1

C COne simplification could be

X = A B + A B

1 1

1 1

Page 30: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

X = A B C + A B C + A B C + A B C

0 1Another

X = A B C + A B C + A B C + A B C

K-map SOP Minimization

3 variables K-map

00 A B

01 A B

11 A B

10 A B

C CAnother simplification could be

X = B C + B C

A Karnaugh Map does wrap around

1 1

1 1

Page 31: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

X = A B C + A B C + A B C + A B C

0 1

X = A B C + A B C + A B C + A B C

K-map SOP Minimization

3 variables K-map

00 A B

01 A B

11 A B

10 A B

0 1

C CThe bestsimplification would be

X = B

1 1

1 1

Page 32: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Conclusions

� One cell requires 3 variables

K-map SOP Minimization

3 variables K-map

� One cell requires 3 variables

� Two adjacent cells require 2 variables

� Four adjacent cells require 1 variable

� Eight adjacent cells is a 1

Page 33: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Gray Code 0 0 0 1 1 1 1 0

C D C D C D C D

K-map SOP Minimization

4 variables K-map

00 A B

01 A B

11 A B

10 A B

C D C D C D C D

0 1 3 20 1 3 2

4 5 7 64 5 7 6

12 13 15 1412 13 15 14

8 9 11 108 9 11 10

Page 34: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Gray Code 0 0 0 1 1 1 1 0

C D C D C D C D

Simplify:

X = A B C D + A B C D + A B C D + A B C D + A B C D + A B C D

K-map SOP Minimization

00 A B

01 A B

11 A B

10 A B

C D C D C D C D

1

1

1

1

1

1

X = ABD + ABC + CD

Now, try it with Boolean reductions..

Page 35: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

K-map SOP Minimization

Conclusions

� One Cell requires 4 variables

4 variables K-map

� One Cell requires 4 variables

� Two adjacent cells require 3 variables

� Four adjacent cells require 2 variables

� Eight adjacent cells require 1 variable

� Sixteen adjacent cells give a 1 or true

Page 36: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Simplify

Z = B C D + B C D + C D + B C D + A B C

Gray Code 00 01 11 10

C D C D C D C D

K-map SOP Minimization

00 A B

01 A B

11 A B

10 A B

C D C D C D C D

1 1

1 1

1 1

1 1

1

1

Z = BD + C

Page 37: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Example

Simplify the following circuit using K-map method.

Page 38: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Y = A + B + B C + ( A + B ) ( C + D)

Example (Cont.)

Y = A B + B C + A + B + ( C + D )

Y = A B + B C + (A + B ) + C D

Simplified SOP expression

Page 39: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Gray Code 00 01 11 10

C D C D C D C DY = 1

Then, map the SOP expression into the K-map & simplify the equation

Example (Cont.)

00 A B

01 A B

11 A B

10 A B

C D C D C D C D

1 1

1 1

1 1 1 1

1 1 1 1

1 1

1 1

Page 40: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

K-map POS Minimization

Assume A, B, C, and D are variables.

3 variables 4 variables

Page 41: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

K-map POS Minimization

3 variables K-map

Page 42: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

K-map POS Minimization

4 variables K-map

Page 43: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

K-map POS Minimization

4 variables K-map

Page 44: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Input Output

K-map Minimization – Don’t Cares

3 variables with output “don’t cares” (X)

Page 45: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

K-map Minimization – Don’t Cares

4 variables with output “don’t cares” (X)

Page 46: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Determine the minimal SOP using K-Map:

14,15)D(5,12,13, 9,10)M(0,2,6,8, D)C,B,F(A, π=

Example

D refers to “don’t cares”

What is this?

Page 47: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

AB

CD

00

00 01 11 10

0 1 1 00 1 3 2

Example (Cont.)

14,15)D(5,12,13, 9,10)M(0,2,6,8, D)C,B,F(A, π=

00

01

11

10

1 X 1 0

X X X X

0 0 1 0

0 1 3 2

4 5 7 6

12 13 15 14

8 9 11 10

DACBCDDCBAF ++=),,,(

Minimum SOP expression is:

CD

ADBC

Page 48: DKT 122/3 DIGITAL SYSTEM 1 - portal.unimap.edu.myportal.unimap.edu.my/portal/page/portal30/Lecturer Notes...Solve this.. B A X (a) Write the equivalent Boolean expression of circuit

Solve this..

Reduce (a), (b) and (c) using K-map:

(a) (b)

∑ ∑+= 13) 12, (6, d 9) 7, 5, 3, (1, m D) C, B, f(A, (c)