logic circuits n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Logic Circuits PowerPoint Presentation
Download Presentation
Logic Circuits

Loading in 2 Seconds...

play fullscreen
1 / 42

Logic Circuits - PowerPoint PPT Presentation


  • 190 Views
  • Uploaded on

Gates implement mathematical logic operations applied to binary variables – A, B, X, Y, Z. Logic Circuits. Digital Systems are made out of integrated circuits, transistors and interconnections. Certain well defined – small circuits are called Logic Gates.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Logic Circuits' - laurel


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
logic circuits

Gates implement mathematical logic operations

applied to binary variables – A, B, X, Y, Z

Logic Circuits

Digital Systems are made out of integrated circuits,

transistors and interconnections

Certain well defined – small circuits are called

Logic Gates

Mathematical logic – ideal, that is: gates do not

suffer from the physical propagation delays that

are inherent in transistors.

An example:

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

example inverter

X X

Vdd

(5V)

Pull up

o

Vin

Vout

If X = 0 (1) then

X (NOT X) is 1 (0)

Pull down

Vss (0V)

Example: inverter

circuit

Inverter gate

Operation: NOT (or complement)

Response is

instantaneous

Not instantaneous

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

other gates

Or : Z = X Y

X Y Z

Gates may have more

than 2 inputs!

0 0 0

0 1 0

1 0 0

1 1 1

X

Y

Z

W = XYZ

Other gates

Truth table

AND

Operation:

Z is 1 if and only if x is 1 and y is 1

Note the ordering of the

X-Y bits!

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

other gates cont d

X

Z = X + Y

Y

OR gate

Or : Z = X Y

X Y Z

X

0

0

1

1

0 0 0

0 1 1

1 0 1

1 1 1

0

1

0

1

Y

X•Y

0

0

0

1

X+Y

0

1

1

1

X

1

1

0

0

Other gates (cont’d)

Truth table

OR

Operation:

Z is 0 if and only if x is 0 and y is 0

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

other gates cont d1

X X

buffer

Other gates (cont’d)

An inverter is often a

buffer whose output is

the complement of its

input.

Operation: identity

A physical buffer is not an

identity. It is a signal restoring

devise.

The circle is, in fact, the

symbol for complementing

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

other gates1

This circuit has a special name

and a special symbol (gate)

X

Y

Z = X Y

XOR GATE

Operation : exclusive OR

Z is 1 if either X is 1 or Y is 1

Combinational Circuits

X

Y

X Y Z

0 0 0

0 1 1

1 0 1

1 1 0

Z

The physical XOR gate need

not be realized this way

(see page 80!)

Z = XY + XY

Other gates ?

Yes and no.

The gates we have introduced so far form a complete set

to build logic circuits without memory, so-called Combinational

Logic Circuits.

Here is an example:

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

other gates2

Watch the little circles (complementing)

What you see is but a symbol:

A physical NAND is not an AND + Inverter

In fact, NANDs and NORs are simpler than

ANDs and ORs!

It is the set {NOT, NAND, NOR, exclusive NOR}

NAND

=

F

(XY)

AND

We will see alternative

expressions for the

outputs of the

alternative gates,

And also

conversions between

the two sets.

OR

NOR

=

+

F

(X

Y

)

XOR

Inverter

=

F

X

=

+

=

Å

F

X

Y

X

Y

X

Y

XNOR

Buffer

=

+

=

Å

F

XY

X

Y

(X

Y

)

Other gates ?

Yes, but they form an alternative set to {NOT, AND, OR, XOR}

It is the set {NOT, NAND, NOR, exclisive NOR}

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

boolean functions and combinational circuits

How do I know? There must be

rules!

Z

Conversely, given a Boolean

function, how do I derive the

implementation? There must be

rules!

= X.Y + X.Y = X  Y !

Z= ((X.Y).X).((X.Y).Y)

Boolean Functions and Combinational Circuits

This is a four-NAND-gate Combinational Circuit

Combinational circuits do not have any memory.

They implement Boolean functions:

A binary variable (the function), an equal sign,

and an algebraic expression formed by using

binary variables, the constants 0 and 1, the

logic operation symbols, and parenthesis.

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

truth tables and boolean algebra

Hence:

X + Y = X.Y

Known as DeMorgan’s theorem

F = X + Y

G = X. Y

X Y F

0 0 1

0 1 0

1 0 0

1 1 0

X Y G

0 0 1

0 1 0

1 0 0

1 1 0

Truth tables and Boolean Algebra

A Boolean function can be represented by a truth table

As we did for the basic gates (which do implement

Elementary functions!)

A Boolean function can also be manipulated based on

Fundamental identities of Boolean Algebra.

Examples:

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

basic identities of boolean algebra

The two columns are duals of each other:

Dual: replace 0 (1) by 1 (0) and OR (AND)

by AND (OR).

Identity

X+0=X

X•1=X

Consensus theorem (and dual)

XY + XZ + YZ = XY + XZ

(X+Y)(X+Z)(Y+Z) = (X+Y)(X+Z)

Absorption

X+1=1

X•0=0

Idempotency

X+X=X

X•X=X

X+X'=1

X•X'=0

Complements

Also true

in ordinary

algebra

(X')'=X

Involution

Not true in

ordinary

algebra

X+Y= Y+X X

Commutative

• X

•Y = Y

X+(Y+Z) = (X+Y)+Z X

Associative

•Z) = (X

•Y)

• (Y

•Z

Distributive

X(Y+Z)=XY+XZ

X+YZ=(X+Y)•(X+Z)

De Morgan

(X+Y)'=X'•Y'

(X•Y)'=X'+Y'

Basic Identities of Boolean Algebra

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

slide11

XY.Y = V

XY.X = U

UV = U + V = XY.X + XY.Y = (X+Y)X + (X+Y).Y

(DeMorgan)

(DeMorgan)

= YX + XY

(XX = YY =0)

= X.Y + X.Y = X  Y !

Z= ((X.Y).X).((X.Y).Y)

Back to my claim

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

slide12

NAND

Y

Y

F

F

NOR

X

X

Y

F

X

F

X

Y

Once more DeMorgan.

(X+Y)'=X'•Y'

(X•Y)'=X'+Y'

Recall:

Hence:

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

f xy x y z

I call this

the circle

game

F = XY’+X’Y+Z

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

terminology
A term in a Boolean expression is a literal or a group of literals joined by the same operator.Terminology
  • A literal is any variable in an expression, complemented or not . A variable that appears twice counts for two literals.

X'YZ + X'YZ' + XZ

8 literals

3 terms

(A+B)(A+C'+D)

5 literals

2 terms

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

levels of an expression
X'YZ + X'YZ' + XZ

two levels: first level AND's, second level OR's

(A+B)(A+C'+D)

two levels: first level OR's, second level AND's.

A + B(C+D)

three levels: first level OR, second level AND, third level OR

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

Three levels: first level OR, second level AND, third level OR

Levels of an expression

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

complements of functions

F = XY + XZ

This function consists of 2 terms XY and XZ, 3 variables

X, Y, and Z, and 4 literals, X, X, Y, and Z. It is a 2-level

function.

F = XY + XZ = XY. XZ =(X + Y).(X+Z)

F = (X+Y).(X+Z)

Complements of functions

Two ways to derive its complement:

1. Use Boolean identities:

2. Take dual of F and complement each literal:

(generalization of DeMorgan)

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

standard forms

F = ABC + BCD + ABC + ABCD

These are SOPs

G = BD + BC + ACD

Standard Forms

F = G! How do I know

We try to express functions in standard form:

Either Sum of Products (SOP), and even better

Sum of Minterms

Or Products of Sums (POS), and even better

Products of Maxterms

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

minterms for three variables

For 3 variables X, Y, and Z there are minterms:

m0 = XYZ m1 = XYZ m2 = XYZ m3 = XYZ

m4 = XYZ m5 = XYZ m6 = XYZ m7 = XYZ

product terms of

exactly 3 literals

m5

m5

X

Y

Z

m0

m1

m2

m3

m4

m6

m7

X

Y

Z

m0

m1

m2

m3

m4

m6

m7

0

0

0

0

0

1

0

0

0

0

0

0

0

0

0

1

0

0

0

0

0

0

0

0

0

0

1

0

1

0

0

0

0

0

0

0

1

0

1

0

0

0

0

0

0

0

0

1

0

0

0

1

0

0

0

0

0

1

0

0

0

1

0

0

0

0

0

0

0

0

1

1

1

1

0

0

0

0

0

0

1

1

0

0

0

0

0

0

0

0

1

0

0

0

0

0

0

1

0

0

1

0

0

0

0

0

0

1

0

0

If X=1, Y=0, and Z =1 then the function m5 = XYZ is one

and only this one.

1

1

1

0

1

0

0

0

0

0

0

0

1

0

1

0

0

0

0

0

0

0

0

0

1

1

0

0

0

0

0

0

1

0

1

1

0

0

0

0

0

0

1

0

0

0

1

1

1

0

0

0

0

0

0

1

1

1

1

0

0

0

0

0

0

1

Minterms for Three Variables

truth table

0

1

2

3

4

5

6

7

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

maxterms for three variables

For 3 variables X, Y, and Z, there are Maxterms:

sum terms of

exactly 3 literals

Mi = mi

M0 = X+Y+Z M1 = X+Y+Z M2 = X+Y+Z M3 = X+Y+Z

M4 = X+Y+Z M5 = X+Y+Z M6 = X+Y+Z M7 = X+Y+Z

X

Y

Z

M0

M1

M2

M3

M4

M5

M6

M7

0

0

0

0

1

1

1

1

1

1

1

0

0

1

1

0

1

1

1

1

1

1

0

1

0

1

1

0

1

1

1

1

1

0

1

1

1

1

1

0

1

1

1

1

1

0

0

1

1

1

1

0

1

1

1

1

0

1

1

1

1

1

1

0

1

1

If X =1 and Y=0, and Z = 0 then M4 is 0

and only this one

1

1

0

1

1

1

1

1

1

0

1

1

1

1

1

1

1

1

1

1

1

0

Maxterms for Three Variables

truth table

0

1

2

3

4

5

6

7

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

from truth table to sum of minterms
From Truth Table to Sum of Minterms

F(X,Y,Z)

m0 = X'Y'Z'

m2 = X'YZ'

F = X'Y'Z'+X'YZ'+XY'Z+XYZ

F = X'Y'Z'+X'YZ'+XY'Z+XYZ

F = X'Y'Z'+X'YZ'+XY'Z+XYZ

F = X'Y'Z'+X'YZ'+XY'Z+XYZ

m5 = XY'Z

m7 = XYZ

More compact notation:

F = m0 + m2 + m5 + m7 = ∑m(0,2,5,7)

More compact notation:

F = m0 + m2 + m5 + m7 = ∑m(0,2,5,7)

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

from truth table toproduct of maxterms
From Truth Table toProduct of Maxterms

M1 = X+Y+Z'

M3 = X+Y'+Z'

M4 = X'+Y+Z

Individual terms only

zero for those

combinations

for which F = 0

M6 = X'+Y'+Z

F = (X+Y+Z')

F = (X+Y+Z')(X+Y'+Z')

F = (X+Y+Z')(X+Y'+Z')(X'+Y+Z)

F = (X+Y+Z')(X+Y'+Z')(X'+Y+Z)(X'+Y'+Z)

More compact:

F = M1•M3•M4•M6

More compact:

F = M1•M3•M4•M6 = ∏M(1, 3, 4, 6)

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

from e x y z to standard
From E = X' + Y'Z' to Standard

E = ∑m(0, 1, 2, 3, 4)

= ∏M(5, 6, 7)

E' = ∏M(0, 1, 2, 3, 4)

= ∑m(5, 6, 7)

Look closer: relation mj - Mj and more …

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

what next

But clearly:

F = X + Y

How can I use

K-map to find out?

Y

0 1

Y

0 1

X

X

m0 m1

m2 m3

XY XY

XY XY

1

1

0

1

0

1

1

What next?

Expressions may still be not minimal! If not, circuit is too

large.

Simplifying expressions is not easy. Some computer programs

can go a long way.

One way to it is by means of a Karnaugh Map (K-map). It

it is a graphical method that does not work for functions

with more than 4 (perhaps 5 or 6) variables.

An example:

Suppose F(X,Y) is 1 for

(X,Y)=(0,1), (1,0), (1,1)

Thus F = m1+m2+m3

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

two variable map

Y

Y

Y

0

1

0

1

0

1

X

X

X

0

F(0,0)

F(0,1)

0

0

1

1

F(1,0)

F(1,1)

1

1

1

1

1

Map of F(X,Y)

F(X,Y) = X•Y

F(X, Y) = X+Y

Y

Y

Y

0

1

0

1

0

1

X

X

X

0

X'Y'

X'Y

0

1

1

0

1

1

1

XY'

XY

1

1

1

F(X, Y) = X' + Y

Maps of minterms

F(X,Y) = X'

F(X, Y) = X' +Y

F(X, Y) = X' + Y

Two variable map

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

three variable map

Three variable map

Minterms in three variable map

Three variable map

1

1

Map of function m5+m7 = XY'Z+XYZ = XZ(Y+Y') = XZ•1 = XZ

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

simplifying a function
Simplifying a Function

F(X, Y, Z) = ∑m(2,3,4,5)

1

1

1

1

m2+m3=X'YZ'+X'YZ = X'Y(Z+Z') = X'Y

m4+m5=XY'Z'+XY'Z=XY'(Z+Z') = XY'

F = X'Y+XY'

F = X'Y+XY'

2 adjacent 1’s=sum of 2 three-literal minterms=2-literal term

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

simplifying rules

ZY

X'

Z'

Z

Simplifying rules

X'Z'

Group of two

adjacent 1’s gives

product of two

literals

XZ'

XZ

Group of four

Adjacent 1’s gives

Single literal

Group of 8

Adjacent 1’s gives

1

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

simplifying rules1
A rectangle of 2 squares represents a product term of three literals

2x1 or 1x2 cells

A rectangle of 4 squares represents a product of two literals

2x2, 1x4, or 4x1 cells

A rectangle of 8 squares represents one literal

2x4 or 4x2 cells

Simplifying rules

Four variable map. Variables

are W, X, Y, Z

Four variable map with

formulas for minterms

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

simplifying 4 variable function
F(W,X,Y,Z) = ∑m(0, 1, 2, 4, 5, 6, 8, 9, 12, 13, 14)Simplifying 4-variable function

W'Z'

1

1

1

1

1

1

1

1

1

1

1

XZ'

Y'

F = Y'+W'Z'+XZ'

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

more simplifying rules
More simplifying rules

To be introduced: implicants, prime implicants,

essential prime implicants

  • THEN:
  • Given: Map.
  • Goal: Best SOP expression for this function
  • 1. Findall prime implicants, identifyessential and nonessentialprime implicants.
  • 2. Includeall essentialprime implicants in function
  • 3. Includeenough nonessentialprime implicants to cover function. Minimize overlap among prime implicants.

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

implication
Definition: F1 implies F2 if F2 = 1 whenever F1 = 1.

Example: F1 = XY, F2 = X+Y

F1 = 1 only when both X and Y are equal to 1.

When both X and Y are equal to 1, F2 = 1 + 1 = 1

Therefore, F1 implies F2

Does F2 imply F1?

Consider X = 1, Y = 0.

F1 = 1 + 0 = 1

F2 = 1•0 = 0

Therefore, F2 does not imply F1

Implication

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

essential prime implicants
Almintermsof a function F imply F, orare implicants of that function.

F(X,Y,Z) = ∑m(0,2,4,5,6)

1

1

1

1

1

1

2 prime implicants. They

are both needed. And they

are special:

2

Essential Prime Implicants

When simplifying using maps, we first select all possible maximum-size

rectangles filled with 1’s. They are called prime implicants. Not all prime

implicants may be needed.

They include a 1 not included in any other PI.

Such PIs are called essential prime implicants.

Essential PIs are needed anyway.

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

slide33

Good expression: F = A'D + BD'

(essential)

Essential Prime Implicants (cont’d)

Prime Implicants: A'D and A'B and BD'

Why?

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

selection rules again
Given: Map.

Goal: Best SOP expression for this function

1. Findall prime implicants,identifyessential and nonessential prime implicants.

2. Includeall essential prime implicants in function

3. Includeenough nonessential prime implicants to cover function. Minimize overlap among prime implicants.

Selection rules (again)

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

example

All prime implicants: A'B'C'D', ABC', ABD, AB'C, BC'D, ACD

Essential prime implicants: A'B'C'D', ABC', AB'C, BC'D

Nonessential prime implicants: ABD, ACD

Example

F = A'B'C'D'+ABC'+AB'C+BC'D+(either ABD or ACD)

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

other example
F(A,B,C,D) = ∑m(0,1,2,4,5,10,11,13,15)

C

00

01

11

10

1

1

1

00

1

1

01

B

1. A'C'

Non overlapping PIs

1

1

11

A

2. BC'D

1

1

10

3. ABD

D

4. ACD

P1 is the only essential

For the cover, we choose1, 3, 5, 7

F = A'C' + ABD + AB'C + A'B'D'

5. AB'C

6. B'CD'

7. A'B'D'

Other Example

B’ÇD’ would also do

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

product of sum simplification
Sometimes the product of sums expression for a function is

simpler than the sum of products

How do we generate a product of sums?

Cover zeros with rectangles!

Product of Sum simplification

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

pos simplification
F(A,B,C,D) = ∑m(0,1,2,5,8,9,10)

1

1

0

1

0

1

0

0

0

0

0

0

1

0

1

1

POS Simplification

F = (A'+B')(C'+D')(B'+D)

How did I get it? F' is 1, if either AB or CD or BD' is zero

Then invert (take dual and complement

literals).

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

don t care conditions
Sometimes the value of a Boolean function is not specified

for some combination of variables

A certain combination of variables never occurs

The value of the function for this combination of variables may be

unimportant

This is called a don't carecondition

Example: decimal digits are commonly represented by 4-bit binary numbers in the range of 0 to 9 (0000 to 1001). The binary patterns 1010 to 1111 don't occur in this application.

For a don't care combination of input variables the value of aBoolean function is represented by an ‘x’.

Don't-Care Conditions

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

expressions for functions with don t cares
Since the value of a don’t-care function is not specified, we may choose an expression that takes on value 0 or 1

We can use expressions that are not equal for the don’t care combinations. As long as the expression satisfies the specified values, they are acceptable

What do we do?

We choose values for the don’t-care combinations that

produce simple expressions!

Expressions for Functions with Don’t-Cares

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

example with don t care conditions
Minterm specification: F(A,B,C,D) = ∑m(1, 3, 7, 11, 15)

Don’t care combinations: d(A,B,C,D) = ∑m(0,2,5)

All other values are 0

x

x

1

1

x

x

1

1

0

0

x

x

1

1

0

0

0

0

0

0

0

0

1

1

0

0

0

0

0

0

1

1

Example with Don’t-Care Conditions

F1 = A’B’ +CD

F2 = A’D + CD

Notice: F1 is not equal to F2

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University

pos implementation

x

1

x

1

0

x

1

0

0

0

0

1

0

0

0

1

POS Implementation

Same F and same d

F3 = D(A’+C)

Fall 2004 Digital Design Fundamentals Ed F. Deprettere Leiden University