Chapter 4 Combinational Logic Design Principles ( 组合逻辑设计原理 )

306
1 Chapter 4 Combinational Logic Design Principles ( 组组组组组组组组 ) Basic Logic Algebra ( 组组组组组组 ) Combinational-Circuit Analysis ( 组组组组组组 ) Combinational-Circuit Synthesis Digital Logic Design and Application ( 组组组组组组组组组 )

description

Digital Logic Design and Application ( 数字逻辑设计及应用 ). Chapter 4 Combinational Logic Design Principles ( 组合逻辑设计原理 ). Basic Logic Algebra ( 逻辑代数基础 ) Combinational-Circuit Analysis ( 组合电路分析 ) Combinational-Circuit Synthesis ( 组合电路综合 ). - PowerPoint PPT Presentation

Transcript of Chapter 4 Combinational Logic Design Principles ( 组合逻辑设计原理 )

Page 1: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

1

Chapter 4 Combinational Logic

Design Principles( 组合逻辑设计原理 )

Basic Logic Algebra

(逻辑代数基础 ) Combinational-Circuit Analysis

(组合电路分析 ) Combinational-Circuit Synthesis

(组合电路综合 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 2: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

2

Review of Chapter 3

Electronic Behavior of CMOS Circuits

Logic Voltage Levels (逻辑电压电平 )

DC Noise Margins (直流噪声容限 )

Fan-In(扇入)Fun-Out (扇出 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 3: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

3

Review of Chapter 3

Transmission Gates ( 传输门 )Schmitt-Trigger Inputs ( Hysteresis)Three-State Outputs (Tri-State output)Open-Drain Outputs

(Open-Collector Gate)

EN

EN_L

A BA

EN

OUT

逻辑符号

AB Z

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 4: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

4

Review of Chapter 3

Logic LevelsCMOS(0-1.5V, 3.5-5V)TTL(0-0.8V, 2-5V)ECL(L=-1.8V, H=-0.9V) (L=3.6V, H=4.4V)

HIGH ( 高态 )

ABNOMAL

( 不正常状态 )

LOW ( 低态 )VOLmax

VILmax

VIHmin

VOHmin

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 5: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

5

Review of Chapter 3

Wired AND (线与 )

Open-Drain Outputs

(Open-Collector Gate)

Wired OR (线或 )Emitter-Coupled Logic Gate

( ECL, 发射极耦合逻辑门)

AB Z

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 6: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

6

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Review of Chapter 3

Positive Logic and

Negative Logic

(正逻辑和负逻辑 )

Three basic logic

functions: AND,

OR, and NOT

(三种基本逻辑:与、或、非 )

VOUT

VIN

Vcc

R

获得高、低电平的基本原理

Page 7: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

7

Review of Chapter 3 ( 第三章内容回顾 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Three kinds of Description Method

(三种描述方法 ):

Truth Table (真值表 )

Logic Expression (逻辑表达式 )

Logic Circuit (逻辑符号 )

NAND and NOR (与非和或非 )

Page 8: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

88

IntroductionLet’s learn to design digital circuits,

starting with a simple form of circuit:Combinational circuit

Outputs depend solely on the present combination of the circuit inputs’ values

2.1

DigitalSystem

b=0 F=0

DigitalSystem

if b=0, then F=0if b=1, then F=1

b=1 F=1

DigitalSystem

b=0 F=0

(a)

DigitalSystem

b=1 F=1

• Vs. sequential circuit: Has “memory” that impacts outputs too

DigitalSystem

b=0 F=1

Cannot determine value of F solely from present input value

(b)

Page 9: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

9

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Basic Concepts ( 基本概念 )

Two Types of Logic Circuits(逻辑电路分为两大

类 ):

Combinational Logic Circuit (组合逻辑电路)

Sequential Logic Circuit (时序逻辑电路)

Outputs depend only on its Current Inputs.( 任何时刻的输出仅取决与当时的输入 )

Outputs depends not only on the current Inputs

but also on the Past sequence of Inputs.

( 任一时刻的输出不仅取决与当时的输入,还取决于过去的输入序列 )

电路特点:无反馈回路、无记忆元件

Page 10: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

10

Digital Logic Design and Application ( 数字逻辑设计及应用 )4.1 Switching Algebra ( 开关代数 )

4.1.1 Axioms (公理 )X = 0 , if X 1 X = 1, if X 0 0’ = 1 1’ = 0 0·0 = 0 1+1 = 1 1·1 = 1 0+0 = 0 0·1 = 1·0 = 0 1+0 = 0+1 = 1

F = 0 + 1 · ( 0 + 1 · 0’ )’

= 0 + 1 · 1’

Page 11: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

11

4.1.2 Single-Variable Theorems( 单变量开关代数定理 )

Identities (自等律 ): X + 0 = X X · 1 = X Null Elements (0-1律 ): X + 1 = 1 X · 0 = 0

Involution (还原律 ): ( X’ )’ = X

Idempotency(同一律 ): X + X = X X · X = X Complements(互补律 ): X + X’ = 1 X · X’ = 0

变量和常量的

关系

变量和其自身的关系

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 12: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

12

Digital Logic Design and Application ( 数字逻辑设计及应用 )

4.1.3 Two-and Three-Variable Theorems ( 二变量或三变量开关代数定理 )

Similar Relationship with General Algebra (与普通代数相似的关系 )

Commutativity (交换律 ) A · B = B · A A + B = B + A

Associativity (结合律 ) A·(B·C) = (A·B)·C A+(B+C) = (A+B)+C

Distributivity (分配律 ) A·(B+C) = A·B+A·C A+B·C = (A+B)·(A+C)

可以利用真值表证明公式和定理

Page 13: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

13

Perfect induction of the theorem

Use the truth table to prove the functions on both

side are same !

zxyx

zyzxyx

'

'

To prove, just evaluate all possibilities

Page 14: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

1414

Example uses of the properties

Show abc’ equivalent to c’ba.Use commutative property:

a*b*c’ = a*c’*b = c’*a*b = c’*b*a Show abc + abc’ = ab.

Use first distributive propertyabc + abc’ = ab(c+c’).

Complement property Replace c+c’ by 1: ab(c+c’) = ab(1).

Identity property ab(1) = ab*1 = ab.

a

Page 15: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

1515

Example uses of the properties

Show x + x’z equivalent to x + z.Second distributive property

Replace x+x’z by (x+x’)*(x+z). Complement property

Replace (x+x’) by 1, Identity property

replace 1*(x+z) by x+z.

a

Page 16: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

16

Notes ( 几点注意 ) 不存在变量的指数 A·A·A A3

允许提取公因子 AB+AC = A(B+C) 没有定义除法 if AB=BC A=C ??

没有定义减法 if A+B=A+C B=C ??

A=1, B=0, C=0

AB=AC=0, AC

A=1, B=0, C=1

错!

错!

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 17: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

17

Some Special Relationships( 一些特殊的关系 )

Covering (吸收律 )X + X·Y = X X·(X+Y) = X

Combining (组合律 )X·Y + X·Y’ = X (X+Y)·(X+Y’) = X

Consensus [添加律(一致性定理) ]X·Y + X’·Z + Y·Z = X·Y + X’·Z(X+Y)·(X’+Z)·(Y+Z) = (X+Y)·(X’+Z)

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 18: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

18

对上述的公式、定理要熟记,做到举一反三

(X+Y) + (X+Y)’ = 1A + A’ = 1

X·Y + X·Y’ = X

(A’+B)·(A·(B’+C)) + (A’+B)·(A·(B’+C))’ = (A’+B)

代入定理: 在含有变量 X 的逻辑等式中,如果将式中所有出现 X 的地方都用另一个函数 F 来代替,则等式仍然成立。

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 19: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

19

Prove ( 证明 ) : X·Y + X’·Z + Y·Z = X·Y + X’·Z

Y·Z = 1·Y·Z

= (X+X’)·Y·Z

X·Y + X’·Z + (X+X’)·Y·Z

= X·Y + X’·Z + X·Y·Z +X’·Y·Z

= X·Y·(1+Z) + X’·Z·(1+Y)

= X·Y + X’·Z

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 20: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

20

4.1.4 n-Variable Theorems (n 变量定理 )

Generalized idempotency theorem ( 广义同一律 )

X + X + … + X = X X · X · … · X = XShannon’s expansion theorems ( 香农展开定理 )

),,,0(),,,1(

),,,(F

2'121

21

nn

n

XXFXXXFX

XXX

)],,,1([)],,,0([

),,,(F

2'121

21

nn

n

XXFXXXFX

XXX

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 21: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

21

Prove ( 证明 ) : A·D + A’·C + C·D + A·B’·C·D = A·D + A’·C

= A · ( 1·D + 1’·C + C·D + 1·B’·C·D ) +

A’ · ( 0·D + 0’·C + C·D + 0·B’·C·D )

= A · ( D + C·D + B’·C·D ) +

A’ · ( C + C·D )

= A·D·( 1 + C + B’·C ) + A’·C·( 1 + D )

= A·D + A’·C

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 22: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

22

4.1.4 n-Variable Theorems ( n 变量定理 )

Demorgan’s Theorems (摩根定理 )

''2

'121 )'( nn XXXXXX

''2

'121 )'( nn XXXXXX +++

),,,,,()]',,,,,([ ''2

'121 + nn XXXFXXXF

—— Complement Theorems ( 反演定理 )

(A · B)’ = A’ + B’

(A + B)’ = A’ · B’

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 23: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

23

Complement Rules (反演规则 ): · +, 0 1, Complementing Variables

( 变量取反 )Follow the Priority Sequence as Before

( 遵循原来的运算优先次序 )Keep the complement Symbol of Non-

single variables

( 不属于单个变量上的反号应保留不变 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 24: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

24

Example 1 : Write the Complement function for each of

The Following Logic functions. ( 写出下面函数的反函数 ) F1 = A · (B + C) + C · D

F2 = (A · B)’ + C · D · E’

Example 2 : Prove (A·B + A’·C)’ = A·B’ + A’·C’

合理地运用反演定理能够将一些问题简化

Page 25: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

25

合理地运用反演定理能够将一些问题简化

Prove : AB + AC = AB + AC

AB + AC + BC = AB + AC

(A+B)(A+C)

AA +AC + AB + BC

AC + AB

AC + AB + BC

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 26: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

26

4.1.5 Duality ( 对偶性 )

Duality Rule ( 对偶规则 ) · +; 0 1变换时不能破坏原来的运算顺序(优先级)

Principle of Duality ( 对偶原理 )若两逻辑式相等,则它们的对偶式也相等

例: Write the Duality function for each of the following Logic functions. ( 写出下面函数的对偶函数 )

F1 = A + B · (C + D)

F2 = ( A’·(B+C’) + (C+D)’ )’

X + X · Y = X

X · X + Y = X

X + Y = XX · ( X + Y ) = X

FD(X1 , X2 , … , Xn , + , · , ’ )

= F(X1 , X2 , … , Xn , · , + , ’ )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 27: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

27

4.1.5 Duality ( 对偶性 )

证明公式: A+BC = (A+B)(A+C)

A(B+C) AB+AC

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Duality Rule ( 对偶规则 )· +; 0 1变换时不能破坏原来的运算顺序(优先级)

Principle of Duality ( 对偶原理 )若两逻辑式相等,则它们的对偶式也相等

Page 28: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

28

Two kind of logic

Positive logic : 1 ( high level ) 0 (low level)

Negative logic: 0 ( high level ) 1 (low level)

If a logic relation exist in positive logic, it

must be exist in negative logic. Both logic are

duality for each other.

Positive-Logic Convention and Negative-Logic ConventionAre Duality ( 正逻辑约定和负逻辑约定互为对偶关系 )

Page 29: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

29

Duality and Complement( 对偶和反演 )

Duality ( 对偶 ) : FD(X1 , X2 , … , Xn , + , · , ’ )

= F(X1 , X2 , … , Xn , · , + , ’ )

Complement ( 反演 ) : [ F(X1 , X2 , … , Xn , + , · ) ]’

= F(X1’ , X2’, … , Xn’ , · , + )

[ F(X1 , X2 , … , Xn) ]’ = FD(X1’ , X2’, … , Xn’ )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 30: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

30

第 4 章作业( P230 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

4.4 T8’ 4.5 4.6 4.7 (d) (i) 4.8 (c) (h) 补充:写出 4.7 (c)

4.8 (g) 的对偶式和反演式

Page 31: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

31

A Class Problem ( 每课一题 )

Write the Duality and Complement function for each of the following Logic functions.

(分别写出下面函数的对偶函数和反函数 )

F1 = A’ · (B + C) + C’ · DF2 = ( A·(B+C’) + (C+D)’ )’

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 32: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

32

Chapter 4 Combinational Logic

Design Principles( 组合逻辑设计原理 )

Basic Logic Algebra

(逻辑代数基础 ) Combinational-Circuit Analysis

(组合电路分析 ) Combinational-Circuit Synthesis

(组合电路综合 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 33: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

33

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Review of 4.1 Switching Algebra ( 开关代数内容回顾 )

1 、 Axioms (公理 )

2 、 Single-Variable Theorems

(单变量开关代数定理 )

3 、 Two-and Three-Variable Theorems

(二变量或三变量开关代数定理 )

需要特别记忆: A + B·C = (A+B)·(A+C)

A·B + A’·C + B·C = A·B + A’·C

补充:代入定理

Page 34: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

34

4 、 n-Variable Theorems (n变量定理 )

Generalized Idempotency

(广义同一律 )

Shannon’s Expansion Theorems

(香农展开定理 )

Demorgan’s Theorems

[ 摩根定理(反演) ]

Duality (对偶 )

X + X + … + X = X

X · X · … · X = X),,,(F 21 nXXX ),,,1( 21 nXXFX

),,,0( 2'1 nXXFX

Review of 4.1 Switching Algebra ( 开关代数内容回顾 )

Page 35: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

35

Digital Logic Design and Application ( 数字逻辑设计及应用 )

与或, 0 1

变量取反

[ F(X1 , X2 , … , Xn) ]’ = FD(X1’ , X2’, … , Xn’ )

与或, 0 1

Review of 4.1 Switching Algebra ( 开关代数内容回顾 )

•n-Variable Theorems (n 变量定理 )•Generalized Idempotency• ( 广义同一律 )•Shannon’s Expansion Theorems• ( 香农展开定理 )•Demorgan’s Theorems• [ 摩根定理(反演) ]•Duality ( 对偶 )

Page 36: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

36

Digital Logic Design and Application ( 数字逻辑设计及应用 )

G1AB F

A B F

L L LL H LH L LH H H

Electrical FunctionTable ( 电气功能表 )

A B F

0 0 00 1 01 0 01 1 1

Positive-LogicConvention

A B F

1 1 11 0 10 1 10 0 0

Negative-LogicConvention

Positive-Logic

( 正逻辑 ) : F = A·B

Negative-Logic

( 负逻辑 ) : F = A+B

The relationship of Positive-Logic Convention and Negative-Logic Convention are Duality ( 正逻辑约定和负逻辑约定互为对偶关系 )

Page 37: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

37

Digital Logic Design and Application ( 数字逻辑设计及应用 )

举重裁判电路

Y = F (A,B,C ) = A·(B+C)

AB Y

C

逻辑函数 逻辑图

开关 ABC1 表闭合指示灯1 表亮

0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1

A B C Y

真值表

补充:逻辑函数及其表示方法

&≥1

A

B

C

Y

00000111

Page 38: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

3838

Gates vs. switches

Notice Boolean algebra enables

easy capture as equation and conversion to circuitHow design with

switches?

Page 39: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

3939

Gates vs. switchesOf course, logic gates are built from

switches, but we think at level of logic gates, not switches

w = NOT(s) AND k

a

k

s

w

Belt Warn

Seatbelt

Belt Warn

w

1

0

0

1

s

k

Page 40: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

4040

Some Gate-Based Circuit Drawing Conventions

no yes

not ok

ok

xy F

no yes

Page 41: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

4141

Boolean Algebra

By defining logic gates based on Boolean algebra, we can use algebraic methods to manipulate circuits

Notation: Writing a AND b, a OR b, NOT(a) is cumbersomeUse symbols: a * b (or just ab), a + b, and a’

2.5

Page 42: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

4242

Boolean Algebra Original: w = (p AND NOT(s) AND k) OR t New: w = ps’k + t

Spoken as “w equals p and s prime and k, or t”

Or just “w equals p s prime k, or t”s’ known as “complement of s”

While symbols come from regular algebra, don’t say “times” or “plus”

"product" and "sum" are OK and commonly used

2.5

Page 43: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

4343

Boolean Algebra

Boolean algebra precedence, highest precedence first.

Symbol Name Description

( ) Parentheses Evaluate expressions nested

in parentheses first

’ NOT Evaluate from left to right

* AND Evaluate from left to right

+ OR Evaluate from left to right

2.5

Page 44: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

4444

Boolean Algebra Terminology

Example equation: F(a,b,c) = a’bc + abc’ + ab + cVariable

Represents a value (0 or 1)Three variables: a, b, and c

LiteralAppearance of a variable, in true or

complemented formNine literals: a’, b, c, a, b, c’, a, b, and c

Page 45: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

4545

Boolean Algebra Terminology

Product termProduct of literalsFour product terms: a’bc, abc’, ab, c

Sum-of-productsEquation written as OR of product terms

onlyAbove equation is in sum-of-products

form. “F = (a+b)c + d” is not.

Page 46: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

46

Combinational logic

The output is determined only by its input.

Output can be changed when input changed.

Page 47: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

4747

Representations of Boolean Functions

2.6

a F

Circuit 2 (d)

English 1: F outputs 1 when a is 0 and b is 0, or when a is 0 and b is 1.

English 2: F outputs 1 when a is 0, regardless of b’s value

(a)

(b)

a0011

b0101

F1100

a

bF

Circuit 1(c)

The function F

Truth table

Equation 2: F(a,b) = a’

Equation 1: F(a,b) = a’b ’ + a’b

Page 48: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

4848

Representations of Boolean Functions

A function can be represented in different ways Above shows seven representations of the same

functions F(a,b), using four different methods: English Equation Circuit and Truth Table

2.6

a

Page 49: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

49

Representations of logic functions

Truth table Timing diagram

Logic equations Logic circuits

Page 50: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

50

Truth table

Left: the input combinations in binary order

Right: the output for the input

Page 51: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

51

Logic design: Construct a Truth table

A device with majority judge function

output the majority input state .

Page 52: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

52

Full adder add three input numbers to get their sum.

Logic design: Construct a Truth table

Page 53: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

53

4-bits prime-number detector when input is (1,2,3,5,7,11,13), the output is 1, otherwise the output is 0 .

Logic design: Construct a Truth table

Page 54: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

54

4-bit Binary to Gray code converter change binary input to Gray code output.

Logic design: Construct a Truth table

Page 55: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

5555

Converting among Representations

Can convert from any representation to another

Common conversions Equation to circuit Circuit to equation

Start at inputs, write expression of each gate output

c c'

h

F = c'(h+p)

ph+p

CircuitsEquations

Truth table

34

1

26

5

Page 56: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

5656

Converting among Representations

More common conversions Truth table to equation (which we can then

convert to circuit)Easy–just OR each input term that should

output 1 Equation to truth table

Easy—just evaluate equation for each input combination (row)

Creating intermediate columns helps

a

CircuitsEquations

Truth table

34

1

26

5

Page 57: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

5757

Example: Converting from Circuit to Truth Table

First convert to circuit to equation, then equation to table

F

a

c

bab

c'

(ab)'

(ab)'c'

a00001111

c01010101

b00110011

F10101000

ab00000011

(ab)'11111100

c'10101010

Inputs Outputs

Page 58: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

5858

Standard Representation: Truth Table

How can we determine if two functions are the same? Recall automatic door example

Same as f = hc’ + h’pc’?Used algebraic methodsBut if we failed, does that prove not equal? No.

Solution: Convert to truth tables Only ONE truth table representation of a given

functionStandard representation—for given function,

only one version in standard form exists

Page 59: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

5959

Standard Representation: Truth Table

f = c’hp + c’hp’ + c’h ’

f = c’h(p + p’) + c’h ’p

f = c’h(1) + c’h ’p

f = c’h + c’h ’p

(what if we stopped here?)

f = hc’ + h’pc’

a0011

b0101

F1101

F = ab + a'

a0011

b0101

F1101

F = a’b ’ + a ’b + ab

Q: Determine if F=ab+a’ is samefunction as F=a’b’+a’b+ab,

by converting each to truth table first

Same

Page 60: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

60

Logic Expression to Truth Table( 逻辑表达式 真值表 )

Y = (B’+C) · (A’+B+C’)

0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1

A B C B’+C A’+B+C’ Y

0

0

11111

10

11

11

1

11

111

1

0

0

00

Product-of-Sums

Expression

(“ 和之积”表达式“ 或 - 与”式 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 61: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

61

Truth Table to Logic Expression ( 真值表 逻辑表达式 )

A’·B·C

0 0 0 00 0 1 00 1 0 00 1 1 11 0 0 01 0 1 11 1 0 11 1 1 0

A B C F

表A·B’·

C

A·B·C’

F = A’·B·C + A·B’·C + A·B·C’

0 反变量1 原变量

乘积项:

Sum-of-Products “ 积之和”表达式“ 与 - 或”式

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 62: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

62

Truth Table to Logic Expression

( 真值表 逻辑表达式 )

11101111

G

0 0 0 00 0 1 00 1 0 00 1 1 11 0 0 01 0 1 01 1 0 01 1 1 0

A B C F

(A’·B·C)’ = A+B’+C’

F = A’·B·C

G = (A+B’+C’)

0 原变量1 反变量

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 63: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

63

Truth Table to Logic Expression

( 真值表 逻辑表达式 )

0 0 0 10 0 1 10 1 0 00 1 1 11 0 0 01 0 1 11 1 0 11 1 1 1

A B C F

A+B’+C

A’+B+C

F = (A+B’+C) · (A’+B+C)

0 原变量1 反变量

求和项

“ 和之积”表达式“ 或 - 与”式

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 64: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

64

4.1.6 Standard Representations of Logic Functions ( 逻辑函数的标准表示

法 )

Minterms ( 最小项 )

—— An n-variable Minterm is a

normal product term with n

literals (n个因子的标准乘积项 )

There are 2n such product terms

(n变量函数具有 2n个最小项 )

Any two different product terms

produce 0.

(任意两个不同最小项的乘积为 0)

A’·B’·C’

A’·B’·C

A’·B·C’

A’·B·C

A·B’·C’

A·B’·C

A·B·C’

A·B·C

0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1

A B C

Product Term( 乘积项 )

Page 65: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

65

Properties of minterm

For any input combinations, there is one and only

one minterm will be 1;

The sum of all the minterm must be 1;

The product of any two different minterm must be

0.

Page 66: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

66

Maxterms ( 最大项 )

—— An n-variable maxterm is a normal

sum term with n literals.

(n变量最大项是具有 n个因子的标准求和项 )

There are 2n such sum terms.

(n变量函数具有 2n个最大项 )

Product of all maxterms is 0.

(全体最大项之积为 0)

Any two different sum terms produce 1.

(任意两个最大项的和为 1)

A+B+C

A+B+C’

A+B’+C

A+B’+C

A’+B+C

A’+B+C

A’+B’+

C

A’+B’+

C’

0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1

A B CSum Term( 求和项 )

4.1.6 Standard Representations of Logic Functions ( 逻辑函数的标准表示

法 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 67: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

67

Properties of maxterm

For any input combinations, there is one and only

one maxterm will be 0;

The product of all the maxterm must be 0;

The sum of any two different maxterm must be 1.

Page 68: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

68

Properties of maxterm

For any input combinations, there is one and only

one maxterm will be 0;

The product of all the maxterm must be 0;

The sum of any two different maxterm must be 1.

Page 69: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

69

A’·B’·C’

A’·B’·C

A’·B·C’

A’·B·C

A·B’·C’

A·B’·C

A·B·C’

A·B·C

m0

m1

m2

m3

m4

m5

m6

m7

Minterms( 最小项 )

0 0 0 00 0 1 1

0 1 0 2

0 1 1 3

1 0 0 4

1 0 1 5

1 1 0 6

1 1 1 7

A B C 编号

A+B+C

A+B+C’

A+B’+C

A+B’+C’

A’+B+C

A’+B+C’

A’+B’+C

A’+B’+C’

M0

M1

M2

M3

M4

M5

M6

M7

Maxterms ( 最大项 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 70: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

70

Relationship of Maxterms and Minterms

( 最大项与最小项之间的关系 )

11101001

G

0 0 0 00 0 1 00 1 0 00 1 1 11 0 0 01 0 1 11 1 0 11 1 1 0

A B C F

(A’·B·C)’ = A+B’+C’

(A·B’·C)’ = A’+B+C’

(A·B·C’)’ = A’+B’+C

Mi = mi’

)6,5,3(,, CBAF

)7,4,2,1,0(,, CBAF

mi = Mi’

')6,5,3(,, FG CBA

标号互补

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 71: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

71

① 、 Mi = mi’ ; mi = Mi’ ;

③ 、一个 n 变量函数,既可用最小项之和表示, 也可用最大项之积表示。两者下标互补。

② 、某逻辑函数 F ,若用 P 项最小项之和表示, 则其反函数 F’ 可用 P 项最大项之积表示, 两者标号完全一致。

Relationship of Maxterms and Minterms

( 最大项与最小项之间的关系 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 72: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

72

Truth Table (真值表 )

Product Term, Sum Term (乘积项、求和项 )

Sum-of-Products Expression (“ ”积之和 表达式 )

Product-of-Sum Expression (“ ”和之积 表达式 )

Canonical Sum and Product (标准和与标准积 )

N-variable Minterm (n 变量最小项 )

N-variable Maxterm (n 变量最大项 ) (4.1.6)

—— 最小项之和

—— 最大项之积标准和标准积

4.1.6 Standard Representations of Logic Functions ( 逻辑函数的标准表示

法 )

Normal Term ( 标准项)

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 73: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

73

0 0 0 00 0 1 00 1 0 10 1 1 01 0 0 11 0 1 01 1 0 01 1 1 1

A B C F

课堂练习:分别写出下面逻辑函数的 Canonical Sum

( 标准和 )

Canonical Product

( 标准积 )

的表示。)7,4,2(,, CBAF

)6,5,3,1,0(,, CBA

On-Set( 开集 )

Off-Set( 闭集 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 74: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

74

用标准和 (Canonical Sum) 的形式表示函数: F(A,B,C) = A·B +A’·C

利用基本公式 A + A’ = 1

F(A,B,C) = A·B + A’·C

= A·B·(C+C’) + A’·C·(B+B’)

= A·B·C + A·B·C’ + A’·B·C + A’·B’·C1 1 1 1 1 0 0 1 1 0 0 1

= A,B,C(1,3,6,7)

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 75: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

75

G(A,B,C) = (A+B) · (A’+C)

= (A+B+C·C’) · (A’+C+B·B’)

= (A+B+C)·(A+B+C’)·(A’+B+C)·(A’+B’+C)0 0 0 0 0 1 1 0 0 1 1 0

= A,B,C(0,1,4,6)

Digital Logic Design and Application ( 数字逻辑设计及应用 )

用标准积 (Canonical Product) 的形式表示函数:

Page 76: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

76

Standard logic equation

Minterm list (Canonical sum) : list of “1”

ZYXZYXZYX

mmmZYXFXYZ

'''

7,6,1,, 761

Page 77: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

77

Maxterm list (Canonical product): list of “0”

543205,4,3,2,0,, MMMMMZYXFXYZ

Standard logic equation

Page 78: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

78

Any logic can be realized in two level circuit :

Minterm list , Canonical sum, sum of product;

Maxterm list , Canonical product, product of sum;

xyzxyzzyxmmmXYZ

'''7617,6,1

zyxzyxMMXYZ

''424,2

Standard logic equation

Page 79: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

79

Any logic can be realized in two level circuit :

XYZXYZ

ZYXF 5,4,3,2,07,6,1,,

XYZXYZ

ZYXF 7,6,15,4,3,2,0,,

Standard logic equation

Page 80: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

80

From logic equation to logic circuit

131175321 mmmmmmmF

Page 81: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

81

Example that Applies Boolean Algebra Properties

Want automatic door opener circuit (e.g., for grocery store) Output: f=1 opens door Inputs:

p=1: person detectedh=1: switch forcing hold openc=1: key forcing closed

Want open door whenh=1 and c=0, orh=0 and p=1 and c=0

Equation: f = hc’ + h’pc’

fhcp

DoorOpener

Page 82: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

8282

Example that Applies Boolean Algebra Properties

Can the circuit be simplified?

f = hc' + h'pc'f = c'h + c'h'p (by the commutative property)

f = c'(h + h'p) (by the first distrib. property)

f = c'((h+h')*(h+p)) (2nd distrib. prop.; tricky one)

f = c'((1)*(h + p)) (by the complement property)

f = c'(h+p) (by the identity property)

Simplified

circuit

a

a

DoorOpenerc

h fp

Page 83: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

83

How to make a circuit better ?

xyzzxyzyxFXYZ

'''7,5,1

xyzzyxyzzxyzyxF ''''

zxyzxyyF ''

Page 84: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

84

4.2 Combinational-Circuit Analysis

( 组合电路分析 )给出组合电路的逻辑图,分析电路的功能

—— 通过获得逻辑函数的形式来分析

A

B F

A’

B’

(A’·B’)’

(A·B)’

F = [ (A’·B’)’ · (A·B)’ ]’= A’·B’ + A·B = AB

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 85: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

85

第 4 章作业( P230 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

4.9 (a) (b) 4.10 (c) (f) 4.12

Page 86: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

86

A Class Problem ( 每课一题 )

Corresponding the right Truth Table ,write the Canonical Sum(标准和) and Canonical Product(标准积)。

Digital Logic Design and Application ( 数字逻辑设计及应用 )

0 0 0 10 0 1 10 1 0 00 1 1 11 0 0 01 0 1 11 1 0 0 1 1 1 1

A B C F

Page 87: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

87

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Review of Chapter 2 ( 第二章内容回顾 )

General Positional-Number-System

Conversion

(常用按位计数制的转换 )

Addition and Subtraction of Non-decimal Numbers

(非十进制的加法和减法 )

Page 88: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

88

Review of Chapter 2 ( 第二章内容回顾 )

Representation of Negative Numbers (负数的表示 )

Signed-Magnitude [ 符号-数值(原码) ]Complement Number Systems (补码数制 )

Radix – Complement (基数补码 )

Diminished Radix – Complement

[ 基数减 1补码(基数反码) ]

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 89: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

89

Review of Chapter 2 ( 第二章内容回顾 )

Binary Signed-Magnitude, Ones’ – Complement, and Two’s – Complement Representation

( 二进制的原码、反码、补码表示 )

直接由补码 (反码 )求二进制数值的大 小:最高位位权为 -2n-1 (-2n-1 -1)

(1011)2补= ( ) 10

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 90: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

90

Review of Chapter 2 ( 第二章内容回顾 )

Two’s – Complement Addition and Subtraction

(二进制补码的加法和减法 )

Overflow(溢出)如果加法运算产生的和超出了数制表示的范围,则结果发生了溢出( Overflow)。

如何判断溢出?

MSB C in 与 C out 不同

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 91: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

91

Review of Chapter 2 ( 第二章内容回顾 )

How to represent a 1-bit Decimal number with a 4-bit Binary code

( 如何用 4 位二进制码 表示 1位十进制码 )?—— Binary Coded Decimal (BCD码)

(0.301)10=( )8421BCD

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 92: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

92

Review of Chapter 2 ( 第二章内容回顾 )

Addition of BCD Digits (BCD数的加法 )思考: 两个 BCD码 与两个 4位二进制数 相加的区别 ?

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 93: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

93

Digital Logic Design and Application ( 数字逻辑设计及应用 )

01011001

11100110

0100

10001000

00000110

0110

59

14

10

88

16

10+

++

++

+ +

4 1

+6

1

1

修正

修正

01000101

1001

10011001

00100110

1000

45

9

99

18

10+

++

+ +

+8

1

1

修正

Page 94: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

94

Review of Chapter 2 ( 第二章内容回顾 )

Addition of BCD Digits (BCD数的加法 )思考:何时需要进行修正? 如果 (X+Y)产生进位信号 C

或 在 1010~1111 之间

如何修正? —— 结果加 6

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 95: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

95

Review of Chapter 2 ( 第二章内容回顾 )

Gray code(格雷码)

任意相邻码字间只有一位数位变化

最高位的 0和 1只改变一次

最大数回到 0也只有一位码元不同

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 96: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

96

2.11 Gray code (格雷码)

Digital Logic Design and Application ( 数字逻辑设计及应用 )

构造方法Reflected Code(反射码)直接构造 The bits of an n-bit binary cord word are

numbered from right to left, from 0 to n-1. [ 对 n 位二进制的码字从右到左编号( 0 ~ n-1) ] Bit i of a Gray-code code word is 0 if bits i and

i+1 of the corresponding binary code word are the same, else bit i is 1.

( 若二进制码字的第 i 位和第 i + 1 位相同,则对 应的葛莱码码字的第 i 位为 0,否则为 1。 )

Page 97: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

97

Review of Chapter 2 ( 第二章内容回顾 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

From binary number to Gray code

The width is same, the MSB is same;

From left to right, if a bit in binary number is same as

its left bit, the gray code is 0, if it is different, the gray

code is 1.

Examples:

binary number: 1001 0010 0110 0011

Gray code: 1101 1011 0101 0010

Page 98: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

98

Review of Chapter 2 ( 第二章内容回顾 )

构造方法异或( XOR)运算:相异为 1,相同为 0Gn = Bn Bn = GnGn-1 = Bn Bn-1 Bn-1 = Gn Gn-1 ⊕ ⊕… … G0 = B1 B0 B0 = Gn Gn-1 … G0 ⊕ ⊕ ⊕ ⊕

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 99: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

99

Chapter 3 Digital Circuits ( 数字电路 )

Give a knowledge of the Electrical aspects of Digital Circuits

(介绍数字电路中的电气知识 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 100: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

100

Consider some Questions(思考几个问题)

在模拟的世界中如何表征数字系统?如何将物理上的实际值 映射为逻辑上的 0 和 1 ?什么时候考虑器件的逻辑功能; 什么时候考虑器件的模拟特性?

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 101: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

101

Digital Logic Design and Application ( 数字逻辑设计及应用 )

3.1 Logic Signals and Gates( 逻辑信号和门电路 )

How to get the HIGH and LOW Voltage

(如何获得高、低电平 )?

HIGH to 0 or 1 ( 高电平对应 0 还是 1)?

VOUT

VIN

Vcc

R

获得高、低电平的基本原理Positive( 正逻辑 )

1

0

Negative( 负逻辑 )

1

0

Page 102: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

102102

Switches Electronic switches are the basis of binary digital

circuits A switch has three parts

Source input, and output Current tries to flow from source input to output

Control input Voltage controls whether that current can flow “off”

“on”

outputsourceinput

outputsourceinput

controlinput

controlinput

Page 103: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

103 103

Switches The amazing(令人惊奇

的) shrinking(逐渐减 小的) switch

1930s: Relays 1940s: Vacuum tubes 1950s: Discrete

transistor 1960s: Integrated circuits

(ICs)Initially just a few

transistors on ICThen tens, hundreds,

thousands...

relay

vacuum tube

discrete transistor

IC

quarter(to see the relative size)

Page 104: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

104104

The CMOS TransistorCMOS transistor

Basic switch in modern ICs

Silicon -- not quite a conductor or insulator:Semiconductor

2.3

gate

source drain

oxide

A positive voltage here...

(a)

IC package

IC

...attracts electrons here, turning the channel betweenthe source and drain intoa conductor

Page 105: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

105105

The CMOS Transistor

CMOS transistorBasic switch in modern ICs

does notconduct

0

conducts

1gate

nMOS

does notconduct

1gatepMOS

conducts

0

2.3

Page 106: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

106106

Moore’s Law

IC capacity(容量,集成 度) doubling about every

18 months for several decadesKnown as “Moore’s Law”

after Gordon Moore, co-founder of IntelPredicted (预言) in 1965

predicted that components per IC would double roughly(粗

略地,大致上) every year or so

Page 107: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

107

Moore’s Law

For a particular(特定 的) number of

transistors, the IC area shrinks by half every 18 months

Consider how much shrinking occurs in just 10 years (try drawing it)

Enables incredibly(不 能相信的,难以置信的)

powerful computation in incredibly tiny devices

Page 108: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

108

Moore’s Law

Today’s ICs hold billions of transistorsThe first

Pentium processor (early 1990s) needed only 3 million

An Intel Pentium processor IChaving millions of transistors

Page 109: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

109

3.1 Logic Signals and Gates( 逻辑信号和门电路 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

从物理的角度考虑电路如何工作,工作中的电气特性实际物理器件不可避免的时间延迟问题

从逻辑角度输入、输出的逻辑关系

三种基本逻辑:与、或、非

Page 110: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

110110

Boolean Logic GatesBuilding Blocks for Digital Circuits

(Because Switches are Hard to Work With)

“Logic gates” are better digital circuit building blocks than switches (transistors) Why?...

2.4

Abstraction (提取) reduces complexity!

Page 111: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

111111

Boolean Algebra and its Relation to Digital Circuits

To understand the benefits of “logic gates” vs. switches, we should first understand Boolean algebra

“Traditional” algebraVariables represent real numbers (x, y)Operators (运算器) operate on

variables, return real numbers (2.5*x + y - 3)

a

Page 112: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

112112

Boolean Algebra and its Relation to Digital Circuits

Boolean AlgebraVariables represent 0 or 1 onlyOperators return 0 or 1 onlyBasic operators

AND: a AND b returns 1 only when both a=1 and b=1

OR: a OR b returns 1 if either (or both) a=1 or b=1

NOT: NOT a returns the opposite of a (1 if a=0, 0 if a=1)

a

Page 113: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

113

1 、 Basic Logic Function: AND(基本逻辑运算:与)

0 0 00 1 01 0 01 1 1

A BZ

Logic Expression

( 逻辑表达式 )

Z = A · B

Switch:1-on,0-off ( 开关: 1 通 ,0 断 )Lamp: 1-Light,0-out ( 灯 :1 亮 ,0 不亮 )

Produce a 1 output if

and only if its inputs

are all 1 ( 当且仅当所有输入全为 1 时,输出为 1)

Truth Table ( 真值表 )

&AB

Z

AB Z

(逻辑符号)A B Z

Logic Circuit

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 114: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

114

2 、 Basic Logic Function: OR(基本逻辑运算:或)

Logic Expression ( 逻辑表达式 ) :Z = A + B

A B Z

真值表A

B Z

Produce a 1 output if

any input is 1

( 只要有任何一个输入为 1

,输出就为 1)

≥1AB

Z

AB

Z

逻辑符号

0 0 00 1 11 0 11 1 1

Truth Table Logic Circuit

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 115: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

115

A Z

0 1

1 0

真值表

Logic Expression ( 逻辑表达式 ) : Y = A = A’

A ZR

Produce an

output value that

is the opposite of

its input value. (

产生一个与输入相反的输出 )

Usually called an Inverter (通常称为反相器)

1ZA

A Z

( 逻辑符号 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

3 、 Basic Logic Function: NOT(基本逻辑运算:非)

Truth Table Logic Circuit

Page 116: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

116

4 、 NAND and NOR Gates ( 与非 和 或非 )

NAND (与非 ) Logic Expression

(逻辑表达式 ): Z = ( A · B ) ’ Logic Circuit

( 逻辑符号 ):

NOR ( 或非 )

Logic Expression

(逻辑表达式 ):

Z = ( A + B ) ’

Logic Circuit

(逻辑符号 ):

& ≥1

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 117: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

117

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Truth Table ( 真值表 )

& ≥1

Logical Operation( 逻辑运算 ) NAND ( 与非 ) NOR ( 或非 )

Logic Circuit( 逻辑符号 )

Logic Expression( 逻辑表达式 )

Y=(AžB)’‘

Y=(A+B)’‘A B 0 0 1 1 1

Y 1 1 1 0

Y 1 0 0 0

10

0

Page 118: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

118118

Boolean Algebra and its Relation to Digital Circuits

Developed mid-1800’s by George Boole to formalize(使成正式) human thought Ex: “I’ll go to lunch if Mary goes OR John goes,

AND Sally does not go.”Let F represent my going to lunch (1 means I

go, 0 I don’t go)Likewise(类似地) , m for Mary going, j for

John, and s for SallyThen F = (m OR j) AND NOT(s)

Page 119: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

119119

Converting to Boolean Equations

Q1. A fire sprinkler (洒水器) system should spray (喷) water if high heat is sensed and the system is set to enabled.Answer: Let Boolean variable h represent

“high heat is sensed,” e represent “enabled,” and F represent “spraying water.”

Then an equation is: F = h AND e.

a

Page 120: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

120120

Converting to Boolean Equations

Q2. A car alarm should sound if the alarm is enabled, and either the car is shaken or the door is opened. Answer: Let a represent “alarm is enable

d,” s represent “car is shaken,” d represent “door is opened,” and F represent “alarm sounds.”

Then an equation is: F = a AND (s OR d).

a

Page 121: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

121

Relating Boolean Algebra to Digital Design

Booleanalgebra(mid-1800s)

Boole’s intent: formalizehuman thought

Switches(1930s)

Shannon (1938)

Digital design

Showed applicationof Boolean algebrato design of switch-

based circuits

For telephoneswitching and other

electronic uses

Page 122: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

122

Digital Logic Design and Application ( 数字逻辑设计及应用 )

3.2 Logic Families (逻辑系列)同一系列的芯片具有类似的输入、输出及内部电路特征,但逻辑功能不同。

不同系列的芯片可能不匹配

CMOS系列 TTL逻辑系列

Page 123: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

123

Digital Logic Design and Application ( 数字逻辑设计及应用 )

3.3 CMOS Logic (CMOS 逻辑 ) CMOS Logic levels (COMS 逻辑电平 )

5.0V

3.5V

1.5V

0.0V

A Typical Logic Circuit: 5-Volt Power Supply

( 典型的 5V 电源电压 )

Other Power-Supply Voltages: 3.3 ,2.5 or 1.8Volts

( 其它电源电压: 3.3V ,2.5V或 1.8V)

Logic 1 (High)[ 逻辑 1 (高态) ]

Logic 0 (Low)[ 逻辑 0 (低态) ]

Page 124: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

124

Digital Logic Design and Application ( 数字逻辑设计及应用 )2 、 MOS Transistors (MOS 晶体

管 )Two Types: N-Channel and P-Channel

(分为: N 沟道 和 P沟道 )

Drain ( 漏极 )

Source ( 源极 )

Gate( 栅极 )

Vgs

+

N-Channel (N 沟道 )

Source ( 源极 )

Drain( 漏极 )

Gate( 栅极 )

+

Vgs

P-Channel (P 沟道 )

Page 125: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

125

Digital Logic Design and Application ( 数字逻辑设计及应用 )2 、 MOS Transistors (MOS 晶体

管 )Two Types: N-Channel and P-Channel

(分为: N 沟道 和 P沟道 )

Source ( 源极 )

Drain ( 漏极 )

Gate( 栅极 )

+

Vgs

P-Channel (P 沟道 )

•Usually ( 通常 ) :

Vgs < = 0

• Vgs = 0

Rds Very High

Off ( 截止状态 )

• Vgs Rds

On ( 导通状态 )

Page 126: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

126

Digital Logic Design and Application ( 数字逻辑设计及应用 )

2 、 MOS Transistors (MOS 晶体管 ) The Gate of a MOS transistor has a very high

impedance(阻抗) . [ Over megohm (106 ohms)] [ MOS晶体管栅极阻抗非常高( >兆欧) ] Regardless of gate voltage (无论栅电压如何 ) Almost no current flows from the gate to source, or from

the gate to drain. ( 栅-源、栅-漏之间几乎没有电流 ) ( Leakage (漏出) Current, Less than

microampere (漏电流 , A, 10-6A ) The Gate is Capacitively (容性地) coupled to the source

and drain ( 栅极与源和漏极之间有容性耦合 ) The power need to charge and discharge this

capacitance (电容) on each input signal transition accounts for a nontrivial (非平凡的) portion of a circuit’s power consumption (信号转换时,电容充放电,功耗较大 ).

Page 127: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

127

Digital Logic Design and Application ( 数字逻辑设计及应用 )

MOS 管的基本开关电路

vI

+

vO

+

iD

+ VDD

RD

DG

S

只要电路参数选择合理

输入低,截止,输出高

输入高,导通,输出低

Page 128: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

128

Digital Logic Design and Application ( 数字逻辑设计及应用 )

3 、 Basic CMOS Inverter Circuit( 基本的 CMOS 反相器 )

Functional Behavior

(工作原理 ) 1、 VIN = 0.0V

VGSN = 0.0V,

Tn Off (截止 )VGSP = VIN –VDD = –5.0V,

Tp On (导通 )VOUT VDD = 5.0V

VDD = +5.0V

VOUT

VIN

Tp

Tn

Page 129: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

129

3 、 Basic CMOS Inverter Circuit( 基本的 CMOS 反相器 )

2、 VIN = VDD = 5.0V

VGSN = 5.0V

Tn On (导通 )VGSP = VIN –VDD = 0.0V

Tp Off (截止 )VOUT 0

VDD = +5.0V

VOUT

VIN

Tp

Tn

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 130: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

130130

NOT gate

x01

F10

1

0

F1

x

0

(a)

1

0

F0x

1

(b)When the input is 0 When the input is 1

01

1

0

time

F

x

Page 131: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

131

Digital Logic Design and Application ( 数字逻辑设计及应用 )

4 、 CMOS NAND (CMOS 与非门 ) Functional Behavior

(工作原理 ) :1、 Either Input Low,

(A、 B至少有一个为低 ), Then

Either T1, T3 Off

( T1、 T3至少有一个截止 ) Either T2, T4 On

( T2、 T4至少有一个导通 )Z is High [Z 为高 VDD) ]

VDD = +5.0V

Z

A

B

T1

T2 T4

T3

Page 132: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

132

4 、 CMOS NAND Gate (CMOS 与非门 )

2、 Both Inputs High

(A、 B都为高 ), Then Both T1, T3 On

(T1、 T3都导通 ) Both T2, T4 Off

(T2, T4都截止 ) Z is Low

[ Z 为低( 0V) ]

VDD = +5.0V

Z

A

B

T1

T2 T4

T3

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 133: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

133

5 、 CMOS NOR Gate (CMOS 或非门 )

Functional Behavior (工作原理 ): 1 、 Both Inputs Low

(A、 B都为低 ), Then Both T1、 T3 Off ( T1、 T3都截止 ) Both T2, T4 On ( T2, T4 都导通 ) Z is High

[ Z为高( VDD) ]

VDD = +5.0V

Z

A

B

T1

T2

T4

T3

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 134: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

134

5 、 CMOS NOR Gate (CMOS 或非门 )

Functional Behavior

(工作原理 ): 2 、 Either Input High

(A、 B至少有一个为高 )

Then Either T1、 T3 On

(T1、 T3至少有一个导通 ) Either T2, T4 Off

(T2、 T4至少有一个截止 ) Z is Low

[Z为低( 0V) ]

VDD = +5.0V

Z

A

B

T1

T2

T4

T3

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 135: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

135135

Building Circuits Using Gates

Recall (回想) the motion-in-dark exampleTurn on lamp (F=1) when motion sensed (a=1)

and no light (b=0)F = a AND NOT(b)

Page 136: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

136136

Building Circuits Using Gates

Build using logic gates, AND and NOT, as shown

We just built our first digital circuit!

Page 137: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

137137

Example: Seat Belt Warning Light

System

Design circuit for warning light

Sensorss=1: seat belt

fastened(系紧)k=1: key inserted

Capture Boolean equationseat belt not

fastened, and key inserted

w = NOT(s) AND k

Page 138: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

138138

Example: Seat Belt Warning Light

SystemConvert equation to circuit

Timing diagram illustrates circuit behaviorWe set inputs to any

valuesOutput set

according to circuit

a

a

time

Inputs

Outputs

1

1

1

0

0

0

k

s

w

k

s

w

BeltWarn

Seatbelt

Page 139: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

139139

More examples: Seat belt warning light extensions

Only illuminate (照亮)warning light if person is in the seat (p=1), and seat belt not fastened and key inserted

w = p AND NOT(s) AND k

k

p

s

w

Belt Warn

a

Page 140: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

140140

More examples: Seat belt warning light extensions

a

• Given t=1 for 5 seconds after key inserted.

• Turn on warning light when t=1 (to check that warning lights are working)

• w = (p AND NOT(s) AND k) OR t

a

k

wps

t

Belt Warn

Page 141: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

141

6 、 Fan - In (扇入) The Number of Inputs that a Gate have (门电路所具有的输入端的数目 ) The Additive “on” Resistance of series transistors

limits the Fan – In of CMOS gates. (导通电阻的可加性限制了 CMOS门的扇入数 ) A large number of inputs can be made by cascading

gates with fewer inputs (可用较少输入门级联得到较多的输入 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 142: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

142

7 、 Non-inverting Gates ( 非反相门 )

VDD = +5.0V

A

Z

(Non-inverting buffers)非反相缓冲器

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Add an inverter to the inverse output !

Page 143: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

143

7 、 Non-inverting Gates ( 非反相门 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

AND gate

Page 144: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

144144

AND gate

x0011

y0101

F0001

0

1 1

11

1

1

y

y

F

x

x

(a)

0

0 1

01

0

1

y

y

F

x

x

(b)

When both inputs are 1 When an input is 0

1

0x

y

F1

1

0

0

time

Page 145: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

145145

OR gate

x0011

y0101

F0111

0

1

0

0 1

1

1

y

x

x

y

F

(a)

0

0

0

0 0

0

1

y

x

x

y

F

(b)When an input is 1 When both inputs are 0

10x

y

F1

1

0

0

time

Page 146: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

146

Digital Logic Design and Application ( 数字逻辑设计及应用 )

NAND / NOR

NAND: NMOS serial , PMOS parallel;

NOR: NMOS parallel, PMOS serial;

Page 147: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

147

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Each input control a PMOS and an NMOS;

Logic function (功能) is represented by

NMOS connections :

AND -- series OR -- parallel

PMOS is a duality connection.

NAND / NOR

Page 148: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

148

VDD = +5.0V

A

B

Z

C

D

8 、 CMOS AND-OR-INVERT Gate ( CMOS 与或非门 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

AOI

Page 149: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

149

8 、 CMOS OR-AND-INVERT Gate ( CMOS 或与非门 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

OAI

Page 150: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

150

A Class Problem

Write out the BCD code of 8421 , 2421 , and Excess-3 for the decimal number, then write out the corresponding binary Gray code:

+1247

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 151: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

151

Chapter 3 Digital Circuits

( 数字电路 )

Give a knowledge of the Electrical aspects of Digital Circuits

(介绍数字电路中的电气知识 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 152: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

152

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Review of Chapter 3

Positive Logic and

Negative Logic

(正逻辑和负逻辑 )

Three basic logic

functions: AND,

OR, and NOT

(三种基本逻辑:与、或、非 )

VOUT

VIN

Vcc

R

获得高、低电平的基本原理

Page 153: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

153

Review of Chapter 3 ( 第三章内容回顾 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Three kinds of Description Method

(三种描述方法 ):

Truth Table (真值表 )

Logic Expression (逻辑表达式 )

Logic Circuit (逻辑符号 )

NAND and NOR (与非和或非 )

Page 154: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

154

Review of Chapter 3 ( 第三章内容回顾 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Logic Families: TTL Family and CMOS Family (逻辑系列: TTL 系列 和 CMOS系列 )

CMOS Logic Level (CMOS逻辑电平 )

Drain ( 漏极 )

Source ( 源极 )

Gate( 栅极 )

Vgs

+

Source ( 源极 )

Drain( 漏极 )

Gate( 栅极 )

+

Vgs

P-Channel (P 沟道 )

N-Channel (N 沟道 )

Page 155: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

155

VDD = +5.0V

VOUT

VIN

Tp

Tn

VCC

A

Z

CMOS Inverter (CMOS 反相器 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Review of Chapter 3

Page 156: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

156

VCC

A

Z

CMOS Inverter(CMOS 反相器 )VDD = +5.0V

Z

A

B

CMOS NAND Gate(CMOS 与非门 )

Review of Chapter 3Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 157: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

157

VCC

A

Z

CMOS Inverter(CMOS 反相器 )

VDD = +5.0V

Z

A

B

CMOS NOR Gate (CMOS 或非门 )

Review of Chapter 3

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 158: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

158

VCC

A

Z

CMOS Inverter (CMOS 反相器 )

VDD = +5.0V

A

Z

Non-inverting Gate ( 非反相门 )

Review of Chapter 3

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 159: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

159

The Additive “on” Resistance of series transistors limits the Fan – In of CMOS gates.

(导通电阻的可加性限制了CMOS门的扇入数 )

VDD = +5.0V

Z

A

B

VDD = +5.0V

Z

A

B

Review of Chapter 3Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 160: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

160

Digital Logic Design and Application ( 数字逻辑设计及应用 )

3.4 Electronic Behavior of CMOS Circuits (CMOS 电路的电气特性 )

Logic Voltage

Levels

(逻辑电压电平 )

DC Noise

Margins

(直流噪声容限 )

Fun-Out (扇出 )

物理上的而不是逻辑上的

Page 161: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

161

3.4 Electronic Behavior of CMOS Circuits (CMOS 电路的电气特性 )

Speed, Power

Consumption

(速度、功耗 )

Noise, Electrostatic

Discharge

(噪声、静电放电 )

Open-Drain Outputs,

Three State Outputs (漏极开路输出、三态输出 )

Data Sheet(数据表)

Specifications

( 规格说明 )( Table 3-3

P99 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 162: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

162

3.5 CMOS Steady-State Electrical Behavior (CMOS 稳态电

气特性 )

Logic Levels and Noise Margins

( 逻辑电平和噪声容限 )

VDD = +5.0V

VOUT

VIN

Tp

Tn

VOUT

VIN5.01.5 3.5

5.0

电压传输特性

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 163: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

163

Logic Levels Specifications (逻辑电平规格 )

HIGH ( 高态 )

ABNOMAL

( 不正常状态 )

LOW ( 低态 )VOLmax

VILmax

VIHmin

VOHmin

VCC- 0.1V

地+ 0.1V

0.7VCC

0.3VCC

Digital Logic Design and Application ( 数字逻辑设计及应用 )3.5 CMOS Steady-State

Electrical Behavior (CMOS 稳态电气特性 )

Page 164: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

164

Digital Logic Design and Application ( 数字逻辑设计及应用 )

DC Noise Margin (直流噪声容限)

HIGH ( 高态 )

ABNOMAL

( 不正常状态 )

LOW ( 低态 )VOLmax

VILmax

VIHmin

VOHmin

30%VCC - 0.1V

3.5 CMOS Steady-State Electrical Behavior (CMOS 稳态电

气特性 )

How much noise it takes to corrupt a worse-case output voltage into a value that may not be recognized properly by an input.( 多大的噪声会使最坏输出电压被破坏得不可识别 )

Page 165: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

165

Logic level and noise margin

The input limit : to avoid the noise be amplified!

Page 166: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

166

Digital Logic Design and Application ( 数字逻辑设计及应用 )3.5.2 Circuit Behavior with Resistive Loads ( 带电阻性负载的电

路特性 )

Require nontrivial amounts of current to operate( 要求有一定的驱动电流才能工作 )

VCC

A

Z

VCC

RThev

Rp

Rn VThev

+

VOUTVIN

Page 167: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

167

Digital Logic Design and Application ( 数字逻辑设计及应用 )

VCC = + 5.0V

Rp>1M

Rn

Resistive Loads

( 电阻性负载 )

VOLmax

IOLmax

When the Output in the LOW state

( 输出为低态时 )

VOUT < = VOLmax

The Output sink Current

( 输出端吸收电流 )

The Maximum Current the Output can sink

[ 能吸收的最大电流 IOLmax (灌电流) ]

3.5.2 Circuit Behavior with Resistive Loads ( 带电阻性负载的电

路特性 )

Page 168: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

168

Digital Logic Design and Application ( 数字逻辑设计及应用 )

VCC = + 5.0V

Rp

Rn>1M

Resistive Loads

( 电阻性负载 )

VOHmin

IOHmax

When the Output in the HIGH state

( 输出为高态时 )

VOUT > = VOHmin

The Output Source Current

( 输出端提供电流 )

The Maximum Current the Output can Source

[ 能提供的最大电流 IOHmax (拉电流) ]

3.5.2 Circuit Behavior with Resistive Loads ( 带电阻性负载的电

路特性 )

Page 169: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

169

Digital Logic Design and Application ( 数字逻辑设计及应用 )

VCC = + 5.0V

RThev

VThev +

When the Output in the HIGH state,

Estimate the Source current

( 输出为高态时,估计提供电流 ) :

Thev

ThevCCOUT R

VVI

3.5.2 Circuit Behavior with Resistive Loads ( 带电阻性负载的电

路特性 )

Page 170: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

170

VCC = + 5.0V

RThev

VThev +

When the Output in the LOW state,Estimate the Sink current( 输出为低态时,估计吸收电流 ) :

Thev

ThevOUT R

VI

Digital Logic Design and Application ( 数字逻辑设计及应用 )3.5.2 Circuit Behavior with Resistive Loads ( 带电阻性负载的电

路特性 )

Page 171: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

171

VCC = + 5.0V

400

2.5k

VIN

1.5V

VOUT

4.31V

VCC = + 5.0V

4k

200

VIN

3.5V

VOUT

0.24V

Output voltage away from the power-supply rail (Further

with a resistive load [ 输出电压变坏(有电阻性负载时更差) ]

What’s worse: Output current , Power Consumption (更糟糕的是:输出端电流 ,功耗 )

3.5.3 Circuit Behavior with Non-ideal Inputs ( 非理想输入时的电路特性 )

Page 172: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

172

Digital Logic Design and Application ( 数字逻辑设计及应用 )

3.5.4 Fan-out (扇出) The Number of Inputs that the Gate can drive

without exceeding its worst-case loading specifications.

(在不超出其最坏情况负载规格的条件下, 一个逻辑门能驱动的输入端个数。 ) Fan-out must be examined for both possible

output states, HIGN and LOW (扇出需考虑输出高电平和低电平两种状态 ) Overall Fan-out = Min (HIGH-state and LOW-state

[ 总扇出=min(高态扇出,低态扇出) ] DC Fan-out and AC Fan-out ( 直流扇出 和 交流扇出 )

Page 173: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

173

Digital Logic Design and Application ( 数字逻辑设计及应用 )

74HCT Drives 74LSLOW Fan-Out ( 低态扇出 ):

Fan-out (扇出 )

104.0

4

mA

mA

I

I

IL

OL

HIGH Fan-Out

( 高态扇出 ) :200

20

4

A

mA

I

I

IH

OH

高态剩余驱动能力:

CMOS: 74HCT

IOH = – 4 mA

IOL = 4 mA

IIH = 1 A

IIL = – 1 A

TTL: 74LS

IOH = – 400 A

IOL = 8 mA

IIH = 20 A

IIL = – 0.4 mA

mAAmA 8.32004 总扇出

Page 174: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

174

Digital Logic Design and Application ( 数字逻辑设计及应用 )3.5.5 Effects of Loading ( 负载效

应 )

Loading an Output Beyond its rated Fan-out [ 当输出负载大于它的扇出能力时 ]

Output Voltage become Worse

[ 输出电压变差(不符合逻辑电平的规格) ] Propagation Delay, Rise and Fall time may

Increase

( 传输延迟和转换时间变长 ) Temperature of the device may Increase,

Reducing Reliability, Causing device Failure (温度可能升高,可靠性降低,器件失效 )

Page 175: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

175

Digital Logic Design and Application ( 数字逻辑设计及应用 )

3.5.6 Unused Inputs ( 不用的 CMOS 输入端 )

Never be left Unconnected (or Floating)

( 不用的 CMOS输入端绝不能 悬空 )

X Z

1k

+5V

X ZX

Z

Increase the capacitive

load on the driving signal

and may slow things down.

( 增加了驱动信号的电容负载,使操作变慢 )

Page 176: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

176

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Current Spikes and Decoupling Capacitors ( 电流尖峰和去耦电容器 )

电流传输特性iD

vI12 VDD

VDD = +5.0V

VOUT

VIN

Tp

Tn

Page 177: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

177

Digital Logic Design and Application ( 数字逻辑设计及应用 )

3.6 CMOS Dynamic Electrical Behavior (CMOS 动态电气特性 )

Both the Speed and Power Consumption of a CMOS device depend to a large extent on AC or Dynamic Characteristics of the device and its load

( CMOS器件的速度和功耗在很大程度上取决于器件及其负载的动态特性。 )

Page 178: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

178

3.6 CMOS Dynamic Electrical Behavior (CMOS 动态电气特性 )

Speed depends on two characteristics ( 速度取决于两个特性 ):Transition Time(转换时间)

Propagation Delay(传播延迟)

The amount of Time that the Output of a logic circuit takes to Change from one state to another.( 逻辑电路的输出从一种状态变为另一种状态所需的时间 )

The amount of Time that it takes for a Change in the Input signal to produce a Change in the Output signal.(从输入信号变化到产生输出信号变化所需的时间 )

Figure 3-36

Figure 3-42

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 179: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

179

Digital Logic Design and Application ( 数字逻辑设计及应用 )3.6.1 Transition Time ( 转换时间 )

Rise time (tr) and Fall time (tf ) (上升时间 tr 和 下降时间 tf )The “On” transistor Resistance

( “ ” 晶体管的 导通 电阻 )Stray Capacitance(寄生电容)

VCC = + 5.0V

RL

Rp

Rn VL

+

CL

电容两端电压不能突变“Time-Constant equals

Transition-Time”

( 在实际电路中 , 可用时间常数近似转换时间 )

Page 180: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

180

3.6.2 Propagation Delay ( 传播延迟 )

VIN

VOUT

Signal Path: the electrical path from a particular

input signal to a particular output signal of a

logic element.

( 信号通路:一个特定输入信号到逻辑元件的特定 输出信号所经历的电气通路。 )

Figure 3-42

pLHtpHLt

Page 181: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

181

3.6.3 Power Consumption ( 功率损耗 )

Static Power Dissipation ( 静态功耗 )Dynamic Power Dissipation ( 动态功

耗 ) 两个管子瞬间同时导通产生的功耗 PT

对负载电容充、放电所产生的功耗 PL

PL 与负载电容、输入信号频率、 (VCC ) 2 成正比

PT 与 VCC 的大小、输入波形的好坏、输入信号频率有关

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 182: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

182

第 3 章作业( P175 ~ 181 ) 3.1 (d) (e) (h) 3.2 (d) (e) (h) 3.5 3.9 3.16 3.27 (d) 3.37 理解 3.39 3.42 3.47

计算扇出 3.49 (a) (b) (g) 3.57 (a)

计算直流噪声容限 3.53 3.56 (a)

选做 3.61 3.62 3.83 3.29 (自学 3.5.7)

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 183: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

183

A Class Problem ( 每课一题 )

A 74LS00 has

VOHmin=2.7V, VOLmax=0.5V, VIHmin=2.0V, VILmax=0.8V,

determine the worst-case LOW-state and HIGH-state DC noise margins of the 74LS00.

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 184: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

184

Chapter 3 Digital Circuits ( 数字电路 )

Give a knowledge of the Electrical aspects of Digital Circuits

(介绍数字电路中的电气知识 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 185: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

185

CMOS Steady-State Electrical Behavior

( CMOS 稳态电气特性)

Logic Levels

(逻辑电压电平)

Noise Margin

(噪声容限)

高态

不正常状态

低态VOLmax

VILmax

VIHmin

VOHmin

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Review of Chapter 3

Page 186: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

186

VOUT = 0

VCC = + 5.0V

RThev

VThev +

VCC = + 5.0V

RThev

VThev +

VOUT = 1

Circuit Behavior with Resistive Loads

(带电阻性负载的电路特性)

保证提供或吸收的电流小于门电路的规定值

Output Behavior Get

Worse with a load

( 负载导致输出特性变坏 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 187: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

187

非理想输入时的电路特性输入偏离供电轨道,输出电压变坏

VDD = +5.0V

VOUT

VIN

Tp

Tn

Current Spikes and Decoupling Capacitors

( 电流尖峰和去耦电容器 )

iD

vI12 VDD

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 188: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

188

Fan-Out(扇出)

当输出负载大于它的扇出能力时?? 输出特性变差 电流,功耗 ,温度升高 传输延迟、转换时间变长

Unused Inputs

(不用的 CMOS输入端如何处理?? )

How to Destroy a CMOS Device

(如何毁坏 CMOS器件?(自学) ) 3.5.7

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 189: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

189

3.6 CMOS Dynamic Electrical Behavior

(CMOS 动态电气特性 )

Consider Two Factors: Speed and Power-Consumption

(考虑两个方面:速度、功耗 )

Transition Time

( 转换时间 )

Propagation Delay

( 传播延迟 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 190: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

190

Transition Time ( 转换时间 )

Consider Two Factors

(考虑两个因素 ): “On” Transistor

Resistance

( “ ” 晶体管的 导通 电阻 )

Stray Capacitance

(寄生电容)

VCC = + 5.0V

RL

Rp

Rn VL

+

CL

Figure 3-36Rise Time ( 上升时间 tr )

Fall Time ( 下降时间 tf )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 191: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

191

VCC = + 5.0V

RL

Rp

Rn VL

+

CL

电容两端电压不能突变

When working with

Real digital circuit, the

Transition Time

approximately Equals

the RC time Constant( 在实际电路中可用时间常数近似转换时间 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Transition Time ( 转换时间 )Rise Time ( 上升时间 tr )

Fall Time ( 下降时间 tf )

Page 192: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

192

Propagation Delay ( 传播延迟 )

Figure 3-42

VIN

VOUT

pLHtpHLt

Signal Path: Electical Path from a Particular Input

Signal to a Particular Output Signal of a Logic

Element ( 信号通路:一个特定输入信号到逻辑元件的 特定输出信号所经历的电气通路。 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 193: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

193

Power Consumption ( 功率损耗 )

VDD = +5.0V

VOUT

VIN

Tp

Tn

Static/Quiescent Power Dissipation and Dynamic Power Dissipation( 分为:静态功耗、动态功耗 )

CL

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 194: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

194

Power Consumption ( 功率损耗 )

两个管子瞬间同时导通

产生的功耗 PT

对负载电容充、放电所

产生的功耗 PL

VDD = +5.0V

VOUT

VIN

Tp

Tn

Source of Dynamic Power Dissipation(动态功耗的来源 ):

CL

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 195: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

195

动态功耗的来源:

两个管子瞬间同时导通

产生的功耗 PT

对负载电容充、放电所

产生的功耗 PL

VCC 的大小输入波形的好坏

输入信号频率

负载电容输入信号频率

(VCC ) 2

Digital Logic Design and Application ( 数字逻辑设计及应用 )Power Consumption ( 功率损耗 )

Static/Quiescent Power Dissipation and Dynamic Power Dissipation( 分为:静态功耗、动态功耗 )

Page 196: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

196

Consider Two Factors: (考虑两个方面 ):

Speed (速度 )

Power-Consumption (功耗 )

Transition Time (转换时间)

Propagation Delay (传播延迟)

Static Power Dissipation (静态功耗)

Dynamic Power Dissipation (动态功耗)

Digital Logic Design and Application ( 数字逻辑设计及应用 )3.6 CMOS Dynamic Electrical Behavior

(CMOS 动态电气特性 )

Page 197: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

197

3.7 Other CMOS Input and Output Structures (其他 CMOS 输入输出结构)

3.7.1 Transmission

Gates

( 传输门 )

When EN = 0 , EN_L = 1 , Transistor Off, A,B Off

( 晶体管截止, A 、 B 断开 )

When EN = 1 , EN_L = 0 , Transistor On, A,B On

( 晶体管导通, A 、 B 之间低 阻抗连接 )

双向器件 传播延迟非常短

EN

EN_L

A B

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Figure 3-46

Page 198: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

198

3.7.2 Schmitt-Trigger Inputs( 施密特触发器输入 )

VOUT

VIN

5.02.1 2.9

5.0

Input-Output TransferCharacteristic( 电压传输特性 )

VT+VT-

输入

门限电压

正向 VT+

负向 VT-

Use Feedback Internally( 采用内部反馈,边沿更陡 )

Logic Symbol( 逻辑符号 ) :

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 199: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

199

3.7.2 Schmitt-Trigger Inputs( 施密特触发器输入 )

VOUT

VIN

5.02.1 2.9

5.0

Input-Output TransferCharacteristic( 电压传输特性 )

VT+VT-

Hysteresis: Difference Between the Two Thresholds(滞后:两个门限电压之差 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Logic Symbol( 逻辑符号 ) :

Page 200: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

200

Applications of Schmitt-Trigger

( 施密特触发器的应用 )

波形变换

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 201: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

201

脉冲整形

Digital Logic Design and Application ( 数字逻辑设计及应用 )Applications of Schmitt-Trigger

( 施密特触发器的应用 )

Figure 3-48

Page 202: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

202脉冲鉴幅

Digital Logic Design and Application ( 数字逻辑设计及应用 )Applications of Schmitt-Trigger

( 施密特触发器的应用 )

Page 203: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

203

3.7.3 Three-State Outputs ( 三态输出 )

VCC

OUT

EN

A

When EN=0 , C=1, Tp Off ( 截止 )

B=1, D=0, Tn

Off Hi-Z, High-

Impedance

/Floating State

( 高阻态 / 悬空态)

B

C

D

Tp

Tn

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 204: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

204

3.7.3 Three-State Outputs ( 三态输出 ) VCC

OUT

EN

A

When EN=1 , C=A’ , B=0 ,

D=A’

Output

Controlled by A is

Logic Levels:

High or Low

( 由 A 控制输出为 :

逻辑 0 或 逻辑 1)

B

C

D

Tp

Tn

A

EN

OUT

逻辑符号

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 205: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

205

输出电平??造成逻辑混乱

很大的负载电流同时流过输出级可使门电路损坏

3.7.4 Open-Drain Outputs ( 漏极开路输出 )

VCC

A

Z

Active Pull-Up( 有源上拉 )

VCC

B

低 高

有源上拉的 CMOS 器件其输出端不能直接相联

100

>1M100

>1M

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 206: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

206

A

B

Z

VCC

VCC’

R 上拉电阻 AB Z

逻辑符号

希望尽量小,减少上升时间太小则吸收电流太大

应用:驱动 LED 、线与、 驱动多源总线

Digital Logic Design and Application ( 数字逻辑设计及应用 )

3.7.4 Open-Drain Outputs ( 漏极开路输出 )

Logic Symbol

Page 207: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

207

A

B Z

VCC

VCC

R

C

D

VCC

Z = Z1 · Z2

= (A·B)’ · (C·D)’

= (A·B + C·D)’

Wired Logic of Open-Drain Outputs( 漏极开路输出的线连逻辑 )

Z1

Z2

Wired AND (线与 )

第 4章 反演定理

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 208: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

208

3.10 Bipolar Logic ( 双极逻辑 )

Diode Transfer

Characteristic

(二极管开关特性 )

Thresholds( 门限电

压 )Breakdown( 反向击穿 )

Leakage Current ( 漏电流 )

v

i

VT

I s

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 209: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

209

3.10 Bipolar Logic ( 双极逻辑 )

Diode Transfer

Characteristic

(二极管开关特性 )v

i

VT

I s

Digital Logic Design and Application ( 数字逻辑设计及应用 )

+ Rf VdForward Biased( 正偏(导通) )

+Reverse Biased( 反偏(截止) )

25 0.6V

Page 210: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

210

Diode Logic

(二极管逻辑 )

A

B

D1

D2

R

VCC

Y

0~ 2V Low ( 低电平 ) 0 ( 逻辑 0)

2~ 3V Noise Margin ( 噪声电平) Undefined (未定义 )

3~ 5V High ( 高电平 ) 1 ( 逻辑 1)

Diode AND Gate( 二极管与门 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

3.10 Bipolar Logic ( 双极逻辑 )

Page 211: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

211

Diode Logic

(二极管逻辑 )

A

B

D1

D2

R

VCC

Y

电平偏移:输出和输入的数值不相等 不能直接驱动负载 通常用于集成电路内部的逻辑单元

Diode AND Gate( 二极管与门 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

3.10 Bipolar Logic ( 双极逻辑 )

Page 212: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

212

Bipolar Junction Transistors ( 双极结型晶体管 )

截止区放大区饱和区

Base( 基极 )

Collector( 集电极 )

Emitter发射极

VCC

vo

+

-vi

+

-

RB

RC

iC

Transistor Logic Inverter( 三极管反相器 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 213: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

213

Schottky Transistors ( 肖特基晶体管 )

三极管内部电荷的建立和消散都需要时间

——存储时间(传输延迟的重要部分)

确保晶体管正常工作时不进入深度饱和

利用肖特基二极管 Vd = 0.25V

基极

集电极

发射极

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 214: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

214

Chapter 3 Digital Circuits ( 数字电路 )

Give a knowledge of the Electrical aspects of Digital Circuits

(介绍数字电路中的电气知识 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 215: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

215

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Review of Chapter 3CMOS Steady-State Electrical Behavior

(CMOS 稳态电气特性 )

Logic Voltage Levels and Noise Margins

(逻辑电压电平和噪声容限 )

Circuit Behavior with Resistive Loads

(带电阻性负载的电路特性 )

Non-ideal Inputs, Current Spikes, and Decoupling

Capacitors (非理想输入、电流尖峰和去耦电容器 )

Unused Inputs (不用的 CMOS输入端 )

Page 216: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

216

Review of Chapter 3

Digital Logic Design and Application ( 数字逻辑设计及应用 )

CMOS Dynamic Electrical Behavior (CMOS 动态电气特性 )

• Speed: Transition Time and Propagation Delay ( 速度:转换时间、传播延迟 )• Power Consumption: Static and Dynamic Power Dissipation ( 功耗:静态、动态 )

Page 217: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

217

CMOS Steady-State Electrical Behavior

( CMOS 稳态电气特性)

Logic Levels

(逻辑电压电平)

Noise Margin

(噪声容限)

高态

不正常状态

低态VOLmax

VILmax

VIHmin

VOHmin

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Review of Chapter 3

Page 218: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

218

Review of Chapter 3Digital Logic Design and Application ( 数字逻辑设计及应用 )

其他 CMOS 输入输出结构传输门施密特触发器输入三态输出漏极开路输出

EN

EN_L

A B

AB Z

逻辑符号:A

EN

OUT

高阻态、低态、高态

A

B

Z

VCC

Page 219: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

219

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Review of Chapter 3

二极管开关特性 二极管逻辑

+ Rf Vd正偏(导通)

+反偏(截止)

A

B

D1

D2

R

VCC

Y

电平偏移 不能直接驱动负载

3.9 Bipolar Logic ( 双极逻辑 )

Page 220: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

220

Review of Chapter 3

截止区放大区饱和区

基极base

collector集电极

发射极emitter

VCC

vo

+

-vi

+

-

RB

RC

iC

三极管反相器

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Bipolar Junction Transistors ( 双极结型晶体管 )

Page 221: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

221

Review of Chapter 3

三极管内部电荷的建立和消散都需要时间 —— 存储时间(传输延迟的重要部分)

确保晶体管正常工作时不进入深度饱和利用肖特基二极管

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Schottky Transistors ( 肖特基晶体管 )

基极

集电极

发射极

Page 222: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

222

3.10.3 Transistor-Transistor Logic

( 晶体管-晶体管逻辑 ) TTL NAND Gate Operating Principle ( TTL 与非门工作原理 ) TTL Logic Electrical Behavior ( TTL 逻辑的电气特性 )

Logic Levels and Noise Margins ( 逻辑电平和噪声容限 ) Fan-out, Driving ability, Behavior of Resistive loads ( 扇出、驱动能力、电阻性负载特性 ) Unused Inputs ( 不用的输入端 )

—— TTL 系列 LOW ( 低态 ) : 0.0~ 0.8V

HIGH ( 高态 ) : 2.0~5.0V

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 223: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

223

Additional TTL Gate Types

( 其它 TTL 电路 )

Tri-State output, Open-Collector Gate

( 三态输出、集电极开路 OC 门 )NOR Gate, Non-inverter

( 或非门、非反相门 )

3.10.3 Transistor-Transistor Logic

( 晶体管-晶体管逻辑 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 224: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

224

A

B

Z

VCC = +5V

Q2

Q3Q4

Q5

Q6

D1A

D1B

Push-Pull Output( 推拉式输出 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 225: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

225

Push-Pull Output推拉式输出

二极管与门

输入保护

导通

截止

截止

A

B

Z

VCC = +5V

Q2

Q3Q4

Q5

Q6

D1A

D1B

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 226: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

226

Digital Logic Design and Application ( 数字逻辑设计及应用 )

分相器

二极管与门

输入保护

导通

导通

1.0V

0.7V

A

B

Z

VCC = +5V

Q2

Q3Q4

Q5

Q6

D1A

D1B

Push-Pull Output( 推拉式输出 )

Page 227: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

227

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Logic Families ( 逻辑系列 )

3.8 CMOS Families HC、 HCT High

speed (高速 ) AHC、 AHCT FCT、 FCT-T

3.10.6 TTL Families

H High Speed (高速 )

S Schottkey (肖特基 )

L Low Power

[低功耗( LS) ]

A Advanced (高级 )

( AS、 ALS) F Fast Speed ( 快速 )

7454 FAM nn

Device Marks ( 器件标号 )

对称输出驱动

Page 228: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

228

Digital Logic Design and Application ( 数字逻辑设计及应用 )3.12 CMOS/TTL Interfacing ( 接口 )

Need Consider: Noise Margin, Fan-out,

Capacitance Loads

(需要考虑:噪声容限、扇出、电容负载)

Abnormal

( 不正常状态 )

VOLmax

0.5

VOHmin

2.7VIHmin

2.0VILmax

0.8

TTL

Abnormal

( 不正常状态 )

VOLmax

0.33

VILmax

0.8

VIHmin

2.0

VOHmin

3.84

CMOS

Page 229: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

229

74HCT Drives 74LS

• HIGH: 3.84 – 2.0 = 1.84V

• LOW: | 0.33 – 0.8 | = 0.47V

ABNORMAL

( 不正常状态 )

VOLmax

0.33

VILmax

0.8

VIHmin

2.0

VOHmin

3.84

74HCT

ABNORMAL

( 不正常状态 )

VOLmax

0.5

VOHmin

2.7VIHmin

2.0VILmax

0.8

74LS

74LS Drives 74HCT

• HIGH: 2.7 – 2.0 = 0.7V

• LOW: | 0.5 – 0.8 | = 0.3V

1 、 DC Noise Margin ( 直流噪声容限 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 230: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

230

Digital Logic Design and Application ( 数字逻辑设计及应用 )

74HCT Drives 74LSLOW Fan-Out ( 低态扇出 ):

2 、 Fan-OUT (扇出 )

104.0

4

mA

mA

I

I

IL

OL

HIGH Fan-Out

( 高态扇出 ) :200

20

4

A

mA

I

I

IH

OH

高态剩余驱动能力:

CMOS: 74HCT

IOH = – 4 mA

IOL = 4 mA

IIH = 1 A

IIL = – 1 A

TTL: 74LS

IOH = – 400 A

IOL = 8 mA

IIH = 20 A

IIL = – 0.4 mA

mAAmA 8.32004 总扇出

Page 231: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

231

Digital Logic Design and Application ( 数字逻辑设计及应用 )

2 、 Fan-Out (扇出 )

CMOS: 74HCT

IOH = – 4 mA

IOL = 4 mA

IIH = 1 A

IIL = – 1 A

TTL: 74LS

IOH = – 400 A

IOL = 8 mA

IIH = 20 A

IIL = – 0.4 mA

思考: 74LS(TTL)驱动 74HCT(CMOS) 的情况?

为什么说用 TTL驱动 TTL兼容的 CMOS

输入端几乎不用考虑直流扇出的限制?

表 3-6

表 3-7

表 3-11

Page 232: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

232

Digital Logic Design and Application ( 数字逻辑设计及应用 )3.9 Low-Voltage CMOS Logic and Interfacing ( 低电压 CMOS 逻辑和接口 )

Page 233: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

233

Digital Logic Design and Application ( 数字逻辑设计及应用 )

LVTTL输出可直接驱动 TTL输入端

如果输入是 5V容许的, TTL输出可驱动 LVTTL输入端

如果 LVTTL输出是 5V容许的, TTL和LVTTL三态输出可驱动同一总线

Page 234: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

234

Digital Logic Design and Application ( 数字逻辑设计及应用 )

3.10.9 Emitter-Coupled Logic( 发射极耦合逻辑 ECL)

How to improve speed (如何提高速度 )? —— Preventing Transistor Saturation

(防止晶体管饱和 )

Current - Mode Logic (CML,电流型逻辑 )

Or Emitter-Coupled Logic( ECL, 也称为:发射极耦合)

Page 235: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

235

Digital Logic Design and Application ( 数字逻辑设计及应用 )

LOW Input : 3.6V

VCC = 5.0V

R1300

R2330

IN

OUT1 OUT2

VBB

4.0V

R31.3k

VEE = 0.0V

Q1 Q2

Q2 ON First( 抢先导通 )

Basic CML Circuit ( 基本 CML电路 )

Q1 OFF ( 截止 )

OUT1 = 5.0V

OUT2 = 4.2V

HIGH Output

( 输出高态 )5.0V 4.2V

Page 236: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

236

Digital Logic Design and Application ( 数字逻辑设计及应用 )

HIGH Input

( 输入高态 ) : 4.4V

VCC = 5.0V

R1300

R2330

IN

OUT1 OUT2

VBB

4.0V

R31.3k

VEE = 0.0V

Q1 Q2

Q1 ON First( 抢先导通 )

Q2 OFF ( 截止 )

OUT2 = 5.0V

OUT1 = 4.2V

Low Output

输出低态4.2V 5.0V

Differential Output( 差分输出 )

Basic CML Circuit ( 基本 CML电路 )

Figure 3-77, 3-78

Page 237: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

237

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Differential Output: Determine the Output State by Looking at the Difference between the Output Voltage rather than the Absolute Values. ( 差分输出 : 输出状态由输出电压的差值而不是由绝对值决定 )

Basic CML Circuit ( 基本 CML电路 )

Figure 3-77, 3-78 , 3-79

Differential Input: Input circuits with Two WiresPer Logic Input. ( 差分输入 : 输入电路的每个逻辑输入端使用双线驱动。)

Page 238: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

238

Digital Logic Design and Application ( 数字逻辑设计及应用 )

第 3章 小结正逻辑表示和负逻辑表示三种基本逻辑运算:与、或、非

逻辑表达式、真值表、逻辑符号作为电子开关运用的二极管、双极型晶体管、 MOS场效应管的工作方式

逻辑系列: CMOS系列和 TTL系列CMOS反相器的构成及工作状态分析

Page 239: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

239

Digital Logic Design and Application ( 数字逻辑设计及应用 )

第 3章 小结(续)学习理解逻辑电路的静态、动态特性分析,等价的输入、输出模型 逻辑电压电平 和 噪声容限带电阻负载的电路特性、扇出非理想输入、电流尖峰和去耦电容器不用的 CMOS输入端速度、功耗

Page 240: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

240

Digital Logic Design and Application ( 数字逻辑设计及应用 )

第 3章 小结(续)理解特殊的输入输出结构

CMOS传输门施密特触发输入结构三态输出结构漏极开路 OD输出结构(集电极开路 OC)

了解其他类型逻辑电路: TTL、 ECL了解不同类型、不同工作电压的逻辑电路输入输出逻辑电平以及其间的连接配合

Page 241: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

241

第 3 章作业(三版) 3.1 (a) (d) (f) 3.2 (a) (d) (f) 3.5 3.9 3.14 3.23 (d) 3.36 3.92理解 3.38 3.41 3.46

计算扇出 3.49 (a) (b) 3.57 (a)

计算直流噪声容限 3.53 3.56 (c)

选做 3.61 3.62 3.81 3.28 (自学 3.5.8)

Page 242: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

242

第 3章作业(四版) 3.1 (a) (e) (h) 3.2 (a) (e) (h) 3.5 3.9 3.16 3.27 (d) 3.37 理解 3.39 3.42 3.47

计算扇出 3.49 (a) (b) 3.57 (a)

计算直流噪声容限 3.53 3.56 (a)

选做 3.61 3.62 3.83 3.29 (自学 3.5.7)

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 243: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

243

小论文 在传统半导体 Si材料中(包括教材的说法),电子与空穴的迁移率约为 2~3: 1,这种区别导致 NMOS和 PMOS在导通沟道方电阻上存在差别;若采用相同宽度制作 CMOS器件,会存在上升时间与下降时间差别,存在高电平驱动能力与低电平驱动能力差别;若采用统一驱动能力设计,则会导致与非门和或非门在逻辑面积、延迟时间等参数上的差别。

由于在超大规模数字集成中对超短沟效应和应变硅技术应用导致电子与空穴的迁移率趋于一致,在本课程中,将 2者视为相同。这样可以不用区分与非门 /或非门在逻辑面积、延迟时间等参数上的区别,也将上升时间与下降时间统一归结于信号延迟时间。

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 244: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

244

小论文在本课程讲解中,没有对 NMOS和 PMOS晶体管的性能进行区分。在集成度不够高时,由于电子与空穴迁移率的差别,具有相同驱动能力的PMOS器件面积可能为 NMOS器件面积的 2~3倍,而面积的变化也会导致输入 /输出电容变化,进而影响到延迟时间分析。

现根据课程教材假定为 2倍,则在采用最小设计时,仿照课程的模型,分别分析 N输入的与非门和或非门性能参数与输入端数量的关系,并得出在电路设计中具有指导意义的结论。

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 245: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

245

A Class Problem ( 每课一题 )

Compute the maximum fanout for a TTL output driving multiple TTL inputs. Also indicate how much “excess” driving capability is available in the LOW or HIGH state for each case.

74AS driving 74S 74AS : I(IHMAX)=20UA, I(ILMAX)=-0.5MA I(OHMAX)=-2MA,I(OLMAX)=20MA 74S : I(IHMAX)=50UA, I(ILMAX)=-2MA I(OHMAX)=-1MA,I(OLMAX)=20MA

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 246: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

246

攀登高峰不管水远山长,不管海阔天空,不屈不挠我知道始终有一天,我会到达无穷。

用心、用功,哪怕困苦千万重,无惧、无恐,誓要实现我的美梦。

我知道我的努力,肯定会成功。中华儿女将来始终有一天会登上世界最高峰。

Page 247: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

247

组合逻辑电路的课程设计 1 . 设计一个保险箱用的 4位数字代码锁,该锁有规定的地址代码 A、 B、 C、 D 4个输入端和一个开箱钥匙孔信号 E的输入端,锁的代码由实验者自编。当用钥匙开箱时,如果输入的 4个代码正确,保险箱被打开;否则,电路将发出警报(可用发光二极管亮表示)。

具体要求: 1)写出该组合逻辑电路的分析和设计方法;

2)参考有关资料画出原理图,找出要使用的芯片;

3)列出真值表以验证是否正确; 4)使用 Verilog HDL语言进行仿真。

Page 248: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

248

组合逻辑电路的课程设计

2、试用十按键联动开关、与非门和七位显示数码管设计一个显示 0-- 9的手动记分控制电路。

具体要求: 1)阐述设计思路; 2)列出真值表; 3)画出设计的逻辑图; 4)试用 Verilog HDL对所画电路进行仿真;

5)试设计两种方案完成此项设计。

Page 249: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

249

组合逻辑电路的课程设计 3、使用 74LS283构成 4位二进制全加 \全减器。

具体要求: 1)阐述设计思路; 2)列出真值表; 3)画出设计的逻辑图; 4)试用 Verilog HDL对所画电路进行仿真;

Page 250: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

250

组合逻辑电路的课程设计 4、设计一个多通道数据分时传送系统。 提示:多通道数据分时传送系统原理是,通过数据选择器将并行数据分时一一送出,再通过数据分配器 (用译码器实现 )将接收到的串行数据分配到其各个相应的输出端口,从而恢复原来的并行数据.数据分配器选用 74154,为 4~ 16线译码器,数据选择器选用 74151,为 8选 1数据选择器。

具体要求: 1)阐述设计思路; 2)列出真值表; 3)画出设计的逻辑图; 4)试用 Verilog HDL对所画电路进行仿真;

Page 251: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

251

组合逻辑电路的课程设计 5、自选课题。可以根据自己的兴趣爱好,选择有一定难度的题目。

具体要求: 1)阐述设计思路; 2)列出真值表; 3)画出设计的逻辑图; 4)试用 Verilog HDL对所画电路进行仿真;

Page 252: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

252

Chapter 4 Combinational Logic

Design Principles( 组合逻辑设计原理 )

Basic Logic Algebra

(逻辑代数基础 ) Combinational-Circuit Analysis

(组合电路分析 ) Combinational-Circuit Synthesis

(组合电路综合 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 253: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

253

Review of 4.1 Switching Algebra ( 开关代数内容回顾 )

Basic Axioms and Theorems

(基本公理、定理 )

Duality and Complement (对偶、反演 )Logic Function and their Expression

(逻辑函数及其表示方法 )Truth Table versus Logic Expression

( 真值表 逻辑函数 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 254: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

254

0 0 0 00 0 1 00 1 0 00 1 1 11 0 0 01 0 1 01 1 0 11 1 1 1

A B C F

00010000

F1

= + +

00000010

F2

00000001

F3

Why Minterm Sum ( 为什么是最小项之和 )?

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 255: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

255

0 0 0 00 0 1 10 1 0 10 1 1 01 0 0 11 0 1 11 1 0 11 1 1 0

A B C F

01111111

F1

= · ·

11101111

F2

11111110

F3

Why Maxterm Product ( 为什么是最大项之积 )?

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 256: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

256

Truth Table (真值表 )

Product Term, Sum Term (乘积项、求和项 )

Sum-of-Product Expression (“ ”积之和 表达式 )

Product-of-Sum Expression (“ ”和之积 表达式 )

Canonical Sum and Product (标准和与标准积 )

N-variable Minterm (n 变量最小项 )

N-variable Maxterm (n 变量最大项 )

—— 最小项之和

—— 最大项之积标准和标准积

Standard Representations of Logic Functions ( 逻辑函数的标准表示法 )

Normal Term ( 标准项)

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 257: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

257

逻辑函数的标准表示法(Standard Expression)

真值表乘积项、求和项“ ”积之和 表达式“ ”和之积 表达式标准项( normal term)n 变量最小项n 变量最大项

编号:原变量 1 、反变量 0

编号:原变量 0 、反变量 1

F = A,B,C(1,3,6,7)

G = A,B,C(0,2,4,5)

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 258: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

258

逻辑函数的基本运算相加(或)

相乘(与)

反演

F1 = (A,B,C) ( 1, 5, 7, 9, 13 )

F2 = (A,B,C) ( 2, 6, 9, 13, 15 )

F = F1 + F2

= (A,B,C)(1,2,5,6,7,9,13,15)

F = F1 · F2 = (A,B,C) (9,13)

F1’ = (A,B,C) ( 1, 5, 7, 9, 13 )

= (A,B,C) ( 0,2,3,4,6,8,10,11,12,14,15 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 259: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

259

补充:异或 (XOR) 、同或 (XNOR)

异或 (Exclusive OR)

—— 当两个输入相异时,结果为1 。

同或 (Exclusive NOR)

—— 当两个输入相同时,结果为 1。

F = AB =A’·B+A·B’

F = A⊙B =A·B+A’·B’

A B F

0 0 00 1 11 0 11 1 0

异 或A B F

0 0 10 1 01 0 01 1 1

同 或

AB = (A⊙B)’

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 260: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

260

基本公式 —— 异或 (XOR)

交换律: AB = BA

结合律: A(BC) = (AB)C

分配律: A·(BC) = (A·B)(A·C)

因果互换关系

AB=C AC=B BC=A

ABCD=0 0ABC=D

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 261: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

261

基本公式 —— 异或 (XOR)

变量和常量的关系

AA=0 AA’=1 A0=A

A1=A’

多变量异或运算

—— 结果取决于变量为 1 的个数A0 A1 … An =

1 变量为 1 的个数是奇数

0 变量为 1 的个数是偶数

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 262: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

262

—— 基本公式 同或 (XNOR)

交换律: A B = B A ⊙ ⊙

结合律: A (B C) = (A B) C⊙ ⊙ ⊙ ⊙

不满足分配律: A(B C) ≠ AB AC⊙ ⊙

因果互换关系

A B=C ⊙ A C=B ⊙ B C=A⊙

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 263: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

263

—— 基本公式 同或 (XNOR)

变量和常量的关系

A⊙A=1 A⊙A’=0 A⊙1=A

A⊙0=A’

多变量同或运算

—— 结果取决于变量为 0的个数A0⊙A1⊙ … ⊙An =

1 变量为 0 的个数是偶数

0 变量为 0 的个数是奇数

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 264: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

264

异或 (XOR) 和同或 (XNOR) 的关系

—— 偶数个变量的同或和异或 互反

AB = (A⊙B)’

ABCD = (A⊙B⊙C⊙D)’

—— 奇数个变量的同或和异或 相等

ABC = A⊙B⊙C

AB’ = A⊙B AB = A⊙B’

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 265: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

265

4.2 Combinational-Circuit Analysis( 组合电路分析 )

分析的目的:确定给定电路的逻辑功能

A

B F

A’

B’

(A’·B’)’

(A·B)’

F = [ (A’·B’)’ · (A·B)’ ]’= A’·B’ + A·B = AB

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 266: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

266

分析步骤:

由输入到输出逐级写出逻辑函数表达式

对输出逻辑函数表达式进行化简

(列真值表或画波形图)

判断逻辑功能

4.2 Combinational-Circuit Analysis( 组合电路分析 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 267: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

267

Minimize Logic function( 化简逻辑函数 )

什么是最简公式法化简卡诺图化简

项数 (Terms) 最少 每项中的变量数(Literals) 最少

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 268: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

268

Formula Minimization( 公式法化简 )

并项法: 利用 A·B+A·B’=A·(B+B’)=A

吸收法: 利用 A+A·B=A·(1+B)=A

消项法: 利用 A·B+A’·C+B·C =

A·B+A’·C

消因子法:利用 A+A’·B = A+B

配项法: 利用 A+A=A A+A’=1

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 269: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

269

公式法化简——并项法

= B’ + C·D

= A

= B · ( C’ + C )

利 用A·B+A·B’=

A

F1 = A·(B·C’·D)’ + A·B·C’D

F2 = A·B’ + A·C·D + A’·B’ + A’·C·D

F3 = B·C’·D + B·C·D’ + B·C·D + B·C’·D’

= A·[ (B·C’·D)’ + B·C’·D ]

= B · ( C’·D + C·D’ + C·D + C’·D’ )

= B

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 270: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

270

[ X’ · Y’ ]’ = X + Y

公式法化简——吸收法

利 用A+A·B =

A

F1 = (A’·B+C)·A·B·D + A·D

= A·D·[ 1 + B·(…) ]

F2 = A·B + A·B·C’ + A·B·D + A·B·C·D’

= A·B·( 1 + C’ + D + C·D’ )= A·B

F3 = A + [A’·(B·C)’]’·[A’+(B’·C’+D’)’] + B·C

[A’·(B·C)’]’

= A + B·C= A + (A+B·C)·[ … ] + B·C

= A+BC

= A·D

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 271: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

271

公式法化简——消项法利用: A·B + A’·C + B·C = A·B + A’·C

Y1 = A·C + A·B’ + B’·C’= A·C + B’·C’

Y2 = A·B’·C·D’ + (A’+B)·E + C·D’·E A’ + B

= [(A’+B)’]’

= (A·B’)’

= (A·B’)·C·D’ + (A·B’)’·E + C·D’·E

= (A·B’)·C·D’ + (A·B’)’·E

Y3 = A·B’ + B·C’ + C·D’ + D·A’ + A·C’ + A’·C

= A·B’ + B·C’ + C·D’ + D·A’

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 272: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

272

公式法化简——消因子法

利用 A + A’·B = A + B

Y1 = A·B’·C’·D + (A·B’·C’)’

= D + (A·B’·C’)’

Y2 = A + A’·C·D + A’·B·C’

= A + A’·(C·D + B·C’)= A + C·D + B·C’

Y3 = A·C + A’·D + C’·D

= A·C + (A’+C’)·D= A·C + (A·C)’·D = A·C + D

= A’+B+C+D

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 273: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

273

公式法化简——配项法

利用 A+A=A; A+A’=1

Y1 = A’·B·C’ + A’·B·C + A·B·C

= A’·B·C’ + A’·B·C + A’·B·C + A·B·C= A’·B + B·C

Y2 = A·B’ + A’·B + B·C’ + B’·C

= A·B’ + A’·B·(C+C’) + B·C’ +B’·C·(A+A’)

= A·B’ + A’·B·C + A’·B·C’ + B·C’ + A·B’·C + A’·B’·C

= A·B’ + A’·C+ B·C’

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 274: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

274

公式法化简——举例

F1 = A·B’(C+D) +B·C’ + A’·B’+A’·C+BC+B’C’D’

F2 = A·B + AC’ +B’·C+BC’+B’D+BD’+ADE(H+G)

F3 = A·B’ + A’·B + B·C’ + B’·C

F4 = A·(A+B)(A’ +C)(B+D)(A’ +C+E+F)(B’+F) (D+E+F)

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 275: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

275

第 4 章作业( P232 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

4.23 4.24 4.25 4.30 4.34 4.37

Page 276: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

276

A Class Problem

Minimize the Logic Function With Formula Mathod

Y=AC+B’C+BD’+CD’+A(B+C’)+

A’BCD’+AB’DE

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 277: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

277

Chapter 4 Combinational Logic

Design Principles( 组合逻辑设计原理 )

Basic Logic Algebra

(逻辑代数基础 ) Combinational-Circuit Analysis

(组合电路分析 ) Combinational-Circuit Synthesis

(组合电路综合 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 278: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

278

Review of Switching Algebra ( 开关代数内容回顾 )

补充:同或 (XNOR)、异或( XOR)

A0 A1 … An =

1 1 的个数是奇数 (odd number)

0 1 的个数是偶数 (even number)

A0 ⊙ A1 ⊙ … ⊙ An =

1 0 的个数是偶数0 0 的个数是奇数

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 279: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

279

Review of Switching Algebra ( 开关代数内容回顾 )

补充:同或、异或AB

Y

=AB

Y

=1AB

Y

AB Y

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 280: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

280

Formula Minimization( 公式法化简 )

并项法: 利用 A·B+A·B’=A·(B+B’)=A

吸收法: 利用 A+A·B=A·(1+B)=A

消项法: 利用 A·B+A’·C+B·C =

A·B+A’·C

消因子法:利用 A+A’·B = A+B

配项法: 利用 A+A=A A+A’=1

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 281: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

281

4.2 Combinational-Circuit Analysis

( 组合电路分析 )

Get the Logic Expression or Truth Table from Logic Circuit

(由逻辑电路图得出逻辑表达式或真值表 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 282: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

282

Exhausting Way ( 穷举法 )

(图 4- 10)将全部输入组合加到输入端;根据基本逻辑关系,从输入端到输出端,写出每一级门的输出;

根据最后输出结果列出真值表;

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 283: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

283

Algebra Way ( 代数法 )

(图 4-11, 12, 13, 14, 15, 16, 17)

从输入端到输出端,逐级写出每一级门的输出逻辑式;

及时利用基本定理对逻辑式化简;由最后输出端得到输出函数式;

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 284: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

284

Minimize Logic Function ( 化简逻辑函数 )

什么是最简 项数最少 每项中的变量数最少公式法化简

卡诺图化简 卡诺图表示逻辑函数 卡诺图的特点 合并最小项(化简)

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 285: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

285

Karnaugh Maps( 卡诺图表示逻辑函数 )

—— 真值表的图形表示

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 286: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

286

Karnaugh Maps( 卡诺图表示逻辑函数 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

The coordinates are ordered in Gray codes;

Each cell differs from its neighbors in only

one variable!

Page 287: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

287

Karnaugh Maps( 卡诺图表示逻辑函数 )

YX

0 1

0

1

m0 m2

m1 m3

m0 m2 m6 m4

m1 m3 m7 m5

—— 真值表的图形表示

Z

XY00 01 11 10

0

1

YZ

WX00

00

01

11

10

01 11 10

0 4 12

1 5 13 9

3 7 15

2 6 14 10

8

11

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 288: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

288

Karnaugh Maps( 卡诺图表示逻辑函数 )

0 0 0 10 0 1 00 1 0 00 1 1 11 0 0 01 0 1 11 1 0 11 1 1 0

A B C F F = (A,B,C)(0,3,5,6)

1 0 1 0

0 1 0 1

C

AB00 01 11 10

0

1

例:填写下面两个函数的卡诺图 F1 = (A,B,C) (1,3,5,7)

F2(A,B,C) = A·C’+B·C·D’+B

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 289: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

289

卡诺图的特点逻辑相邻性:

相邻两方格只有一个因子互为反变量合并最小项

两个最小项相邻可消去一个因子四个最小项相邻可消去两个因子八个最小项相邻可消去三个因子2n个最小项相邻可消去 n个因子

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 290: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

290

两个最小项相邻 可消去一个因子

1 1 1

1 1 1

Z

XY00 01 11 10

0

1

YZ

WX00

00

01

11

10

01 11 10

1

11

1

1

11

1X·Y·Z’+ X·Y·Z = X·Y

X’·Y’·Z + X·Y’·Z = Y’·Z

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 291: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

291

ABCD

00 01 11 10

00

01

11

10

1

1

11

1

1

1

1

1

1

1

1

1

1

ABCD+ABCD+ABCD+ABCD

= ABD + ABD = BD

四个最小项相邻 可消去二个因子

Z

XY00 01 11 10

0

1

1 1 1 1

1 1 1 1

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 292: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

292

AB

CD00 01 11 10

00

01

11

10

1

1

1

1

1

1

1

1

1

1

1

1

0

0

0

0

A

D’

八个最小项相邻 可消去三个因子

F1 = A·B·C+A·B·D+A·C’·D+C’·D’+A·B’·C+A’·C·D’

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 293: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

293

Karnaugh Maps Minimization( 卡诺图化简 )

化简函数: F2 = (A,B,C,D) ( 0, 2, 3, 5, 7, 8, 10, 11, 13)

AB

CD00 01 11 10

00

01

11

10A’·B·D

B·C’·D

B’·C

B’·D’

1

1

1

1

1

1

1 1

1

1 、填图2 、圈组

3 、读图,得到结果F2 = A’·B·D+B·C’·D+B’·C+B’·D’

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 294: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

294

卡诺图化简步骤填写卡诺图

可以先将函数化为最小项之和的形式圈组:找出可以合并的最小项

组 (圈 ) 数最少、每组 (圈 )包含的方块数最多方格可重复使用,但至少有一个未被其它组圈过

读图:写出化简后的乘积项消掉既能为 0也能为 1 的变量保留始终为 0 或 1 的变量

乘积项:0 反变量1 原变量

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 295: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

295

圈组原则圈 1 “ ” ‘,得化简 与或式 --所有的 1’必须圈定圈 0 “ ” ‘,得化简 或与式 --所有的 0’必须圈定每个圈中 0或 1 的个数为 2i 个 a. 首先,保证圈组数最少 b. 其次,圈组范围尽量大 c. 每个圈组至少要有一个 1或 0未被其他组圈过

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 296: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

296

圈组步骤先圈孤立的 1格( 0格)再圈只能按一个方向合并的分组--圈子尽量大

其余可任意方向合并将每个圈组写成与项(或项),再进行逻辑加(乘)

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 297: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

297

卡诺图法化简——举例

F1 = (A,B,C,D) ( 0, 3, 4, 5, 6, 7, 9, 12, 14, 15)

F2 = (A,B,C,D) ( 1, 5, 6, 7, 11, 12, 13, 15)

F3 = (A,B,C,D) ( 0, 1, 3, 4, 5, 7)

F4 = (A,B,C,D) ( 1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14)

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 298: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

298298

K-maps for Variables

5 and 6 variable maps existBut hard to use

Two-variable maps existBut not very useful

– easy to do algebraically by hand

0 1

01

Fz

y

Page 299: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

299

Several Concepts ( 几 个 概 念 ) A logic function P(X1,…,Xn) implies a logic

function F(X1,…,Xn) if for every input

combination such that P=1,then F=1 also.

(对于逻辑函数 P(X1,…,Xn) 和 F(X1,…,Xn) ,若对任何使 P=1 的输入组合,也能使 F 为 1 ,则称 P隐含 F ,或者 F包含 P。 )

P1(A,B,C) = A·B·C’

F(A,B,C) = A·B + B’·C

P2(A,B,C) = B’·C

P = A,B,C (1,3,6)

F = A,B,C

(1,3,5,6,7)

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 300: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

300

Several Concepts ( 几 个 概 念 ) A prime implicant of a logic function F(X1,

…,Xn) is a product term P(X1,…,Xn) that inplies F,

such that if any variable is removed from P, then

the resulting product term does not imply F.

( 逻辑函数 F(X1,…,Xn) 的主蕴含项 是隐含 F 的乘积项 P(X1,…,Xn) ,如果从 P 中移去任何变量,则所得的乘积项不隐含 F。 )

F(A,B,C) = A·B·C + B·C + A·C’ = B·C + A·C’

主蕴含项定理:最小和是主蕴含项之和

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 301: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

301

Several Concepts ( 几 个 概 念 )

蕴含项( implicant) :只包含 1的一个矩形圈;

主蕴含项( prime implicant) :扩展到最大的蕴含项;

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 302: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

302

Several Concepts ( 几 个 概 念 )

Distinguished 1-cell

( “ 奇异 1 ” 单元 )

An input combination

that is covered by only

one prime inplicant

(仅被单一主蕴含项覆盖的输入组合 )

没有可能被重复“圈”过的 1 单元

AB

CD00 01 11 10

00

01

11

10

1

1

1

11

1

1

1

1

1

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 303: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

303

Several Concepts ( 几 个 概 念 )Essential Prime

Implicant ( 质主蕴含项 )

A prime implicant that

covers one or more

distinguished 1-cell

(覆盖 1 “个或多个奇异 1”单元的主蕴含项 )

AB

CD00 01 11 10

00

01

11

10

1

1

1

11

1

1

1

1

1

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 304: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

304

Several Concepts ( 几 个 概 念 )

ABCD

00 01 11 10

00

01

11

10

11

1

1

1

1

1

1

“ 奇异 1 ” 单元仅被单一主蕴含项覆盖的输入组合

质主蕴含项覆盖 1 个或多个奇异“ 1”单元的主蕴含项圈组时应从合并奇异“ 1”单元开始

Digital Logic Design and Application ( 数字逻辑设计及应用 )

Page 305: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

305

第 4 章作业( P231 )

Digital Logic Design and Application ( 数字逻辑设计及应用 )

4.14 (a)(e) 4.15 (b)(c) 4.39 4.42 4.43 4.47 (a)(b)(c)

Page 306: Chapter  4    Combinational Logic Design Principles ( 组合逻辑设计原理 )

306

A Class Problem ( 每课一题 )

将下列函数化为最简与或函数式

Y(A,B,C,D) =∑( 2, 3, 7, 8, 11, 14)

给定约束条件为 0151050 mmmm

Digital Logic Design and Application ( 数字逻辑设计及应用 )