Current location - Training Enrollment Network - Mathematics courses - What are the three algorithms of AND or NOT?
What are the three algorithms of AND or NOT?
The basic operation formula of AND, or NAND logic is AND, or NAND.

There are three basic logical operations:

1) The logical AND- is represented by AB: when both A and B are 1, its value is 1, otherwise it is zero.

2) The logical OR- is represented by A+B: when both A and B are 0, their values are 0; otherwise, it is 1.

3) Logical negation-use "?" About A. It means that when A=0, the negation of A is 1, and when A= 1, the negation of A is 0.

Functions of logical expressions:

A meaningful formula that connects relational expressions or logical quantities with logical operators is called a logical expression, and the value of a logical expression is a logical value, that is, "true" or "false".

C language compiler system uses the number 1 to indicate "true" and the number 0 to indicate "false" when giving the logical operation result, but when judging whether a quantity is "true", it uses 0 to indicate "false" and non-zero to indicate "true", and can assign the operation result of logical expression (0 or 1) to integer variables or character variables.