Table of contents
Basic Logical Operations
There are only three basic logical operations in logical algebra , namely
" And ", " Or ", " Not ".
AND logical operation
Definition : Only when all the conditions for determining an event are met, the event is established; if one or more conditions are not met, the event is not established. Such a causal relationship is called an " and " logical relationship.
AND logic operation in digital circuit
If the state of the switch is off and the light is off is expressed by the logic quantity " 0 " ; the state of the switch on and the light is on is expressed by the logic quantity " 1 " , then there is a truth table:
AND logic truth table
A | B | |
---|---|---|
0 0 1 1 |
0 1 0 1 |
0 0 0 1 |
Truth table : the logical relationship between all possible combinations of input variable values and the corresponding output variable values is listed in the form of a table .
The logical function of AND gate is summarized as follows:
1) "0" out of "0";
2) All "1" out "1".
or logical operation
Definition : Among the various conditions that determine an event , as long as one or more conditions are met, this event is established ; only when all the conditions are not met , this event is not established . Such a causal relationship is called " or " logical relationship.
or logic truth table
A | B | |
---|---|---|
0 0 1 1 |
0 1 0 1 |
0 1 1 1 |
The logical function of the OR gate can be summarized as :
1) "1" out of "1";
2) All "0" out "0".
illogical operation
Definition : Assuming that the establishment of event F is related to the possession of condition A , if A is met , then F is not established ; if A is not met , then F is established . This causal relationship between F and A is called "not" logic relationship .
illogical truth table
A | |
---|---|
0 1 |
1 0 |
Note :
- Both AND and OR gates can have multiple inputs and one output.
-
A NOT gate has only one input and one output.
compound logic operation
AND logic
( will be combined with logical and not logical )
NAND logic truth table
A | B | |
---|---|---|
0 0 1 1 |
0 1 0 1 |
1 1 1 0 |
The logical function of the NAND gate is summarized as: "There are 0 out of 1, all 1 out of 0" .
OR illogical
( A combination of OR logic and NOT logic )
or illogical truth table
A | B | |
---|---|---|
0 0 1 1 |
0 1 0 1 |
1 0 0 0 |
The logical function of the NOR gate is summarized as: "all 0s out 1, 1 out 0".
AND OR NOT logic
( combined with , or , and not logic)
AND OR NOT Logical Functions :
Logical symbols for AND-NOR gates:
The logical function of the NOR gate is summarized as: "Every group has 0 out of 1, and a certain group of all 1 out of 0".
Chip type corresponding model
XOR logic
The functional formula of XOR logic is:
XOR logic truth table
A | B | |
---|---|---|
0 0 1 1 |
0 1 0 1 |
0 1 1 0 |
The function of XOR logic is:
1) The same result is "0";
2) The difference is "1".
NOR logic
The same OR logical function is:
NOR logic truth table
A | B | |
---|---|---|
0 0 1 1 |
0 1 0 1 |
1 0 0 1 |
The function of exclusive OR logic is:
1) If they are the same, get "1";
2) The difference is "0".
Comparing the XOR and XOR logic truth tables , it can be found that XOR and XOR are inverse functions of each other, namely :
end