Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

24
Digital Logic Circuits – Chapter 1 Section 1-3, 1-2

Transcript of Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Page 1: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Digital Logic Circuits – Chapter 1

Section 1-3, 1-2

Page 2: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Boolean Algebra

• What is “Algebra”?– A branch of mathematics in which symbols

represent numbers or members of a specified set and are used to represent quantities and to express general relationships that hold for all members of the set.

Page 3: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Boolean Algebra

• What is “Boolean”?– Of or relating to a data type or variable in a

programming language that can have one of two values, true or false.

Page 4: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Boolean Algebra

• Therefore– Boolean algebra is an algebra that deals

with binary variables and logic operations

• But why is it called “Boolean”?– Invented by English mathematician George

Boole in the 1850’s (published in 1854)

Page 5: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Boolean Algebra

• Boolean algebra consists of…– A set of symbols that represent variables

• Use letters just like “regular algebra”• A, B, C, a, b, c…

– Variables are binary (2-valued)• 0, 1• true, false

– Three basic operators• AND, OR, NOT

– Other symbols• ( ) =

Page 6: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Boolean Operators

• AND– Notation: A · B, AB, (AB), A(B)– Yields a value of 1 when both A and B are

1– Yields a value of 0 when either A or B is 0

Page 7: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Boolean Operators

• OR– Notation: A + B– Yields a value of 1 when either A or B is 1– Yields a value of 0 when both A and B are

0

Page 8: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Boolean Operators

• NOT– Notation: A, A’– Yields a value of 1 A is 0– Yields a value of 0 when A is 1

Page 9: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Boolean Expressions

• As in “regular” algebra, variables, operators, and symbols can be combined to form expressions or functions

F(x, a, b) = x + (a · b)

– F is a boolean function of three variables– Often written as:

F = x + (a · b)

Page 10: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Boolean Functions

• Solution is found by plugging in values for the variables and applying the operators

F = x + (a · b)

– Given x=0, a=1, b=0 we haveF(0, 1, 0) = 0 + (1 · 0)F(0, 1, 0) = 0 + (1 · 1)F(0, 1, 0) = 0 + (1 · 1)F(0, 1, 0) = 0 + 1F(0, 1, 0) = 1

Page 11: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Operator Precedence

• NOT operators are done first• Parenthesized expressions second• AND operators are done third (left to right)• OR operators are done fourth (left to right)• Thus

AB + CD is the same as (AB) + (CD),

not A(B + C)D

Page 12: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Boolean Functions

• Typically, we want to exhaustively evaluate a given Boolean function– That is, we want to know its functional

value for every possible combination of inputs

– This leads us to Truth Tables

Page 13: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Truth Tables

• List all possible combinations of input values in the left hand columns

• List expression result in the right hand column

A B AB

0 0 0

0 1 0

1 0 0

1 1 1

A B A+B

0 0 0

0 1 1

1 0 1

1 1 1

A A

0 1

1 0

Page 14: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Truth Tables

• For more complex expressions you will [typically] create columns for each operation:

• F(x, a, b) = x + (a · b)

x a b b (a·b) x+(a·b)

0 0 0 1 0 0

0 0 1 0 0 0

0 1 0 1 1 1

0 1 1 0 0 0

1 0 0 1 0 1

1 0 1 0 0 1

1 1 0 1 1 1

1 1 1 0 0 1

Page 15: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Truth Tables

• Doesn’t matter what order the input variables are, just a long as all combinations are included.

x a b b (a·b) x+(a·b)

0 0 0 1 0 0

1 0 0 1 0 1

0 0 1 0 0 0

1 0 1 0 0 1

0 1 0 1 1 1

1 1 0 1 1 1

0 1 1 0 0 0

1 1 1 0 0 1

Page 16: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Truth Tables

• Are they the same?

x a b b (a·b) x+(a·b)

0 0 0 1 0 0

1 0 0 1 0 1

0 0 1 0 0 0

1 0 1 0 0 1

0 1 0 1 1 1

1 1 0 1 1 1

0 1 1 0 0 0

1 1 1 0 0 1

x a b b (a·b) x+(a·b)

0 0 0 1 0 0

0 0 1 0 0 0

0 1 0 1 1 1

0 1 1 0 0 0

1 0 0 1 0 1

1 0 1 0 0 1

1 1 0 1 1 1

1 1 1 0 0 1

Page 17: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Proof via Truth Table

• Proof that our earlier conjecture

(AB) + (CD) ≠ A(B + C)D

is true via truth table

Page 18: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Other Methods

• Truth tables can always be used to evaluate Boolean expressions

• But, they’re not always convenient– They can get big and unmanageable quite

fast

• Fortunately, as in any good algebra, Boole gave us a set of axioms (laws, identities) that can be used to simplify boolean expressions symbolically

Page 19: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Axioms

1. x + 0 = x

2. x + 1 = 1

3. x + x = x

4. x + x’ = 1

5. x + y = y + x

6. x + (y + z) = (x + y) + z

7. x(y + z) = xy + xz

8. (x + y)’ = x’y’

9. (x’)’ = x

10. x · 1 = x

11. x · 0 = 0

12. x · x = x

13. x · x’ = 0

14. xy = yx

15. x(yz) = (xy)z

16. x + yz = (x + y)(x + z)

17. (xy)’ = x’ + y’

Page 20: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Axioms

• 1, 10 – identity laws• 2, 11 – one, zero laws• 3, 12 – idempotence laws• 4, 13 – inverse laws• 5, 14 – commutative laws• 6, 15 – associative laws• 7, 16 – distributive laws• 8, 17 – De’ Mogan’s laws• 9 – double negation law (?? – I made that

name up)

Page 21: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Why?

• What’s all this stuff used for?– “The purpose of Boolean algebra is to

facilitate the analysis and design of digital circuits.”

• Express a truth table relationship in algebraic (symbolic) notation

• Express a logic diagram’s input/output relationships in algebraic notation

• Provides a means for finding simpler circuits to implement a given function

Page 22: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Logic Circuits

• These are the things computers (and other digital devices) are made of

• Circuit designers use Boolean algebra to design circuits drawn on schematic drawings

• Fabrication facilities use schematic drawings to produce silicon chips

AND

OR

NOT

Schematic Symbols

Page 23: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Logic Circuits

• F(x, a, b) = x + (a · b)

ANDOR

NOTba

x

ANDOR

ba

x

ba

x

Page 24: Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.

Homework

• Prove all 17 axioms using truth tables

• Due next lecture