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

Post on 11-Jul-2020

0 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

CS 362: Computer DesignLecture 5: Boolean Algebra

Pat TroyUniversity of Illinois at Chicago

September 2019

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)

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

A. Yes

B. No

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

A. True

B. False

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

F = XYZ + XYZ’ + X’Z

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

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

Creating a Circuit from Sum of Products

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

y= efg + e’f

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

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

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’

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

A. True

B. False

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

To Compare Two Boolean Equations

• Convert both of them to sum of mintermsform

• Check if they’re the same

Are these two functions the same?

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

A. Yes B.  No

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

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

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

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)

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

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

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

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.

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

Programming PLAs

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

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

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’) 

Reminders

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

• Homework 1 assigned

top related