pat troy university of illinois at chicago september 2019 · •write the boolean expression in sop...

32
CS 362: Computer Design Lecture 5: Boolean Algebra Pat Troy University of Illinois at Chicago September 2019

Upload: others

Post on 11-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

CS 362: Computer DesignLecture 5: Boolean Algebra

Pat TroyUniversity of Illinois at Chicago

September 2019

Page 2: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Boolean Algebra

• Allows us to mathematically reason about circuit behavior

• Allows us to use algebraic rules to simplify digital circuit designs

• Today ‐ Use Boolean algebra to simplify expressions (and circuits)

Page 3: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating
Page 4: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Does (A+B)C = A+(BC)?

A. Yes

B. No

Page 5: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

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

A. True

B. False

Page 6: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

F = XYZ + XYZ’ + X’Z

A. F = XY + X’Z

B. F = X(YZ + YZ’ + Z)

C. F = XY(Z + Z’) + X’Z

D. This cannot be simplified further

Page 7: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

F = XYZ + XYZ’ + X’Z

Page 8: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Sum of Products

• A standard form for representing booleanfunctions

• Function that consists of a set of AND terms which are ORed together

• Note we use the term “products” for AND terms and “sums” for OR terms because of similarities with regular algebra

Page 9: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

How many of these are in Sum of Products form?

1. y = a2. y = a + b3. y = ab + b’c4. y = a(b+c)

A. 0  B. 1 C. 2 D. 3 E. 4

Sum of Products: Function that consists of a set of AND terms which are ORed together

Page 10: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Creating a Circuit from Sum of Products

• Create set of AND gates, then OR them all together

y= efg + e’f

Page 11: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Convert y = (a’+c)(a+b)

to Sum of ProductsA. a’a + cb

B. ca + cb

C. a’b + ca + cb

D. a’a + a’b + ca + cb

E. None of the above

Page 12: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Comparing Boolean Equations

• We can have different equations express the same boolean algebra function– Ex: y = a(b+bc’), y = abc + abc’

• Need a standard, canonical form to be able to check if equations are the same

Page 13: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Sum of Minterms

• Sum of products equation

• Each product term contains every function variable, in either true or complemented form

• y = abc + a’bc + a’bc’

Page 14: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

a + b = a(b+b’) + b(a + a’)

A. True

B. False

Page 15: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Convert y = a’b + bc to Sum of Minterms

A. y = a’bc + abc

B. y = a’bc + a’bc’ + abc

C. y = ab’c + abc’ + abc

D. y = abc + abc’ + abc + a’bc

E. None of the above

Page 16: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

To Compare Two Boolean Equations

• Convert both of them to sum of mintermsform

• Check if they’re the same

Page 17: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Are these two functions the same?

• y = ab + bc + ac • y = ab + a’bc + ac

A. Yes B.  No

Page 18: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Minterms & Truth Tables

• We can think of each row of a truth table as corresponding to a min term

A B X

0 0 0

0 1 0

1 0 0

1 1 1

Page 19: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Sum of Products from Truth Table• Take rows that satisfy function

– If any of these rows is true, the function is true– For a row to be true, need all of the inputs to be correct

X Y F

0 0 0

0 1 1

1 0 1

1 1 0

Page 20: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Sum of Products• Developed from Truth Table form

– Each product term contains each input exactly once, complemented or not.

– Need to OR together set of AND terms to satisfy table

– One product for each 1 in F columnX Y F

0 0 0

0 1 1

1 0 1

1 1 0

Page 21: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Sum of Minterms

A B C   F 0   0 0 10 0 1 10 1 0 10 1 1 11 0 0 01 0 1 01 1 0 11 1 1 0

A. A’ +B’C

B. (AB’C’) + (AB’C) + (A’B’C’)

C. (A’B’C’) + (A’B’C) + (A’BC’) + (A’BC) + (ABC’)

D. (ABC) + (ABC’) + (AB’C) + (AB’C’) + (A’B’C)

Page 22: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Programmable Logic Array

• Set of inputs and inverted inputs

• Array of AND gates– Form set of product terms

• Array of OR gates– Logical sum of product terms

Page 23: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Uses

• Either programmed during manufacture, or can be reprogrammed (FPLAs)

• Used in CPUs, microprocessors

• Can represent a single function, or a set of functions with the same inputs

Page 24: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Size

• Only truth table entries that have a true output are represented

• Each different product term will have only one entry in the PLA, even if the product term is used in multiple outputs

Page 25: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Creating a PLA

• Prepare the truth table• Write the Boolean expression in SOP (sum of products) form.

• Decide the input connection of the AND matrix for generating the required product term.

• Then decide the input connections of OR matrix to generate the sum terms.

• Program the PLA.

Page 26: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Sum of Products

A (A’B’C’)+(A’B’C)+(A’BC’)+(A’BC)+(AB’C’)+(AB’C)+(ABC’)+(ABC)

B (A’B’C)+(A’BC’)+(A’BC)+(AB’C’)+(AB’C)+(ABC’)+(ABC)

C (A+B+C’)(A+B’+C)(A+B’+C’)(A’+B+C)(A’+B+C’)(A’+B’+C)(A’+B’+C’)

D (A’B’C’)+(A’B’C)+(A’BC’)+(A’BC)+(AB’C’)+(AB’C)+(ABC’)+(ABC)

E. None of the above

Page 27: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating
Page 28: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Programming PLAs

Page 29: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Product of Sums• In Sum of Products, check if any of the true rows are true

• In Product of Sums, make sure all of the false rows are false

X Y F

0 0 0

0 1 1

1 0 1

1 1 0

Page 30: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Product of Sums• Need to AND together set of OR terms• Select rows where F = 0, take the complement

X Y F

0 0 0

0 1 1

1 0 1

1 1 0

Page 31: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Product of Sums

A B C   F  0   0 0 10 0 1 10 1 0 10 1 1 11 0 0 01 0 1 01 1 0 11 1 1 0

A. F = (A +B’+C’)(A+B’+C)(A+B+C)

B. F = (A’+B+C)(A’+B+C’)(A’+B’+C’)

C. F = (A+B+C)(A+B+C’)(A+B’+C)(A+B’+C’)(A+B+C’) 

Page 32: Pat Troy University of Illinois at Chicago September 2019 · •Write the Boolean expression in SOP (sum of products) form. •Decide the input connection of the AND matrix for generating

Reminders

• Next lecture:  K‐maps– Section 3.1 – 3.6

• Homework 1 assigned