logic design a review. binary numbers binary numbers to decimal binary 2 decimal decimal 2 binary

31
Logic Design A Review

Upload: rudolph-cross

Post on 28-Dec-2015

274 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Logic Design

A Review

Page 2: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Binary numbers

Page 3: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Binary numbers to decimal

Binary 2 decimal  Decimal 2 binary

Page 4: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Boolean Algebra

❖ Two Values: zero and one

❖ Three Basic Functions: And, Or, Not❖ Any Boolean Function Can beConstructed from These Three

And 0 1 Or 0 1 Not0 0 0 0 0 1 0 11 0 1 1 1 1 1 0

Page 5: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Algebraic LawsClassification Law

Identity a1=1a=aa+0=0+a=a

Dominance a0=0a=01+a=a+1=1

Commutativity a+b=b+aab=ba

Associativity a(bc)=(ab)ca+(b+c)=(a+b)+c

Distributive a(b+c)=ab+aca+bc=(a+b)(a+c)

Demorgan’s Laws (a + b)′ = a′b′(ab)′ = a′ + b′

Page 6: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Boolean Expressions

❖ Addition represents OR❖ Multiplication represents AND

❖ Not is represented by a prime a’ or anoverbar a

❖ Examples:

❖ s = a’bc + ab’c + abc’ + a’b’c’❖ q = ab + bc + ac + abc

Page 7: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Superfluous Terms

❖ The following Two Equations RepresentThe Same Function.

q = ab + bc + ac + abc

q = ab + bc + ac

a b c q0 0 0 00 0 1 00 1 0 00 1 1 11 0 0 01 0 1 11 1 0 11 1 1 1

Page 8: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Prime Implicants

❖ A Prime Implicant is a Product ofVariables or Their Complements, eg.ab’cd’

❖ If a Prime Implicant has the Value 1,then the Function has the Value 1

❖ A Minimal Equation is a Sum of PrimeImplicants

Page 9: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Minimization and Minterms

❖ Minimization Reduces the Size andNumber of Prime Implicants

❖ A MinTerm is a Prime Implicant withthe Maximum Number of Variables

❖ For a 3-input Function a’bc is aMinTerm, while ab is not.

❖ Prime Implicants can be Combined toEliminate Variables, abc’+abc = ab

Page 10: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Minimization with Maps

❖ A Karnaugh Map

CB

00 01 11 10

0 1 0 0 1

A ^ 1 1 0 0 0

Page 11: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Procedure

❖ Select Regions Containing All 1’s

❖ Regions should be as Large as Possible❖ Regions must contain 2k cells❖ Regions should overlap as little aspossible

❖ The complete set of regions mustcontain all 1’s in the map

Page 12: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Procedure 2

❖ Top and Bottom of Map are Contiguous❖ Left and Right of Map are Contiguous❖ Regions represent Prime Implicants❖ Use Variable name guides to constructequation

– Completely inside the region of a variablemeans prime implicant contains variable

– Completely outside the region of a variablemeans prime implicant contains negation

Page 13: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Applied to Previous MapC

B

00 01 11 10

0 1 0 0 1

A ^ 1 1 0 0 0

q=c’b’+c’a’

Page 14: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

A 4-Variable Karnaugh MapD

C

00 01 11 10

00 0 0 0 0

B^ 01 0

11 0

1 1 1

1 0 1A

10 0 1 1 1

Page 15: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

First MinimizationD

C

00 01 11 10

00 0 0 0 0

B^ 01 0

11 0

1 1 1

1 0 1A

10 0 1 1 1

Page 16: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Second MinimizationD

C

00 01 11 10

00 0 0 0 0

B^ 01 0

11 0

1 1 1

1 0 1A

10 0 1 1 1

Page 17: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Minimal Forms for PreviousSlides:

ab′d + bc′d + a′bc + acd′

ac′d + a′bd + bcd′ + ab′c

❖ Moral: A Boolean Function May HaveSeveral Different Minimal Forms

❖ Karnaugh Maps are Ineffective forFunctions with More than Six Inputs.

Page 18: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Basic Logic Symbols

And Or Not

Page 19: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

The Exclusive Or Function

Xor 0 10 0 11 1 0

Page 20: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

A Simple Logic Diagram

Signal Flow

Page 21: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Additional Logic Symbols

Nand Nor Buffer Xnor

Page 22: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Decoder

A binary decoder has a n-bit binary code input code

and a one activates output out of 2n outputs is called a

binary decoder.A binary decoder is used when it is necessary to

activate exactly one of 2n outputs based on an n-bit

input value. Notice Enable signals:

Page 23: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Truth table of a Decoder2x4 decoder

3x8 decoder

Page 24: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Encoder

A digital circuit that performs the inverse operation of a decoder is called an encoder.An encoder has 2n input lines and n output linesIn encoder the output lines generate binary code corresponding to the input value.

Page 25: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Truth table of 8x3 Encoder

Page 26: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Multiplexer

The multiplexer is a circuit whose output is one of several inputs, depending on the value given by some other selection inputs. In a circuit, a multiplexer is drawn as a trapezoid as follows. Normally, there are 2n input lines and n selection lines whose bit combinations determine which input is selected.

Page 27: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Circuit of a Multiplexer

Truth table

CircuitSymbol

Page 28: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Tristate Elements

❖ Three States:– Zero (Output is grounded)

– One (Output connected to Power Terminal)– High-Impedance (Output Not Connected toEither Power Or Ground)

❖ Can be Used to Construct CheapMultiplexors

Page 29: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

CMOS Tri-state Buffers

Non-Inverting Inverting

Page 30: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

Tri-State Buffer Issues

❖ The Gate Amplifies its Signal❖ May be Inverting or Non-Inverting

❖ Often used to Construct MultiplexorsUsing Wired-Or Connections

Page 31: Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary

More Tri-State Issues

❖ In a Wired-Or Connection, Only OneBuffer can be in Non-Tristate State❖ Violating This Rule Can Destroy TheCircuit Due a Power/Ground Short

11

10

DANGER!