
Multi-level gate circuits#
- 如何決定 level 數:
- Gate input number & Delay determine level
- Factoring to accomplish different level
- AND-OR: 2-level SOP
- OR-AND: 2-level POS
- OR-AND-OR: 3-level circuit of AND and OR → no particular ordering
- 4 level gates: Z=(AB+C)(FG+D+E)+H

- 3 level gates: (case fan out) AB(D+E)+C(D+E)+ABFG+CFG+H
- Factoring 可變成 4-level (AB+C)(D+E+FG)+H

- level & gate & gate inputs 的關係會隨之變化,可根據電路設計的需求改變
- 範例:

- f(a,b,c,d)=∑(1,5,6,10,13,14)f=(c+d)(a’+b+c)(c’+d’)(a+b+c’)f=[c+d(a’+b)][c’+d’(a+b)]f=(c+a’d+bd)(c’+ad’+bd’)f=a’c’d+bc’d+bcd’+acd’f=c’d(a’+b)+cd’(a+b)2 levels4 levels3 levels2 levels3 levels5 gates7 gates7 gates5 gates5 gates14 gate inputs14 gate inputs16 gate inputs16 gate inputs12 gate inputs
- 0001111000m0m1m3m201m4m5m7m611m12m13m15m1410m8m9m11m10→0001111000101111111101
- c’d’c’dcdcd’a’b’1a’b11ab11ab’1=a’c’d+bc’d+bcd’+acd’=(a’+b)c’d+(a+b)cd’=(c’d’+ab’c’+cd+a’b’c)’=(c+d)(a’+b+c)(c’+d’)(a+b+c’)=[c+d(a’+b)][c’+d’(a+b)]=(c+a’d+bd)(c’+ad’+bd’)
NAND and NOR gates#
NAND#
- 符號

- 真值表
A0011B0101AB0001AB1110 - 布林表達式:
F=(ABC)’=A’+B’+C’
NOR#
- 符號

- 真值表
A0011B0101AB0111AB1000 - 布林表達式:
- F=(A+B+C)’=A’B’C’
Functionally Complete Sets of Gates#
- 定義:當所有的布林式皆可以被這組邏輯閘組合而成,則這組邏輯閘為 Functionally Complete
- {AND, OR, NOT}
- {AND, NOT}→OR=X+Y=(X’Y’)’
- {OR, NOT}→AND=XY=(X’+Y’)’
- {NAND}
- {NOR}
- {3-input Minority Gate}
Majority Gate and Minority Gate#
- 真值表
A00001111B00110011C01010101FM00010111Fm11101000- (0, B, C)→Minority Gate=NAND=(BC)’=B’+C’
- (1, B, C)→Minority Gate=NOR=(B+C)’=B’C’
- (A, A, A)→Minority Gate=NOT=A’
- (0, B’, C’)→Minority Gate=AND=BC
- (1, B’, C’)→Minority Gate=OR=B+C
2-level NAND and NOR gates#
DeMorgon’s Law#
- 等效邏輯閘:

- (A+B)’=A’B’
- (AB)’=A’+B’
- A+B=(A’B’)’
- AB=(A’+B’)’
- Ex1: AND/OR→NAND/NAND
- Ex2: AND/OR→NOR/NOR
Multi-level NAND and NOR circuits#
- Multi-level NAND and NOR circuits

- to NAND gate

- to NOR gate

Multi-output circuit realization#

- 實際一個多工器(multiplexer)內的電路實現,可以用 fan out 的方式達到最佳化。
- 整體最佳不一定代表個別都為最佳。
- 實作1:
- F1(A,B,C,D)=∑m(11,12,13,14,15)=AB+ACDF2(A,B,C,D)=∑m(3,7,11,12,13,15)=ABC’+CDF3(A,B,C,D)=∑m(3,7,12,13,14,15)=A’CD+AB
- F1000111100001111111101F20001111000101111111101F30001111000101111111110
9 Gates, 21 Gate inputs→7 Gates, 18 Gate inputs
- Share AB(fan out)
- A’CD+ACD=CD
- F1(A,B,C,D)=AB+ACDF2(A,B,C,D)=ABC’+ACD+A’CDF3(A,B,C,D)=A’CD+AB{AB,A’CD,ACD,ABC’}

- 實作2:
- f1=∑m(2,3,5,7,8,9,10,11,13,15)=bd+b’c+ab’f2=∑m(2,3,5,6,7,10,11,14,15)=a’bd+cf3=∑m(6,7,8,9,13,14,15)=bc+ab’c’+abd→10 Gates, 25 Gate inputs
- f100011110001101111111101111f20001111000110111111111011f300011110000111111111011
- (1) b’c+bc=c(2) a’bd+abd=bd用{b’c,bc,a’bd,abd,ab’c’}組合上例
- f1=b’c+(abd+a’bd)+ab’c’f2=(b’c+bc)+a’bdf3=bc+abd+ab’c’{b’c,bc,abd,a’bd,ab’c’}→8 Gates, 23 Gate inputs
- 實作3:
- f1=∑m(1,5,9,13,15)=c’d+abdf2=∑m(4,6,12,14,15)=bd’+abc→6 Gates, 14 Gate inputs
- f1000111100010111111101f2000111100001111111110
- 使上面兩式共用 abcd
- f1=c’d+abcdf2=bd’+abcd→5 Gates, 12 Gate inputs
- 實作4:
- f1=∑m(0,3,4,5,6,14)=a’c’d’+a’bc’+a’cd’+bcd’f2=∑m(0,1,4,6,8,10)=a’c’d’+bc’d’+a’b’c’+bcd’→8 Gates, 26 Gate inputs
- f10001111000110111111110f10001111000110111111110
- 不 combine 各自做最佳化
- f1=a’d’+a’bc’+bcd’f2=a’b’c’+bd’→7 Gates, 18 Gate Inputs
多輸出電路的基本質函項#
- 參考實作3,若基本質函項可通過多工器中其他的輸入共用的話,則對多輸出電路而言並非基本質函項(Essential prime terms)。
- 參考實作4,a’d’(m2),a’bc’(m5),a’b’c’(m1),bd’(m12)皆為基本質函項。
- 一般而言,不會為了共享而把基本質函項拆開。
和項共用(Shared by sum terms)#

- 真值表
a0000000011111111b0000111100001111c0011001100110011d0101010101010101w0000011111XXXXXXx0111100001XXXXXXy1001100110XXXXXXz1010101010XXXXXX0123456789 - k-map
w00011110000111111XXXX1011XXx000111100011101111XXXX101XXy000111100011011111XXXX101XXz000111100011011111XXXX101XX - w=a+bc+bd=a+b(c+d)x=bc’d’+b’d+b’c=bc’d’+b’(c+d)y=c’d’+cdz=d′
- Sum terms 也可以 share
- Multi-output circuits 也可以只用 NAND/NOR 表示
Multi-Output NAND/NOR circuits#
- 範例

- to NAND

- to NOR
