• No results found

Digital Logic Design

N/A
N/A
Protected

Academic year: 2021

Share "Digital Logic Design"

Copied!
25
0
0

Loading.... (view fulltext now)

Full text

(1)

Digital Logic Design

ENGG1015

1st Semester, 2010

Dr. Kenneth Wong Dr. Hayden So

Department of Electrical and Electronic Engineering

(2)

Determining output level from a diagram

(3)

3

Implementing Circuits From Boolean Expressions

•  When the operation of a circuit is defined by a Boolean expression, we can draw a logic-circuit diagram directly from that expression.

•  Example: draw the circuit for –  Done in two steps

y = AC + BC + ABC

(4)

•  Example: Draw the circuit diagram to implement the expression

•  Example: Draw the circuit diagram that implements the expression

using gates having no more than three inputs.

) )(

( A B B C

x = + +

) (A D BC

A

x = +

(5)

5

Laws of Boolean Algebra

•  Commutative Laws

A + B = B + A

A • B = B • A

•  Associative Laws

A + (B + C) = (A + B) + C

A • (B • C) = (A • B) • C

(6)

•  Distributive Law

A • (B + C) = A • B + A • C A (B + C) = A B + A C

Rules of Boolean Algebra

(7)

7 OR Truth Table

AND Truth Table

•  Rule 1

•  Rule 2

•  Rule 3

•  Rule 4

(8)

OR Truth Table

•  Rule 5

•  Rule 6

•  Rule 7

•  Rule 8

AND Truth Table

(9)

9

•  Rule 9

•  Rule 10: A + AB = A

–  Proof: A+AB = A(1+B) by distributive law = A·1 by rule 2

= A by rule 4 –  Or prove by truth table

(10)

•  Rule 11:

•  This rule can only be proved by constructing the truth table

B A

B A

A + = +

•  Rule 12: (A + B)(A + C) = A + BC

•  This rule can only be proved by constructing the truth table

(11)

11

•  Examples:

–  Simplify

–  Simplify

–  Simplify

by distributive law 0 by rule 8 and rule 7

by rule 1

( 1) by distributive law z AA AB BA BB

AB BA B AB BA B B A A B

= + + +

= + + +

= + +

= + +

= ⋅1 by rule 6 and rule 2 by rule 4

= B

D B A D B A

y = +

(

A B

)

(A B)

z = + +

BCD A

ACD x = +

( ) by distributive law 1 by rule 6

by rule 4 y AB D D

AB AB

= +

=

=

( ) by distributive law ( ) by rule 11

by distributive law x CD A AB

CD A B ACD BCD

= +

= +

= +

(12)

Review Questions

•  Simplify

•  Simplify

•  Simplify

C y = A

C AB C

A

y = +

D C B A D

C B A

y = +

ABD D

A

y = +

D B y = A

BD D

A

y = +

(13)

13

DeMorgan’s Theorems

•  Theorem 1

•  Theorem 2

The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again.

Remember:

“Break the bar,

change the operator”

–  DeMorgan's theorem is very useful in digital circuit design

–  It allows ANDs to be exchanged with ORs by using invertors –  DeMorgan's Theorem can be extended to any number of

variables. E.g, for three variables x, y and z

x y x y+ = ⋅ x y x y⋅ = +

x y z x y z x y z x y z + + = ⋅ ⋅

⋅ ⋅ = + +

(14)

) ( ) ( )

a AB C+ = AB C = A B C AC BC+ = +

) ( ) ( ) ( ) ( )

b A C+ B D+ = A C+ + B D+ = ⋅ + ⋅A C B D AC BD= +

) ( ) ( ) ( )

c A B C A B C+ ⋅ = ⋅ = ⋅A B C+ = A B C+

) ( ) ( ) ( ) ( )

( ) ( )

( ) ( )

d A BC D EF A BC D EF A BC D EF

A B C D E F AB AC DE DF

+ + = + + +

= +

= + + +

= + + +

Examples:

)

e AB CD EF = AB CD EF+ + = AB CD EF+ +

f ) Determine the output expression for the below circuit and simplify it using DeMorgan’s Theorem

(15)

15

Review Questions

•  Using DeMorgan’s Theorems to convert the

expressions to one that has only single-variable inversions.

C B

A

z = +

(

A B

)

C

z = + Q T

S R

y = +

D C B

A

y = + +

Q T

S R

y = ( + + )

) (C D B

A

y = +

(16)

Implications of DeMorgan’s Theorems

x y x y+ = ⋅

•  i.e., The AND gate with INVERTERs on each of its inputs is equivalent to a NOR gate

•  i.e., The OR gate with INVERTERs on each of its inputs is equivalent to a NAND gate

Usually redrawn in this way

x y x y⋅ = +

Usually redrawn in this way

(17)

17

Universality of NAND gates

•  Any expression can be implemented using combinations of OR gates, AND gates and INVERTERs

•  However, it is also possible to implement any logic expression using only NAND gates and no other type of gate

•  This is because NAND gates, in proper combination, can perform Boolean operations OR, AND, and INVERTER

(18)

•  Example: Suppose we want to implement x=AB+CD.

-- If we directly implement the expression, we need 2 AND gates and 1 OR gate => we need two ICs

-- If we transform the circuit into one having only NAND gates, we need only one IC

Pin diagrams for

the ICs containing NAND, AND, and OR gates

IC in Dual-in-line package (DIP)

(19)

19

Universality of NOR gate

•  In a similar manner, it can be shown that NOR gates can be arranged to implement any of the Boolean operations

(20)

Alternate Logic-Gate Representations

•  Apart from standard logic gate symbols we have seen so far, there are alternate symbols for the

commonly used gates

•  The alternate symbols are obtained by performing the following two steps:

1.  Invert each input and output of the standard symbol. This is done by adding bubbles (small circles) on input and output lines that do not have bubbles and by removing bubbles that are already there.

2.  Change the operation symbol from AND to OR, or from OR to AND.

(In the special case of the

INVERTER, the operation symbol is not changed.)

(21)

21

Several points to note

•  The equivalences can be extended to gates with any number of inputs.

•  None of the standard symbols have bubbles on their inputs, and all the alternate symbols do.

•  The standard and alternate symbols for each gate represent the same physical circuit; there is no difference in the

circuits represented by the two symbols.

•  NAND and NOR gates are inverting gates, and so both the standard and the alternate symbols for each will have a

bubble on either the input or the output, AND and OR gates are non-inverting gates, and so the alternate symbols for each will have bubbles on both inputs and output.

(22)

Why we need alternate representation?

•  Proper use of the alternate gate symbols in the circuit diagram can make the circuit operation much more easy to understand

•  E.g., the two circuits on the right are equivalent

•  However, circuit (a) does not facilitate an understanding of how the circuit function

•  Circuit (b) is easy to

understand: Z will go HIGH whenever either A=B=1 or C=D=1 (or both)

(23)

Canonical Form

•  Boolean expression can be expressed in many different ways

•  Two standard ways:

– Sum of Product – Product of Sum

•  Canonical SOP

•  Canonical POS

23

!

(A + D)(B + C) " AB + AC + BD + CD

(24)

Canonical SOP

•  Boolean expression expressed as a sum of product of basic inputs

–  Basic input may optionally negated

–  NOT canonical:

–  No parenthesis

•  Most natural for human

24

!

AB C + BD + AD

Product Sum

!

A + B(C + D)

(25)

Canonical POS

•  Boolean expression expressed as a product of sum of basic inputs

–  Basic input my optionally negated

–  NOT canonical:

–  Many parenthesis

•  Not too natural for human, but equally good for computers.

25

!

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

Product Sum

!

A + B(C + D)

References

Related documents

Biological control is the use of living organisms, such as predators, parasitoids, and pathogens, to control pest insects, weeds, or diseases.. Other items addressed

Proprietary Schools are referred to as those classified nonpublic, which sell or offer for sale mostly post- secondary instruction which leads to an occupation..

When a body is moving with a constant velocity, the velocity-time graph is a straight line AB parallel to time axis?.

○ If BP elevated, think primary aldosteronism, Cushing’s, renal artery stenosis, ○ If BP normal, think hypomagnesemia, severe hypoK, Bartter’s, NaHCO3,

Results suggest that the probability of under-educated employment is higher among low skilled recent migrants and that the over-education risk is higher among high skilled

Although long-acting reversible contraception (LARC) including intrauterine devices (IUDs) are safe, effective, and economical methods of preventing unintended pregnancy and

The federal government has a law called the Health Insurance Portability and Accountability Act of 1996 (HIPAA) which requires that “personal health information” be private.

This was to be expected as the HPPCC SFU dataset results expose the fact that this method was using only a small number of reflectances of this very large dataset (in fact 12  1