Chapter 7 Logic Circuits - SNUengineering.snu.ac.kr/lecture_pdf/EE/Chapter07_SNU.pdf ·...

Preview:

Citation preview

Chapter 7Logic Circuits

Goal

1. Advantages of digital technology compared to analog technology.

2. Terminology of Digital Circuits.

3. Convert Numbers between Decimal, Binary and Other forms.

5. Binary Arithmetic Operations in digital systems.

6. Interconnect Logic Gates to Implement a given logic function.

7. Karnaugh Maps to Minimize the Number of gates to implement a logic function.

IntroductionIntroduction

Why Digital Signal Conditioning?1. Multivariable Process Control2. Easy Linearization of Non-Linear System3. Easy Modification and Solution of Complicated System 4. Fully Integrated System using Networking Technique5. Immune from Noise, Power Drift & Analog Problem

Why Not Digital Signal Conditioning?1. Loss of Accuracy2. A/D Converter and D/A Converter Dependence

Digital Signal Compared to Analog Signal

TTL Level

TTL: Transistor-Transistor Logic

DIGITAL FUNDAMENTALSDIGITAL FUNDAMENTALS

Digital Word : Binary WordDecimal Number : 10 BaseOctal and Hexa Number : 8 and 16 Base

In parallel transmission, an n-bit word is transferred on n wires, one wire for each bit, plus a common or ground wire.

In serial transmission, the successive bits of the word are transferred one after the other with a single pair of wires.

Digital Words

Positive versus Negative Logic

Transmission of Digital Information

Positive Logic : High as 1 Low as 0Negative Logic : High as 0 Low as 1

Binary Numbersm

mbbbN −−− +++= 222 22

1110 L

1 than lessnumber 10 base10 =N1 than lessnumber 2 base... 121 =− mm bbbb

number 2 basein digits ofnumber =m

Gray Code

In Gray Code, Each Word differs in only one bit from each of its adjacent words

Binary Addition

Overflow and Underflow

We must be aware of the possibility of overflow in which the result exceeds the maximum value that can be represented by the word length in use.

Complement Arithmetic

One’s complement : Replacement of 1s by 0s, and vice versa.

0100110110110010 (one’s complement)

Two’s complement : Addition of 1 to the one’s complement,neglecting the carry (if any) out of the most significant bit

0100110110110010 (one’s complement)

Complement Arithmetic

Complements are useful for representing negative numbers and performing subtraction in computers.

Example of Subtraction

AAA =AAI = 00 =ABAAB = ( ) ( ) ABCCABBCA ==

AND

0=AA AA =

Inversion

( ) ( ) CBACBACBA ++=++=++

( ) ACABCBA +=+AA =+ 0

11 =+A 1=+ AAAAA =+

OR

( ) ( ) CBACBACBA ++=++=++

Truth Table for Associate Law

Implementation of Boolean Algebra

( )( )EDDCABCCBAF ++++=

DEEDACF +++= )(

De Morgan’s Laws

CBAABC ++= ( ) FEDFED =++

In a Logic Expression 1) the Variables are replaced by their Inverses,2) AND Operation is replaced by OR,3) OR operation is replaced by AND 4) the entire expression is inverted, Resulting expression yields the same as before

Any combinatorial logic function can be implemented solely with AND gate & Inverters. Similarly Any combinatorial logic function can be implemented solely with OR gate & Inverters

Proof of De Morgan’s Law :

TSTS ∪=∩

TxorSxThenTSxeiTSx ∉∉∩∉∩∈ ..

TSxTxorSxHence ∪∈→∈∈

( ) FEDFED =++

CBAABC ++= TSTS ∩=∪

TxorSxThenTSx ∈∈∪∈

TSxTxorSxHence ∩∈→∉∉

NAND, NOR and XOR Gates

NAND : AND followed by InverterNOR : OR followed by InverterXOR : Exclusively ORBuffer : Same Output with InputEquivalence : True if Inputs are same

XOR followed by Inverter 011110101000

=⊕=⊕=⊕=⊕

XOR

Logical Sufficiency of NAND or NOR

Classical Search Logic Decision

Current Search Logic Decision

Logic Implementation by Boolean AlgebraLogic Implementation by Boolean Algebra

ΒCΑCΑΒΑD__⋅⋅+⋅+⋅=

Alarm Condition1. Low Level with High Pressure2. High Level with High Temperature3. High Level with Low Temperature

and High Pressure

1 2 3

Direct Writing of Required Condition

CBACABA ⋅⋅+⋅+⋅

AND , OR , NOT Gate

( ) ( )CBACABA

CBACABA

⋅⋅⋅⋅+⋅=

⋅⋅+⋅+⋅

NAND , NOR, NOT gates

ΒCΑCΑΒΑD__⋅⋅+⋅+⋅=

Synthesis of Logic Circuits

(SOP) Sum-of-Products Implementation

In SOP, we form a product of all the input variables (or their inverses) for each row of the truth table for which the result is logic 1. The output is the sum of these products.Product terms that include all of the input variables (or their inverses) are called minterms.

(POS) Product-of-Sums Implementation

In POS, we form a sum of all the input variables (or their inverses) for each row of the truth table for which the result is logic 0. The output is the product of these sums.Sum terms that include all of the input variables (or their inverses) are called maxterms.

(SOP) Sum-of-Products Implementation

CBA ⋅⋅

CBA ⋅⋅

CBA ⋅⋅CBA ⋅⋅

(POS) Product-of-Sums Implementation

CBA ++

CBA ++CBA ++CBA ++

Take Inverse of Input!

Example of Logic Circuit DesignResident Heating System ,Day Time, Heating is required if temperature falls below 18oCNight Time, Heating is required if temperature falls below 25oCLogic Signal : D, H, L

D : Daytime =1 , Night Time = 0H : Temperature > 25oC = 1 , < 25oC = 0L : Temperature < 18oC = 1 , < 18oC = 0

Temperature can not beT < 18oC & T > 25oC

at a time

Neglect the Case!!

LHDLHDLHDmF ++==∑ )5,4,0(

LHDHDF +=

))()(()7,3,1( LHDLHDLHDMF ++++++==∏

011110101000

=⊕=⊕=⊕=⊕

Operation

011110101000DBA

Truth TableIn SOP

BABAmF +==∑ )2,1(

))(()4,0( BABAMF ++==∏

In POS

XOR Operation

Display Logic

4 bit logic : 10 case : 7 Output

1

1

1

1

1

1

1

G

1

1

1

1

1

1

F

1

1

1

1

E

111100018

11110019

11111107

1101106

11110105

1100104

111111003

11101002

1110001

111100000

DCBA2 Bit BinaryDecimal

Logic SimplificationSimplification Criterion:

F = (…) + (…) + (…) + … + (…)- with a minimum number of terms- with the fewest possible number of literals

* There may be many, equally good expressions!

With proper duplication of product terms, only the distributive law would do the job.

1. Algebraic Operational SimplificationSimple Algebraic Operation can make Simpler form such as

BCA

ABCA

ABCBABA

ABCBCACBACBACBACBAF

+=

+=

++=

++++=),,(

Use any Boolean Axioms and Theorems, or(1) two adjacent product terms into one bigger product term(2) a term may be used more than once during combination(3) a term may be partitioned into smaller ones

2. Algebraic Boolean Simplification

But, still we have some difficulties:(1) no specific rules to predict each succeeding step(2) difficult to determine whether the simplest expression has been achieved

ABCBCDDA

ABCBCDBBDA

ABCBCDBDADBACBAF

++=

+++=

+++=

)(

),,(

BCD=1, Only if B=1, C=1, D=1 1111 ==== AorAABCorDA Q

Thus BCD is redundant can be dropped

ABCDACBAF +=),,(

1. 2D Graphical Representation of Truth Table2. Simplification by Manual Operation (not for CAD)3. Simplification of SOP (minterms) 4. Procedure

- Draw K-Map - Write Logic Equation in K-Map- Select True Cube

Karnaugh Maps (Veitch Diagram)

Cube in K-Map

Products of Variable with Cube

Example of K-Map

- Outputs depend on PAST as well as PRESENT inputs- Simple Memory Logic based on Time Scale- Synchronized by a “Clock”

Sequential Logic Circuits

Flip-Flop

S-R Flip-Flop

S-R Flip-Flop with 2 NOR Gates

S-R Flip-Flop with 2 NAND Gates

Serial-In Parallel-Out Shift Register

Parallel-In Serial-Out Shift Register

Ripple Counter

Recommended