--- tags: Fundamentals of Logic Design --- # Boolean Algebra ## Basic Operations and Truth Table ![](https://i.imgur.com/b6Ya4zg.png) L, H: 高電位,低電位 F, T: false, true complement(補數): 把零變一之類的 圈圈代表一個 inverter。之後寫得簡潔一點就會把前面的三角形拿掉 ![](https://i.imgur.com/2krHsDD.png) And gate ![](https://i.imgur.com/uhz6ov4.png) OR gate 沒有特別強調就是 inclusive or inclusive or: 可以兩個都是1 或 0 ![](https://i.imgur.com/7oYAP4t.png) 布林公式,可以試著推推看 ![](https://i.imgur.com/RU45LUZ.jpg) 這是所謂的真值表,左邊是 input 右邊是最後的結果 加法:OR 乘法:AND ![](https://i.imgur.com/C8o3IwX.png) 左邊是 or 右邊是 and 下面那題,後面一個加一,前面都不用看,就是等於一。 ## Basic & Advanced Theorems ![](https://i.imgur.com/7qVc6l6.png) :arrow_up: 上圖的下面定理,電路化簡會用到。 ![](https://i.imgur.com/LlK96f9.jpg) 這裡很重要 or=並聯。 and=串連 ![](https://i.imgur.com/5xKM2TK.png) ![](https://i.imgur.com/Dop0wU8.png) or=並聯。 and=串連 ![](https://i.imgur.com/t5PnBXE.png) 串連一個 x+x' = 1,不影響結果 最後並聯一個 xy,不影響結果 ![](https://i.imgur.com/idlltX3.png) 分配律的寫法 ![](https://i.imgur.com/XuntVCk.png) 也可以由串連並聯的寫法來解釋 ![](https://i.imgur.com/c173CTg.png) ![](https://i.imgur.com/z3Ev9QQ.png) 重點:需要假設好幾個 group 來簡化電路 ## Multiplying Out and Factoring Multiplying Out: 把式子乘開 ![](https://i.imgur.com/dESQL6n.png) * SOP ![](https://i.imgur.com/M7NhWqk.png) sum term = A+B, A product term = AB, A SOP: (AND) OR (AND) OR (AND) 括號內不能有 OR ![](https://i.imgur.com/FEXfhh9.png) * POS ![](https://i.imgur.com/gWTv4AM.png) ![](https://i.imgur.com/PjAmkA7.jpg) 第三題要用 group 的概念會比較好理解 ![](https://i.imgur.com/U6QJqsC.png) 不算 inverter 只算 and, or 只會有兩層 ## DeMorgan's Law and Duality * DeMorgan's Law ![](https://i.imgur.com/wFj6ygi.png) 為什麼要學DeMorgan's Law : 這裡是使用正邏輯來判斷什麼時候 f = 0,對 f 取 complement(補數),原本 x+y = 0 會變成 1 ,再由正邏輯來判斷就可以得知何時 f = 0 。 ![](https://i.imgur.com/MuJ0yBo.jpg) DeMorgan's Law -> 如何快速得到函數的補數 ![](https://i.imgur.com/cSF3yIz.png) 法則就是,把補數的符號分配給函數內部的變數,並且轉換裡面的 operators(AND->OR) * Duality(對偶) ![](https://i.imgur.com/VaS2Arc.jpg) 變數不需要補數,可以降低簡化難度 ![](https://i.imgur.com/EVUHyjv.jpg) 回過頭看,這兩個表格個別是彼此的對偶。 ## More Multiplying Out and Factoring ![](https://i.imgur.com/oW8x7EJ.jpg) x(y+z) = xy + xz (背) x+ yz = (x+y)(x+z) (背) (x+y)(x'+z) = xz + yx' (背) example 第二題: ABC 可以再拿掉 ![](https://i.imgur.com/kbmaT5R.png) :arrow_up:(c)證明 : and 一個 (x+x')=1 ab + abc -> 其中 abc 可以直接拿掉 因為 ab(1+c) = ab. 1+c = 1 ![](https://i.imgur.com/znOXM70.jpg) ## Exclusive-OR and Equivalence Operations * Exclusive-OR ![](https://i.imgur.com/7V8gpZx.jpg) Exclusive-OR: 排他,我有你就不能有。兩個一樣不行 X (EOR) Y = xy' + x'y -> 下面板書有解釋如何得到 要對 (EOR) DeMorgan's Law 時,要先轉換成 AND, OR * Exclusive-OR用越多,電路面積就越省 * Equivalence Operations ![](https://i.imgur.com/PkmNpGN.png) ![](https://i.imgur.com/6LPgZuT.jpg) 式子裡面如果有 (EOR), Equivalence Operations 可以先用上面的式子做替換 ![](https://i.imgur.com/P4EXhF0.png) 如何由真值表求得 F 把所有的1 OR 起來 然後對照個別的 x, y 。遇到零的給他補數 例如 x=0, y=1 -> x'y x=1, y=0 -> xy' x=1, y=1 -> xy F = x'y + xy' + xy -> xy' + y -> x + y ![](https://i.imgur.com/BD5iFHI.png) ## The Consensus Theorem Consensus (共識) ![](https://i.imgur.com/vKwXNzZ.jpg) 此處的證明之前講過了,練習一很重要需要運用 dual form ## Simplification of Switching Expression - Techniques ![](https://i.imgur.com/aS1mmA2.png) 第二個例子說明,可以加一個一樣的邏輯閘幫助化簡。 ![](https://i.imgur.com/b1gGC0V.png) ![](https://i.imgur.com/9IGoSBC.jpg) xy + x'z add yz x add xy (x+x') Example: 可以發現 x, x' 使用 The Consensus Theorem 加 wz' 是為了刪掉 wy'z' ## Simplification of Switching Expression - Combining All ![](https://i.imgur.com/ZzRCv9g.jpg) 這個題型用很多 The Consensus Theorem ![](https://i.imgur.com/5zbtrUO.png) (A+C)(A+B+C) = (A+C) (背) ## Proving the Validity of Equation