22
CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Embed Size (px)

Citation preview

Page 1: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

CEC 220 Digital Circuit DesignBoolean Algebra

Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Page 2: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Lecture Outline

Friday, January 17 CEC 220 Digital Circuit Design

• Introduction• Basic Operations: NOT, AND, OR• Representations of Boolean Expressions• Basic Boolean Theorems• Implementation of Boolean Expressions

Slide 2 of 22

Page 3: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Boolean AlgebraIntroduction

Friday, January 17 CEC 220 Digital Circuit Design

• Boolean Algebra• In 1849 George Boole published a scheme for the algebraic

description of logic processes

• In the 1930’s Claude Shannon used Boolean Algebra to describe circuits built with switches

• Boolean Algebra is an effective tool for describing logic circuits

Slide 3 of 22

Page 4: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Boolean AlgebraBoolean Logic

Friday, January 17 CEC 220 Digital Circuit Design

• Two logic levels TRUE = HIGH = 1 FALSE = LOW = 0

+5

V

0

1 0 1

T ime

Transition from logic 1 to logic 0does not take place instantaneouslyin real digital systems

+5

V

0

Logic 1

Logic 0 Intermediate values may be visiblefor an instant

Slide 4 of 22

Page 5: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Boolean AlgebraBasic Operations: NOT, AND, OR

Friday, January 17 CEC 220 Digital Circuit Design

• Logical NOT Description:

o The output is the complement/inverse/opposite of the input

Symbolic Representation (NOT gate):

Truth Table Representation:

Boolean Description: C = NOT A or C = A’ or C =

A C

A C0 11 0

A CF TT F

Slide 5 of 22

Page 6: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Boolean AlgebraBasic Operations: NOT, AND, OR

Friday, January 17 CEC 220 Digital Circuit Design

• Logical AND Description:

o The output is TRUE if and only if all the inputs are TRUE

Symbolic Representation (AND gate):

Truth Table Representation:

Boolean Description: C = A AND B or C = AB or C = A B

A B C0 0 00 1 01 0 01 1 1

A B CF F FF T FT F FT T T

Slide 6 of 22

Page 7: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Boolean AlgebraBasic Operations: NOT, AND, OR

Friday, January 17 CEC 220 Digital Circuit Design

• Logical OR Description:

o The output is TRUE if any of the inputs are TRUE

Symbolic Representation (OR gate):

Truth Table Representation:

Boolean Description: C = A OR B or C = A + B

A B C0 0 00 1 11 0 11 1 1

A B CF F FF T TT F TT T T

Slide 7 of 22

Page 8: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Boolean AlgebraLogic Gates and Boolean Expressions

Friday, January 17 CEC 220 Digital Circuit Design

• Derive an expression for the output of this logic circuit? Eventually we will omit the “” in the AND gate and “+” in

the OR gate

• The logic expression is a function of three variables (A, B, and C).

B’

AB’AB’+C

Slide 8 of 22

Page 9: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Boolean AlgebraLogic Gates and Boolean Expressions

Friday, January 17 CEC 220 Digital Circuit Design

• Derive an expression for the output of this logic circuit?

• The output is which may also be written as [A(C+D)]’+BE This expression has five variables (A, B, C, D, and E)

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

BE

+

Slide 9 of 22

Page 10: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Boolean AlgebraLogic Gates and Boolean Expressions

Friday, January 17 CEC 220 Digital Circuit Design

• Literals Each appearance of a variable or its complement in an

expression is referred to as a literal. Example:

The expression has three variables (A, B, and C) The expression has 10 literals

AB’C+A’B+A’BC’+B’C’

Slide 10 of 22

Page 11: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Boolean AlgebraTruth Tables of a Logic Circuit

Friday, January 17 CEC 220 Digital Circuit Design

• Determine the truth table for the output (F) of the logic circuit

A B0 00 11 01 1

A’1100

F=A’+B1101

Two variablesFour possible inputs (i.e. 2n)

Slide 11 of 22

Page 12: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

A+C01011111

Boolean AlgebraTruth Tables of a Logic Circuit

Friday, January 17 CEC 220 Digital Circuit Design

• Determine the truth table for the output of the logic circuit

A B C0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1

A

C

BB’

B’+C

A+C

(A+C)(B’+C)

B’+C11011101

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

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

Slide 12 of 22

Page 13: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Boolean AlgebraBasic Boolean Theorems

Friday, January 17 CEC 220 Digital Circuit Design

• Basic Theorems Principle of DUALITY:

o Given any Boolean expression its DUAL expression can be obtained by:

– Replace “ • “ by “ + “ (and vice versa), also– Replace “ 0 “ by “ 1 “ (and vice versa)

Slide 13 of 22

Page 14: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Boolean AlgebraBasic Boolean Theorems

Friday, January 17 CEC 220 Digital Circuit Design

• Basic Theorems Operations with 0 and 1

x0 = 0

x1 = x

x 0 x00 0 01 0 0

x 1 x10 1 01 1 1

x+0 = x

x+1 = 1

x 0 x+00 0 01 0 1

x 1 x+10 1 11 1 1

Expression Dual of Expression

Slide 14 of 22

Page 15: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Boolean AlgebraBasic Boolean Theorems

Friday, January 17 CEC 220 Digital Circuit Design

• Idempotent Law:

• Laws of Complementarity

• Involution Law

x + x = xx x = x

Expression Dual of Expression

= 0

Expression Dual of Expression

= 1

�́�=𝑥

Slide 15 of 22

Page 16: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Boolean AlgebraMore Boolean Theorems

Friday, January 17 CEC 220 Digital Circuit Design

• Commutative Law

• Associative Law

• Distributive Law

x y = y x

Expression Dual of Expression

x + y = y + x

(x y) z = x (y z)

Expression Dual of Expression

(x + y) + z = x + (y + z)

x (y + z) = (x y) + (x z)

Expression Dual of Expression

x + (y z) = (x + y) (x + z)

Slide 16 of 22

Page 17: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Boolean AlgebraMore Boolean Theorems

Friday, January 17 CEC 220 Digital Circuit Design

• Let’s verify the Distributive Law via a truth table

y + z01110111

x y z0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1

x (y + z) = x y + x z

x(y + z)

0

0

0

0

0

1

1

1

LHS

x y

0

0

0

0

0

0

1

1

x y z

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1

x z

0

0

0

0

0

1

0

1

RHS

x y + x z

0

0

0

0

0

1

1

1

y + z x(y + z) x y x z x y + x z

Slide 17 of 22

Page 18: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Boolean AlgebraBoolean Algebra Examples

Friday, January 17 CEC 220 Digital Circuit Design

• Examples Prove the following algebraically

𝑋 (𝑋+𝑌 )=𝑋𝑌𝑋 (𝑋+𝑌 ) Distributive Law

¿0+𝑋𝑌LHS

¿ 𝑋𝑌Complementarity Law

Operations with 0 and 1

¿ 𝑋 𝑋+𝑋𝑌

𝑋+𝑋𝑌=𝑋LHS 𝑋+𝑋𝑌

¿ 𝑋 (1+𝑌 )¿ 𝑋 1+𝑋𝑌 Operations with 0 and 1

Distributive Law¿ 𝑋 1 Operations with 0 and 1¿ 𝑋

Slide 18 of 22

Page 19: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Boolean AlgebraBoolean Algebra Examples

Friday, January 17 CEC 220 Digital Circuit Design

• Examples:

( 𝑋+𝑌 ) ( 𝑋+𝑍 )=𝑋+𝑌𝑍LHS ( 𝑋+𝑌 ) ( 𝑋+𝑍 )¿ 𝑋 (𝑋+𝑍 )+𝑌 (𝑋+𝑍 )

Last example: X+XZ = X

Distributive Law (Dual)

Idempotent Law

Distributive Law¿ 𝑋𝑋+𝑋𝑍+𝑌𝑋+𝑌𝑍¿ 𝑋+𝑋𝑍+ 𝑋𝑌+𝑌𝑍¿ 𝑋+𝑋𝑌 +𝑌𝑍¿ 𝑋+𝑌𝑍 Last example: X+XY = X

Slide 19 of 22

Page 20: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Boolean AlgebraA Circuit Example

Friday, January 17 CEC 220 Digital Circuit Design

• Determine the Output of the Following Circuit

• Design a Simpler Circuit with the Same Output

𝑨

𝑩

𝑨𝑨

𝑨𝑩

𝑨𝑨+𝑨𝑩

F=𝐴 𝐴+ 𝐴𝐵¿ 𝐴+𝐴𝐵¿ ( 𝐴+𝐴 ) ( 𝐴+𝐵   )

x + (y z) = (x + y) (x + z)

Distributive Law (Dual)

¿1 ( 𝐴+𝐵   )¿ 𝐴+𝐵

A

B

A’

B’

A’+B’

Slide 20 of 22

Page 21: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Boolean AlgebraAn Inverter

Friday, January 17 CEC 220 Digital Circuit Design

• Implementation of an inverter (Lab 1)

A simple RTL logicinverter

Interpret voltages per the TTL standard:

• 0 to 0.8 volts = Boolean 0 (Low)• 2.2 to 5.0 volts = Boolean 1 (High)

Vout = NOT VinVi

n Lo

w

Vin

Hig

hSlide 21 of 22

Page 22: CEC 220 Digital Circuit Design Boolean Algebra Friday, January 17 CEC 220 Digital Circuit Design Slide 1 of 22

Next Lecture

Friday, January 17 CEC 220 Digital Circuit Design

• DeMorgan’s Laws• Simplification Theorems

Slide 22 of 22