☖ Home Units Converter Geometry Σ Math Physics Electricity

Examples of logical gates circuits

Logical gates overview Print logical gates overview
Logical gates are the basic of the computerized world and is based on the digital values of the binary numbers  0  and  1. The implementation of the logical gates are performed by the rules of the Boolean algebra, and based on the combinations of the operations  OR, AND  and  NOT. The specific gate operation is attained by using diodes or transistors that acts like a switch  0  is off  (0 Volt)  and  1  is on  (5 Volt).
Logical OR and AND gates description
Operation Logical symbol Switch operation Electronics
OR OR gate symbole
Transistor OR gate
AND AND gate symbole
Transistor AND gate
Logical gates examples 1, 2 and 3 Print logical gates example 3
F(X, Y,Z) = XY' + Z
Num X    Y    ZXY'Output
10    0    000
20    0    101
30    1    000
40    1    101
51    0    011
61    0    111
71    1    000
81    1    101
Num A    BOutput
10    01
20    11
31    00
41    10
Output
From the output result we can see that the system can be simplified to the equivalent form.
F(A, B) = A XOR B
NumA     BOutput
10     00
20     11
31     01
41     10
Output
This system is the equivalent of the XOR gate.
Logical gates example 4 Print logical gates example 4
Example 5
The truth table at points  D, E, F, G, H and K  of the system described above are.

ABCDEFGHK
000000000
000100100
001000000
001100100
010001100
010100100
011001100
011100100
100000000
100100111
101000000
101100111
110011111
110110111
111001111
111100111
Port Value Notes
E A AND B AND NOT C
F B AND NOT D
G D OR F D + F
H A AND G A‧G
K E OR H E + H
Logical gates example 5 Print logical gates example 5
Example 3
The truth table at points  D, E, F, G, H, I, J, and K  of the system described above are.

ABCDEFGHIJK
00011100110
00111010100
01010110100
01110010100
10001110100
10101010100
11000110100
11100011011
Port Value Notes
D NOT A NOT Buffer
E NOT B NOT Buffer
F NOT C NOT Buffer
G NOT (D AND E AND F) De Morgan's theorem
H NOT (D OR E OR F) NOT (D OR E OR F)
I NOT (A AND B AND C) NOT (D AND E AND F)
J NOT (G XNOR H)
K NOT (D OR E OR F) NOT (D OR E OR F)
Logical gates example 6 Print logical gates example 6
Example 7
The truth table at points  C, D, E, F and G  of the system described above are.

ABCDEFG
0001000
0101101
1001101
1111000
Port Value
C A AND B
D
NOT A AND B
NOT A AND B
E A XOR B
F NOT (A AND B OR 1)         (D equals 1 see above)
G D AND (A XOR B)
Logical gates example 7 Print logical gates example 7
Example 7
The truth table at points  D, E, F, G, H and K  of the system described above are.

ABCDEFGHK
000000000
001000111
010110011
011111101
100100010
101100000
110000000
111001011
Port Value Notes
D A XOR B
E NOT A AND B
F B AND C
G NOT A AND C)
H A XOR B XOR C
K  NOT A AND B OR B AND C OR NOT A AND C
Draw logical gate circuit from Boolean expression example 11 Print logical gates example 11
If we have a logical expression such as NOT (A AND B) we can draw the equivalent
logical gate circuit by the following steps:
1 Divide the expression into 2 expressions separated by the OR (+) operator marked by X and Y.
NOT (A AND B) this is equivalent to the gate: X OR Y
2
The X expression can be divided into AND gate after simplifying:
X = (NOT A AND B) AND NOT A this expression is the gate: NOT (A AND B)
3
Perform the same process on the  Y  expression to get an  AND  of  2  expressions:
X = (NOT A AND B) AND NOT A this expression is the gate: NOT (A AND B)
4
Combine the gates of section 1, 2 and 3 to get the final scheme of the complete gate:
NOT (A AND B)

Order of evaluating Boolean expressions

aveluating boolean expresions

From algebra we know that the order of calculating mathematical expressions are first powers and roots then multiply and divide and at last addition and subtraction. The question now is what is the correct order of evaluating Boolean expressions. We can do first the NOT operation then the AND, and in the end the OR operation, but many times that order is not what we need to do. check for example the following expression: NOT A OR B AND A. We calculated the expression in the bracket first. We can clearly see that the results are not the same. To prevent this kind of problems it is highly recommend that we set the priority operations by brackets.

(NOT A OR B) AND A
Gate 1
Truth table gate 1
NOT A OR (B AND A)
Gate 1
Truth table gate 2

3D lines - Example 12

Print Example 12
Question:
Given the Boolean expression: F=(¯y+x∙y)∙(¯(z  y)). Draw the proper logical gates circuit describing this expression then draw the truth table, finally simplify the expression.
Solution:

The logical gates of the given equation will be as follows:

F=(¯y+x∙y)∙(¯(z  y)) Aa button Aa button Aa button A value B value C value D value E value F value
Port Value Notes
A x AND y
B NOT y
C y XOR z
D NOT y OR (x AND y) The order is:   ¯Y+(X∙Y)
E NOT (z XOR y)
F  [NOT (y) OR (x AND y)] AND NOT (z XOR y)
XYZABCDEF
000010111
001011100
010001000
011000010
100010111
101011100
110101100
111100111
Simplied logical gate Aa button Aa button Aa button D value E value F value
Now we will show that both circuits presented above are the same. Manipulate the left side of the given equation, according to the distributive low we get:

Distributive low

The NOT(XOR) bracket can be written as:
¯(Z⨁Y)=Z∙Y+¯Z∙¯Y

According to the Boolean algebra equations summary we get:

(¯Y+X)∙(Z∙Y+¯Z∙¯Y)=¯Y YZ+¯Y  ¯Z+XYZ+X¯Y  ¯Z

The first item is equal to 0 and finally we get the simple value which is equivalent to the given equation:

(¯Y+X)∙(Z∙Y+¯Z∙¯Y)=¯Y YZ+¯Y ¯Z+XYZ+X¯Y ¯Z=¯Y ¯Z (1+X)+XYZ=XYZ+¯Y ¯Z

Now press the various buttons in the first circuit inputs to show that both outputs F are the same.