Thursday, 19 November 2015 Questions about project and/or labs? - - PowerPoint PPT Presentation

thursday 19 november 2015
SMART_READER_LITE
LIVE PREVIEW

Thursday, 19 November 2015 Questions about project and/or labs? - - PowerPoint PPT Presentation

Thursday, 19 November 2015 Questions about project and/or labs? Last time: Full adders; Karnaugh maps Today: Karnaugh maps again-- in-class exercise DeMorgans Law Karnaugh Maps Used to design circuits for up to four inputs. Alternate


slide-1
SLIDE 1

Thursday, 19 November 2015

Questions about project and/or labs? Last time: Full adders; Karnaugh maps Today: Karnaugh maps again-- in-class exercise DeMorgan’s Law

slide-2
SLIDE 2

Karnaugh Maps

Used to design circuits for up to four inputs. Alternate representation of a truth table:

a b c

  • utput

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

1 1 1 1 1

0,0 0,1 1,1 1,0 0 1 a, b: c:

slide-3
SLIDE 3

Karnaugh Maps

1 1 1 1 1

0,0 0,1 1,1 1,0 0 1 a, b: c: This block of 1’s represents the expression b -- these are all the places in the grid where b = 1. 0,0 0,1 1,1 1,0 0 1 a, b: c:

1 1 1 1 1

This block represents ac -- these are all the places in the grid where a = 1 and c = 0.

This is the boolean function b + ac

slide-4
SLIDE 4

Karnaugh Maps

Cover all the ones with a set of (possibly

  • verlapping) rectangles. Each rectangle must

have dimensions that are a power of 2 (e.g., 2x1, 2x2, 4x2, 1x4, etc.). Each rectangle represents one term of the function represented.

slide-5
SLIDE 5

Karnaugh Maps

1 1 1 1 1 1 1 1 1

0,0 0,1 1,1 1,0 0,0 0,1 1,1 1,0

a,b: c,d:

cd ac bc ad

ac + ad + bc + cd

Note that the box for bc “wraps around” from top to bottom.

slide-6
SLIDE 6

Karnaugh Maps

1 1 1 1 1 1 1 1

0,0 0,1 1,1 1,0 0,0 0,1 1,1 1,0

a,b: c,d:

ad bd The four corners wrap around to form a 2- by-2 rectangle

ad + bd

slide-7
SLIDE 7

In-class Exercise: Find formulas for three different Karnaugh maps. (Solutions will be handed out next week.)

Karnaugh Maps

slide-8
SLIDE 8

Boolean Algebra

So far we have been concerned merely with finding valid expressions for boolean functions. Most of these have been of the following form: (“and-expr”) + (“and-expr”) + … + (“and-expr”) where “and-expr” just indicates an “and” of several variables or their negations. Example: abc + bd + acd

slide-9
SLIDE 9

Boolean Algebra

Using logic gates, an “or” of “ands” resembles:

0 or more “not” gates Any number of “and” gates A final “or” gate Inputs:

slide-10
SLIDE 10

Boolean Algebra

But there are many other ways to express a circuit besides an “or” of “ands”. Some of these may require fewer gates (less circuitry). For example, the expression ab + bc (an “or” of “ands”) can be built with two “not” gates, two “and” gates, and an “or” gate. But the equivalent expression b(a+c) requires one fewer “and” gate.

slide-11
SLIDE 11

Boolean Algebra

Some rules of boolean algebra are listed in Appendix B on page B-6. Some of them look like things from arithmetic, such as “factoring”: a(b+c) = ab + ac The values “0” (false) and “1” (true) behave sort

  • f like arithmetic values zero and 1:

0 + a = a 1a = a

slide-12
SLIDE 12

Boolean Algebra

However, some of them look different:

ab + c = (a+b)(a+c) a + 1 = 1 a + a = 1 aa = 0

One very important law is “DeMorgan’s Law”:

a + b = ab ab = a + b

slide-13
SLIDE 13

Boolean Algebra

We can use Karnaugh maps and DeMorgan’s law to create circuits in an “and of ors” fashion as follows: 1 1 1 1 1

0,0 0,1 1,1 1,0 0 1 a, b: c:

1 1 1

0,0 0,1 1,1 1,0 0 1 a, b: c: (1) Negate the entries in the Karnaugh map

slide-14
SLIDE 14

Boolean Algebra

0,0 0,1 1,1 1,0 0 1 a, b: c:

1 1 1

(2) Find the expression for the negated table

ab + bc

slide-15
SLIDE 15

Boolean Algebra

(3) Negate and apply DeMorgan’s Law

ab + bc (ab) (bc) (a+b) (b+c) 1 1 1 1 1

0,0 0,1 1,1 1,0 0 1 a, b: c: