1 / 45

計算機概論

計算機概論. 第 6 章 數位邏輯設計. 6-1  邏輯電路 (Logic Circuit). 兩個二元變數 X 、 Y 進行相加的結果, SUM 代表和, CARRY 代表進位. SUM = ((NOT X) AND Y) OR (X AND (NOT Y)) = (X ’ * Y) + (X * Y ’ ) CARRY = X AND Y = X * Y. 6-2 布林代數 (Boolean Algebra). 值為 0 或 1 的二元變數 (binary variable) 值為 0 或 1 的常數 (constant)

nuwa
Download Presentation

計算機概論

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 計算機概論 第6章 數位邏輯設計

  2. 6-1 邏輯電路(Logic Circuit) 兩個二元變數X、Y進行相加的結果,SUM 代表和,CARRY代表進位

  3. SUM = ((NOT X) AND Y) OR (X AND (NOT Y)) = (X’ * Y) + (X * Y’) CARRY = X AND Y = X * Y

  4. 6-2 布林代數 (Boolean Algebra) • 值為0或1的二元變數 (binary variable) • 值為0或1的常數 (constant) • AND、OR、NOT運算子 (operator) • (、)、[、]、{、} 等括號 • = 等號

  5. 舉例來說,假設有個布林函數F(X, Y, Z) = XYZ’ + (X’Z’)(Y + Z),且X = 1、Y = 1、Z = 0,則運算過程如下: F(X, Y, Z) = XYZ’ + (X’Z’)(Y + Z) = X * Y * Z’ + (X’ * Z’) * (Y + Z) = 1 * 1 * 0’ + (1’ * 0’) * (1 + 0) = 1 * 1 * 1 + (0 * 1) * (1 + 0) = 1 + 0 * 1 = 1 + 0 = 1

  6. 欄數為二元變數的個數,加上一個存放結果的欄位,故有n+1欄。欄數為二元變數的個數,加上一個存放結果的欄位,故有n+1欄。 每個二元變數有0、1兩種值,所以n 個二元變數會有 2n 種組合,故有 2n 列。 將X、Y、Z的值代入F(X、Y、Z),就可以算出這個欄位的值。 6-2-1 真值表(Truth Table) 布林函數F(X, Y, Z) = XYZ’ + (X’Z’)(Y + Z) 的真值表推算如下:

  7. 6-2-2 文氏圖(Venn Diagram)

  8. 以文氏圖來表示F(X, Y, Z) = X’Z’ + XY

  9. 6-2-3 布林代數恆等式 一、公設 P1. 0與1的存在 (a) X + 0 = X (b) X * 1 = X P2. 交換律 (a) X + Y = Y + X (b) X * Y = Y * X P3. 結合律 (a) X + (Y + Z) = (X + Y) + Z (b) X * (Y * Z) = (X * Y) * Z

  10. P4. 分配律 (a) X + (Y * Z) = (X + Y) * (X + Z) (b) X * (Y + Z) = (X * Y) + (X * Z) P5. 互補 (a) X + X’ = 1 (b) X * X’ = 0 二、定理 T1.冪次 (a) X + X = X (b) X * X = X

  11. T2. 0與1的特性 (a) X + 1 = 1 (b) X * 0 = 0 T3. Absorption (a) X + XY = X (b) X * (X + Y) = X (c) X + X’Y = X + Y (d) X * (X ‘ + Y) = X * Y T4. 狄摩根 (a) (X + Y)’ = X’ * Y’ (b) (X * Y)’ = X’ + Y’

  12. T5. 反身律 (X’)’ = X T6. Consensus (a) XY + X’Z + YZ = XY + X’Z(b) (X + Y) * (X’ + Z) * (Y + Z) = (X + Y) * (X’ + Z)

  13. 6-3 邏輯閘(Logic Gate) 6-3-1AND閘

  14. 6-3-2OR閘

  15. 6-3-3NOT閘

  16. 6-3-4XOR閘

  17. 6-3-5NAND閘

  18. 使用NAND閘來模擬AND閘 使用NAND閘來模擬OR閘

  19. 使用NAND閘來模擬NOT閘

  20. 6-3-6NOR閘 使用NOR閘來模擬AND閘

  21. 使用NOR閘來模擬OR閘 使用NOR閘來模擬NOT閘

  22. 6-3-7XNOR閘

  23. 6-4 邏輯簡化(Logic Minimization) 6-4-1 標準形式(Standard Form) • 積項(product terms) • 和項(sum terms) • 最小項(miniterms) • 最大項(maxiterms) 最小項之和(sum of miniterms)

  24. 最大項之積(product of maxterms)

  25. Mi’ = mi且 mi’ = Mi

  26. 將布林函數F(X, Y, Z) = X’Y + XZ表示成最小項之和 (1)首先,將F(X, Y, Z) = X’Y + XZ的真值表寫出來 (2)以OR運算子連接所有布林值等於1的最小項 F (X, Y, Z) = m2 + m3 + m5 + m7 = Σm (2, 3, 5, 7)

  27. 將布林函數F(X, Y, Z) = X’Y + XZ表示成最大項之積 (1)首先,將F(X, Y, Z) = X’Y + XZ的真值表寫出來 (2)以 AND 運算子連接所有布林值等於 0 的最大項 F (X, Y, Z) = M0 + M1 + M4 + M6 = ΠM (0, 1, 4, 6)

  28. 6-4-2 卡諾圖(Karnaugh Map) 兩個二元變數的卡諾圖 以卡諾圖將F(X, Y) = XY + XY’ 簡化為積項之和 (1)F(X, Y) = XY + XY’ = m3 + m2 = Σ m (2, 3)

  29. (2) (3) (4)找出矩形涵蓋的積項並求取其和, XY’ + XY = (X)(Y’ + Y) = X

  30. 三個二元變數的卡諾圖 以卡諾圖將F(X, Y, Z) = X’YZ + X’YZ’ + XYZ + XY’Z簡化為積項之和 (1)F (X, Y, Z) = Σm (2, 3, 5, 7)

  31. (2) (3)

  32. (4)X’YZ + X’YZ’ = (X’Y)(Z + Z’) = X’Y,XY’Z + XYZ = XZ(Y’ + Y) = XZ,兩者相加於是 得到X’Y + XZ • 四個二元變數的卡諾圖

  33. 以卡諾圖將F(W, X, Y, Z) = Σm (0, 2, 4, 6, 8, 10, 13, 15) 簡化為積項之和 (1)

  34. (2) (3)找出矩形涵蓋的積項並求取其和,本 例有三個矩形,W’Z’ + WXZ + X’Z’

  35. 以卡諾圖將布林函數簡化為和項之積 F(X, Y, Z) = X’YZ + X’YZ’ + XYZ + XY’Z以卡 諾圖將布林函數簡化為和項之積 (1)F(X, Y, Z) = Σm(2, 3, 5, 7) (2)

  36. (3) (4)找出矩形涵蓋的積項並求取其和得到X’Y’ + XZ‘ (5)F(X, Y, Z) = (X’Y’ + XZ’)’ = (X + Y)(X’ + Z)

  37. 無所謂情況(Don’t Care Condition)

  38. 找出矩形涵蓋的積項並求取其和,得到W’Y’ + WY

  39. 6-4 組合電路(Combinational Circuit)

  40. 半加法器

More Related