Home > Common Problem > body text

What are the commonly used Boolean logical operators?

藏色散人
Release: 2020-04-11 11:06:20
Original
39051 people have browsed it

What are the commonly used Boolean logical operators?

What are the commonly used Boolean logical operators?

There are four types of Boolean logical operators: and (logical AND), or (logical OR), not (logical NOT), and XOR (logical exclusive OR).

1. and (logical sum)

In life, logic and explanation are equivalent to "and". & calls a logical AND and the result is true only if both operands are true. & is called a concise AND or short-circuit, and if only two operands are true, the result is true.

2. or (logical OR)

If one or more operands are true, the logical OR operator returns the Boolean value true; only when all operands are false, the result It is false.

3. not (logical negation)

Logical negation is the reciprocal of the original value.

4. xor (logical exclusive OR)

If a and B are different, the exclusive or result is 1. If a and B are the same, exclusive or results in 0.

Extended information:

The origin of Boolean logical operators:

Boolean used mathematical methods to study logical problems and successfully established logical calculations. He used equality to represent judgment and regarded reasoning as the transformation of equality. The effectiveness of this transformation does not depend on people's interpretation of the symbols, but only on the combination rules of the symbols. This theory of logic is often called Boolean algebra.

In the 1930s, logic algebra was applied to circuit systems. Subsequently, with the development of electronic technology and computer technology, various complex large systems appeared, and their transformation laws also followed the laws revealed by Boolean operations.

The above is the detailed content of What are the commonly used Boolean logical operators?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template