Gates - Part 2 September 14, 2006 Typeset by Foil T EX Converting - - PowerPoint PPT Presentation

gates part 2
SMART_READER_LITE
LIVE PREVIEW

Gates - Part 2 September 14, 2006 Typeset by Foil T EX Converting - - PowerPoint PPT Presentation

Gates - Part 2 September 14, 2006 Typeset by Foil T EX Converting English to Boolean Expressions Typeset by Foil T EX 1 The air conditioner should be turned on if and only if: the temperature is greater than 75, the


slide-1
SLIDE 1

Gates - Part 2

September 14, 2006

– Typeset by FoilT EX –

slide-2
SLIDE 2

Converting English to Boolean Expressions

– Typeset by FoilT EX – 1

slide-3
SLIDE 3

The air conditioner should be turned on if and only if: − the temperature is greater than 75°, − the time is between 8a.m. and 5 p.m., − and it is not a holiday.

– Typeset by FoilT EX – 2

slide-4
SLIDE 4

Identify Phrases

The air conditioner should be turned on if and only if: − the temperature is greater than 75°, − the time is between 8a.m. and 5 p.m., − and it is not a holiday.

F = air conditioner should be turned on A = temperature is greater than 75◦ B = time is between 8a.m. and 5p.m. C = it is a holiday

– Typeset by FoilT EX – 3

slide-5
SLIDE 5

Identify Connective Words The air conditioner should be turned on if and only if: − the temperature is greater than 75°, − the time is between 8a.m. and 5 p.m., − and it is not a holiday. implied and

=

– Typeset by FoilT EX – 4

slide-6
SLIDE 6

Construct a Boolean Expression

The air conditioner should be turned on if and only if: − the temperature is greater than 75°, − the time is between 8a.m. and 5 p.m., − and it is not a holiday.

F = air conditioner should be turned on A = temperature is greater than 75◦ B = time is between 8a.m. and 5p.m. C = it is a holiday F = A • B • C’

– Typeset by FoilT EX – 5

slide-7
SLIDE 7

Draw the Network

The air conditioner should be turned on if and only if: − the temperature is greater than 75°, − the time is between 8a.m. and 5 p.m., − and it is not a holiday.

F = A • B • C’

F A B C

– Typeset by FoilT EX – 6

slide-8
SLIDE 8

Review

Converting English to Boolean

  • 1. Identify phrases
  • 2. Identify connective words
  • 3. Construct a Boolean Expression
  • 4. Draw the network

– Typeset by FoilT EX – 7

slide-9
SLIDE 9

Converting English to Boolean

Be careful: Boolean algebra is precise, English is not. The roads will be very slippery if A it snows

  • r

B rains and there is C

  • il on the road.

F = A + BC

  • r

F = (A + B)C Which is it?

– Typeset by FoilT EX – 8

slide-10
SLIDE 10

AND/OR vs. OR/AND Logic forms

– Typeset by FoilT EX – 9

slide-11
SLIDE 11

AND/OR Logic from Truth Table

Write the SOP by inspection from f:

A B C f

A B C f 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

– Typeset by FoilT EX – 10

slide-12
SLIDE 12

AND/OR Logic from Truth Table

Write the SOP by inspection from f:

A B C f

A B C f 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

f = A’B’C +AB’C + ABC’ + ABC

– Typeset by FoilT EX – 11

slide-13
SLIDE 13

AND/OR Logic from Truth Table

Simplify the equation

f = A’B’C +AB’C + ABC’ + ABC f = (A + A’) B’C + AB ( C + C’) f = AB + B’C

– Typeset by FoilT EX – 12

slide-14
SLIDE 14

AND/OR Logic from Truth Table

Draw the logic network f = AB + B’C

A B C f

– Typeset by FoilT EX – 13

slide-15
SLIDE 15

OR/AND Logic from Truth Table

Write the POS by inspection from f:

A B C f

A B C f 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

f ′ = A’B’C’ +A’BC’ + AB’C’ f = (A+B+C)(A+B’+C)(A’+B+C)

– Typeset by FoilT EX – 14

slide-16
SLIDE 16

OR/AND Logic from Truth Table

Simplify the equation: f = (B+C)(A+C) Draw the logic network:

f A B C

– Typeset by FoilT EX – 15

slide-17
SLIDE 17

Types of gates

Gates already studied:

AND OR Inverters Exclusive−OR Equivalence

– Typeset by FoilT EX – 16

slide-18
SLIDE 18

NAND/NAND and NOR/NOR Logic

– Typeset by FoilT EX – 17

slide-19
SLIDE 19

AND/OR to NAND/NAND

Algebra-based: AB + CD = (AB + CD)′′ = ((AB)′(CD)′)′ Schematic-based:

This is the preferred symbol in this context.

– Typeset by FoilT EX – 18

slide-20
SLIDE 20

OR/AND to NOR/NOR

Algebra-based: (A + B)(C + D) = ((A + B)(C + D))′′ = ((A + B)′ + (C + D)′)′ Schematic-based:

This is the preferred symbol in this context.

– Typeset by FoilT EX – 19

slide-21
SLIDE 21

Alternative Gate Symbols

Which are easier to understand?

A B C D Q=? Q=? D C B A

– Typeset by FoilT EX – 20

slide-22
SLIDE 22

Alternative Gate Symbols

Which are easier to understand?

A B C D Q=? A B C D Q=AB + CD Q=? D C B A D C B A Q=(A+B)(C+D)

If you think of the bubbles as canceling each other out...

– Typeset by FoilT EX – 21

slide-23
SLIDE 23

Bubble Matching

How to make schematics readable, understandable, maintainable, ...

– Typeset by FoilT EX – 22

slide-24
SLIDE 24

Bubble Matching Rules

  • Choose alternative symbols
  • Match all interior bubbles
  • More than one solution
  • Makes reading of the function trivial

F=AB + (C+D)=AB+C+D A B C D F F=((AB)’(C+D)’)’ ??? A B C D F

– Typeset by FoilT EX – 23

slide-25
SLIDE 25

More Bubble Matching

This doesn’t work. There are unmatched bubbles This works. F = AB + C’D’ A B C D F A B C D F A B F D C

– Typeset by FoilT EX – 24

slide-26
SLIDE 26

Yet More Bubble Matching

Same circuit as on previous slide ... A B C D F A B C D F

Alternative solution = convert the top-left gate. F’=(A’+B’)(C+D) F = AB+C’D’ Same result as on previous slide.

– Typeset by FoilT EX – 25

slide-27
SLIDE 27

Can Bubbles Always Be Matched?

No...

A B C D E F x y This is called reconvergent fanout.

Nodes x and y both drive the final gate and so both need the same polarity (bubble or no bubble). It is not possible to satisfy that requirement because x also drives y’s input.

– Typeset by FoilT EX – 26

slide-28
SLIDE 28

Can Bubbles Always Be Matched?

  • Convert symbols to match bubbles

– Two versions for each circuit ∗ Inverted output ∗ Non-inverted output

  • Good schematic style similar to good programming style

– Convey meaning as well as function – Document the design

– Typeset by FoilT EX – 27

slide-29
SLIDE 29

Functional Completeness

– Typeset by FoilT EX – 28

slide-30
SLIDE 30

Functionally Complete

  • AND, OR, and inverter are functionally complete

– There is no truth table which cannot be implemented using AND, OR, and NOT. – Any set of gates which can implement AND, OR and NOT is also functionally complete. – Can you think of any other possible sets ???

– Typeset by FoilT EX – 29

slide-31
SLIDE 31

Functionally Complete

  • Is the set (AND, NOT) functionally complete?
  • If I could just build an OR gate ...

Success!

  • r...

X + Y = (X’Y’)’

– Typeset by FoilT EX – 30

slide-32
SLIDE 32

Functionally Complete

  • Is the set (OR, NOT) functionally complete?
  • If I could just build an AND gate ...

Success!

  • r...

XY = (X’+ Y’)’

– Typeset by FoilT EX – 31

slide-33
SLIDE 33

Functionally Complete

  • Is the set {AND, OR} functionally complete?
  • No, you cannot make a NOT from just AND and OR.

– Typeset by FoilT EX – 32

slide-34
SLIDE 34

How about NAND Only?

NOT AND OR Success

NOR alone is also functionally complete.

– Typeset by FoilT EX – 33

slide-35
SLIDE 35

Dueling Duals!

– Typeset by FoilT EX – 34

slide-36
SLIDE 36

What is a Dual

Duality: Given a logic expression, its dual is obtained by replacing all +

  • perations with • operations and vice versa, and by replacing all

0s with 1s and vice versa. The dual of any true statement is also a true statement. For example: X + (X • Y) = X ⇐ ⇒ X • (X + Y) = X

– Typeset by FoilT EX – 35

slide-37
SLIDE 37

What good are duals?

  • 1. You can more easily remember some of the boolean algebra rules.

X + 0 = X X + 1 = 1 X + X = X (X’)’ = X X + X’ = 1 X • 1 = X X • 0 = 0 X • X = X X • X’ = 0

  • 2. Making a Dual is the same as applying DeMorgan’s Theorem. So,

if you have an equation that is true, its dual will also be true: (X • Y)’ = X’+ Y’ ⇐ ⇒ (X + Y)’ = X’•Y’

– Typeset by FoilT EX – 36

slide-38
SLIDE 38

Dual Caveats

You cannot:

  • Make a dual of part of an equation
  • or just half.

It does not say that the dual of half of the equation will still equal the rest. It just says that the dual of the whole thing will still be true.

– Typeset by FoilT EX – 37