一、 針對一個只有兩個可能事件 (x1,x2) 的系統,其機率分別為 (P(x1),P(x2)) 計算當 (P(x1),P(x2)) 分別為 : (0, 1) 、 (0.1, 0.9) 、 (0.2, 0.8) 、 (0.3, 0.7) 、 (0.4, 0.6) 、 (0.5, 0.5) 、 (0.6, 0.4) 、 (0.7, 0.3) 、 (0.8, 0.2) 、 (0.9, 0.1) 、 (1, 0) 的熵值, (a) 以 P(x1) 為橫軸、熵值為縱軸,使用這 10 個熵值畫一近似曲線圖。 (b) 以 P(x2) 為橫軸、熵值為縱軸,使用這 10 個熵值畫一近似曲線圖。 Fig. 1Fig. 2 (a)(b) IdP(X1)P(X2)Entropy Table 1
二、 翻譯以下內容為中文: We will make two additional assumptions to further simplify our specification. First, we will design our machine so it does not give change. A customer who pays with two dimes will lose the five extra cents! Second, we will expect our machine to be reset before each new use. 我們將做出兩個額外的假設,以進一步簡化我們的規格。首先,我們將為我們的機器設計 成不找零錢。一位顧客用兩個硬幣 ( 20 cents ) 支付將會失去額外的 5 cents !第二,我們將要 求我們的機器在每一位新顧客使用之前進行重置。
三、 Design a 3-bit cyclic counter with sequences 0,2,4,5,6,7 (a)Use D FFs and draw the resultant circuit (b)Use T FFs and draw the resultant circuit (c)Use J-K FFs and draw the resultant circuit (d)Draw the complete state diagram for the circuit in (a),(b),(c) (e)In (a), is the circuit self-starting? (a) CBADCDBDA XXX XXX CB A 0111 XX01 CB A 1010 XX01 CB A 0011 XX00 DC = BA’ + CB’ DB = C’B’ + B’A + CBA’ DA = CA’
DC = BA’ + CB’DB = C’B’ + B’A + CBA’ DA = CA’ DQ CLKQ DQ CLKQ DQ CLKQ Count DCDB DA C \C \B \A BA
(b) Use T FFs and draw the resultant circuit CBATCTBTA XXX XXX CB A 0100 XX10 TC = C’B + BA CB A 1100 XX11 TB = C’ + A CB A 0011 XX11 TA = C
TQ CLKQ TQ CLKQ TQ CLKQ Count TCTB C C \C \B \A BA TC = C’B + BATB = C’ + A TA = C
(c) Use J-K FFs and draw the resultant circuit CBAJC KCJB KBJA KA 0000 X1 X0 X 001X XX XX X 0101 XX 10 X 011X XX XX X 100X 00 X1 X 101X 01 XX 1 110X 0X 01 X 111X 1X 1X 1
CB A XX00 XX10 KC = BA CB A X10X XX1X KB = C’ + A CB A XXXX XX11 KA = CB A 01XX XXXX JC = B CB A 1XX0 XXX1 JB = C’ + A CB A 0011 XXXX JA = C
JQ K CLKQ JQ K CLKQ JQ K CLKQ Count BJB C C \C \B \A BA KCKB KC = BAKB = C’ + AKA = 1 JC = BJB = C’ + AJA = C +
(a)CBADCDBDA XXX XXX CB A 0111 X 0X 001 CB A 1010 X 1X 001 CB A 0011 X 0X 000 DC = BA’ + CB’ DB = C’B’ + B’A DA = CA’ CBADCDBDA … (d)Draw the complete state diagram for the circuit in (a),(b),(c)
(b) CBATCTBTA XXX XXX CB A 0100 X 0X 110 TC = C’B + BA CB A 1100 X 1X 111 TB = C’ + A CB A 0011 X 0X 011 TA = C CBATCTBTA …
(c) CBAJC KCJB KBJA KA 0000 X1 X0 X 001X XX XX X 0101 XX 10 X 011X XX XX X 100X 00 X1 X 101X 01 XX 1 110X 0X 01 X 111X 1X 1X 1 CBAJC KCJB KBJA KA 0000 X1 X0 X XX 10 X X 00 X1 X…
CB A XX00 X 0 X 110 KC = BA CB A X10X X 1 X 1 1X KB = C’ + A CB A XXXX X 1 X 1 11 KA = CB A 01XX X 0X 1XX JC = B CB A 1XX0 X 1 X 1X1 JB = C’ + A CB A 0011 X 0 X 0 XX JA = C
(e)In (a), is the circuit self-starting? YES
四、 Design a counter running at normal sequence of 0, 2, 3, 5, 6 (a) Use J-K flip-flops by directing all illegal states to state 5 (b) Use D flip-flops by directing all illegal states to state 5 (c) Use T flip-flops by directing all illegal states to state 5 (a) CBAJC KCJB KBJA KA 0000 X1 X0 X 0011 X0 XX XX 01 X 0111 XX 1X 0 100X 00 X1 X 101X 01 XX 1 110X 1X 10 X 111X 0X 1X 0
CB A XX10 XX00 KC = BA’ CB A X01X X11X KB = C + A CB A XXXX 0100 KA = C’B CB A 00XX 11XX JC = A CB A 1XX0 0XX1 JB = C’A’ + CA CB A 0101 XXXX JA = C’B + CB’
JQ K CLKQ JQ K CLKQ JQ K CLKQ Count A JB JA C \C \B \A BA KCKB KC = BA’KB = C + AKA = C’B JC = AJB = C’A’ + CAJA = C’B + CB’ KA
(b) Use D flip-flops by directing all illegal states to state 5 CBADCDBDA CB A CB A CB A DC = A + CB’ DB = CB’A + C’A’ DA = C’B + C’A + BA + CB’A’
DC = A + CB’DB = CB’A + C’A’DA = C’B + C’A + BA + CB’A’ DQ CLKQ DQ CLKQ DQ CLKQ Count DCDB DA C \C \B \A BA
(c) Use T flip-flops by directing all illegal states to state 5 CBATCTBTA CB A TC = C’A + CBA’ CB A TB = C’B’A’ + BA + CB + CA CB A TA = C’BA’ + CB’
TQ CLKQ TQ CLKQ TQ CLKQ Count TCTB TA C \C \B \A BA TC = C’A + CBA’ TB = C’B’A’ + BA + CB + CA TA = C’BA’ + CB’
六、 Complete the waveforms of Q1 and Q2
六、 Design a 5:32 decoder, using some 3:8 decoders and a 2:4 decoder 5:32 decoder 1x2:4 decoder 4x3:8 decoders 0A'B'C'D'E' S2 3:8 DEC S1S0 AB S1 2:4 DEC S0 F 0 1 2A'BC'DE' S2 3:8 DEC S1S0 E CD 0AB'C'D'E' AB'CDE 3:8 DEC ABCDE E CD S2S1S0S2 3:8 DEC S1S0
七、 Minimize the number of states for the three-bit sequence (010 or 110) detector. Input: X = {0, 1}, Output: Z = {0, 1} S0S0 S1S1 S2S2 S3S3 S4S4 S5S5 S6S6 Reset/0 0/0 1/0 0/0 1/0 0/11/0 0/0 1/0 0/1 1/0
Input Sequence Reset 0 or 1 00 or or 11 Present State S0S0 S1’S1’ S3’S3’ S4’S4’ X=0 S1’S1’ S3’S3’ S0S0 S0S0 X=1 S1’S1’ S4’S4’ S0S0 S0S0 X= X= Next StateOutput S1’S1’ S0S0 S3’S3’ S4’S4’ 0,1/0 0/0 1/0 0/0 0/1 1/0 Reset/0
八、 Draw a state diagram for an odd parity checker using Moor machine S 0 / Reset S 1 /1
九、 Draw a state diagram for an odd parity checker using Mealy machine S0S0 S1S1 0/0 1/1 0/1 1/0 Reset/0
十、 Draw a state diagram for a vending machine using Moor machine, given that (i) Release item after 15 cents are deposited. (ii) Single coin slot for dimes, nickels. (iii) No change. 0¢ [0] 10¢ [0] 5¢ [0] 15¢ [1] N’ D’ + Reset D D N N+D N N’ D’ Reset’ N’ D’ Reset D : dimes N : nickels
Good Luck to your Final Exam!