java 邏輯表達式 布爾
將布爾表達式轉換為邏輯電路 (Converting Boolean Expression to Logic Circuit)
The simplest way to convert a Boolean expression into a logical circuit is to follow the reverse approach in which we start from the output of the Boolean expression and reach towards the input.
將布爾表達式轉換為邏輯電路的最簡單方法是遵循相反的方法,在這種方法中,我們從布爾表達式的輸出開始,然后向輸入過渡。
Example1: Realize the Boolean Expression BC + A + (A + C) using AOI logic.
示例1:使用AOI邏輯實現布爾表達式BC + A + (A + C) 。
Solution:
解:
To realize this using the AOI logic gates, we will use the reverse approach.
為了使用AOI邏輯門來實現這一點,我們將使用相反的方法。
Step 1:
第1步:
Our expression BC + A + (A+C) is the summation of three terms BC, A and, (A+C), thus a 3-input OR Gate must have been used to obtain the expression as given :0
我們的表達BC + A +(A + C)是三個方面BC,A和(A + C)的總和,從而一個3輸入OR門必須被用于獲得表達給出:0
Step 2:
第2步:
Now, BC and (A + C) both are inverted in nature, so they must have been inverted using a NOT Gate earlier. BC must have been obtained by inverting the input BC and (A + C) must have been obtained by inverting the input (A + C) both using the NOT Gate.
現在, BC和(A + C)本質上都是反向的,因此它們必須早先使用NOT門進行了反向。 BC必須已經通過反相輸入BC獲得,并且(A + C)必須已經通過使用NOT門將輸入(A + C)反相獲得。
Step 3:
第三步:
Moving further, in the reverse direction we see, BC must have been an output of 2-input AND Gate with inputs as B and C. Likewise, (A + C) must have been obtained as the output of 2-input OR gate with A and C as the inputs.
再往相反方向看,BC必須是輸入為B和C的2輸入與門的輸出。同樣,必須獲得(A + C)作為2輸入與門的輸出,其中A和C作為輸入。
So, Final Logic Diagram for above given Boolean expression can be drawn as,
因此,以上給出的布爾表達式的最終邏輯圖可以繪制為:

將邏輯圖轉換為布爾表達式 (Converting Logic Diagrams into Boolean Expressions)
The easiest way to obtain the Boolean Expression from any logic circuit is to follow the forward propagation approach. In this, we start from the input side and move ahead until the output is reached. While moving from the input side to the output side, we continue evaluating the output of intermediate logic gates.
從任何邏輯電路獲得布爾表達式的最簡單方法是遵循正向傳播方法。 在這種情況下,我們從輸入端開始,然后繼續前進,直到達到輸出為止。 從輸入端移至輸出端時,我們繼續評估中間邏輯門的輸出。
Example 1: Find out the Boolean Expression for Logic Diagram given below and simplify the output in the minimal expression, also implement the simplified expression using the AOI logic.
示例1:找出下面給出的邏輯圖布爾表達式,并以最小表達式簡化輸出,還使用AOI邏輯實現簡化表達式。

Solution:
解:
Following the forward propagation approach, we see that gate G1 is a 2-input AND Gate having inputs A and B. So, output of G1 will be AB. Similarly, G2 is an OR Gate, so output of G2 will be (B+C). Also, G3 is an AND Gate and its output will be AB.
按照前向傳播方法,我們看到門G1是2輸入與門,其輸入A和B。因此,G1的輸出將為AB。 同樣,G2是“或”門,因此G2的輸出為(B + C)。 同樣,G3是與門,其輸出將為AB。
Now, gate G4 is a 2-input OR Gate which has one of its inputs as A and the other one is the output of gate G1, thus the output of gate G4 will be (A + AB). Similarly, output for gate G5 and G6 will be (B + BC) and (C + AB) respectively. Now, gate G7 is a 3-input AND Gate, therefore output (Y) of G7 will be equal to (A+AB). (B+BC). (C+AB)
現在,門G4是2輸入或門,其輸入之一為A,另一個為門G1的輸出,因此門G4的輸出為(A + AB)。 同樣,門G5和G6的輸出分別為(B + BC)和(C + AB)。 現在,門G7是3輸入與門,因此G7的輸出(Y)等于(A + AB)。 (B + BC)。 (C + AB)
Since, we have Y = (A+AB). (B+BC). (C+AB), now we have to minimize it.
因為,我們有Y =(A + AB)。 (B + BC)。 (C + AB) ,現在我們必須將其最小化。
Therefore, (A+AB). (B+BC). (C+AB)
= A (1 + B). B (1 +C). (C+AB)
= A. B. (C+AB) [Since, 1+B =1 and 1+C =1]
= AB (1 + C)
= AB
Therefore, Y=AB is the minimal expression. This can be implemented using a 2-input AND Gate having inputs A and B as:
因此, Y = AB是最小表達式 。 這可以使用具有輸入A和B的2輸入與門實現:
翻譯自: https://www.includehelp.com/basics/realization-of-boolean-expressions-using-basic-logic-gates.aspx
java 邏輯表達式 布爾