Collection
zero Useful+1
zero

Logical function

Mathematical terminology
A logical function is a type of function whose return value is the logical value true or the logical value false.
True: indicates that the result after judgment is true and correct, or 1;
False: indicates that the result after judgment is false or wrong, which can also be represented by 0.
Chinese name
Logical function
Foreign name
logistic function
Standard form
Sum of minimum terms and product of maximum terms
Definitional expression
F=f(A1,A2...An)
Representation method
Boolean algebra, logic diagram, oscillogram, etc
Applied discipline
computer science mathematics communication engineering

definition

Announce
edit
The logical function definition expression is:
Where: A one ,A two ,..., A n Enter for Logical variable , the value is 0 or 1;
F is the output logical variable, and the value is 0 or 1;
F is called A one ,A two ,..., A n The output logic function of the.
There are two standard forms of logic function: "sum of minimum terms" and "product of maximum terms". [1]

Representation method

Announce
edit
boolean algebra method
Algebra that operates according to certain logical laws. Different from ordinary algebra, variables in Boolean algebra are binary Logical variable
Truth table method
A table is used to represent the operation relationship of the logic function. The input part lists all possible combinations of the input logic variables, and the output part gives the corresponding output logic variable values.
Logic diagram method
Use specified Graphical symbols , to form a network graph of logical function operation relations.
Karnaugh map method
Karnaugh map is a geometric figure, which can be used to express and simplify logical function expressions.
Oscillogram method
A graph representing the dynamic changes of input and output variables, reflecting function value The law of change with time.
Lattice diagram method
It is intuitive in early programmable logic devices Description logic Function.
Hardware design language method
It is a method of using computer high-level language to describe logic functions and carry out logic design. It is applied to programmable logic devices. The most widely used hardware design languages are ABLE-HDL, VHDL, etc. [2]

Logical operation

Announce
edit

AND operation (logical multiplication)

1. Boolean expression
Taking three variables as an example, the Boolean expression is
F=ABC
This formula indicates that when Logical variable A. When B and C are both 1, the logic function output F is 1. In other cases, F is 0.
For engineering application and calculation And door Circuit. Logic diagram Symbol sum Truth table As follows:
Ternary variable and truth table of operation
I/O
A B C F
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
Extension to n Logical variable Case, and operational Boolean algebra The expression is:
F=A one A two A three ....A n
2. Computer language representation :AND
Returns TRUE when the logical values of all parameters are true; If the logical value of one parameter is false, FALSE is returned.
The syntax is: AND (Logical one ,logical two ,…)。 Parameter Logical one ,logical two ,... are 1~30 logical expressions to be tested, and their conclusions are either TRUE (true) or FALSE (false). The parameter must be a logical value or an array or reference containing logical values. If the array or reference contains text or blank cells, its value will be ignored. If the specified cell range contains non logical values, AND will return the error value "# VALUE!". [2]

OR operation (logical addition)

1. Boolean expression
Taking the three variables as an example, Boolean algebra The expression is:
F=A+B+C
This formula shows that when Logical variable A. When either of B and C is 1, the output of logic function F is equal to 1.
In engineering application, or operation is realized by logic or gate circuit. The logic symbols and truth tables are as follows:
Ternary variable or operation Truth table
I/O
A B C F
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
Extension to n Logical variable Case, or operational Boolean algebra The expression is:
F=A one +A two +A three +...+ A n
2. Computer language representation: OR
TRUE is returned when any of the logical values of all parameters is true.
The syntax is expressed as: OR (logical1, logical2,...). The parameters Logical1, logical2,... are 1 to 30 logical expressions that need to be checked, and the conclusions are TRUE or FALSE respectively. If an array or referenced parameter contains text, numbers, or blank cells, they are ignored. If the specified region does not contain a logical value, the OR function will return error # VALUE!.
Example: If A1=6, A2=8, the formula "=OR (A1+A2>A2, A1=A2)" returns TRUE; The formula "=OR (A1>A2, A1=A2)" returns FALSE. [2]

Non operation

1. Boolean expression
Boolean algebraic expression is:
This formula indicates that the output variable is the opposite state of the input variable.
In engineering application, not for calculation Non gate Circuit (inverter). The small circle at the output end of the logic symbol indicates "no". Nonportal Truth table There are only two combinations.
2. Computer language representation :NOT
It is used to find the opposite value of a logical value or logical expression. If you want to ensure that a logical value is equal to its opposite value, you should use the NOT function. The syntax is NOT (logical)
The parameter Logical is a logical value or logical expression that can draw a conclusion of TRUE or FALSE. If the result of the logical value or expression is FALSE, the NOT function returns TRUE; If the result of the logical value or expression is TRUE, the result returned by the NOT function is FALSE. [2]

AND NOT

The AND NOT operation is a combination of the AND operation and the NOT operation. Taking two variables as an example, the Boolean algebraic expression is:
In engineering application, NAND operation is realized by logical NAND gate circuit. The logic symbols and truth tables are as follows:
AND NOT Truth table
I/O
A B F
0 0 1
0 1 1
1 0 1
1 1 0
It can be seen from the truth table that only when input A and B are both 1, output F is 0. For NAND gate, this combination is an effective working state.

OR NOT operation

OR NOT operations are combinations of OR operations followed by NOT operations. Take two variables A and B for example, Boolean algebra The expression is:
In engineering application, or non operational logic OR NOT gate Circuit. The logic symbols and truth tables are as follows:
OR NOT operation Truth table

AND OR NOT

The AND or NOT operation is a combination of the three operations of "first and then or then not". Taking four variables as an example, the Boolean expression is:
Expression Description: When the input variables A and B are both 1 or C and D are both 1, the output F is equal to 0. The AND or NOT operation is a combination of OR operation followed by NOT operation.
In engineering applications, AND or NOT operations are performed by AND OR NOT gate Circuit, which Logic diagram As shown below:
Thinking question: you can write four variable AND/OR non logic Truth table Is it?

XOR

The Boolean expression is:
F=A⊕B
The symbol "⊕" indicates XOR Operation, that is, F=1 when the values of two input variables are different.
In engineering application, XOR operation is realized by XOR gate circuit

Identical or operation

The Boolean expression is:
F=A⊙B= A⊕B B
The symbol "⊙" indicates Same or Operation, that is, when the values of two input variables are the same, F=1.
In engineering applications, the same or operation is realized by the same or gate circuit, which is equivalent to Exclusive OR gate Output NAND gate.
Summary: In Basic Logical operation In, and, or, and not are the most essential operations, and other logical operations are the combination of two or three of them. [2]

Positive negative logic

Announce
edit

Positive logic

The high level of the input and output voltage of the gate circuit is defined as logic "1", and the low level is defined as logic "0".

Negative logic

The low level of the input and output voltage of the gate circuit is defined as logic "1", and the high level is defined as logic "0".
The same logic gate circuit is realized under the definition of positive logic And door Function, implemented under the definition of negative logic OR Gate Function.
In the design of digital systems, either positive logic or negative logic should be used, rather than mixed use. [2]