OR Operator

What Does OR Operator Mean?

The OR operator is a Boolean operator which would return the value TRUE or Boolean value of 1 if either or both of the operands are TRUE or have Boolean value of 1. The OR operator is considered one of the basic logical operators along with AND and NOT in Boolean algebra. It is widely used in programming languages which support logical and comparison operators.

Advertisements

The OR operator can also be used in combination with other logical operators.

Techopedia Explains OR Operator

In digital electronics, the OR operator is represented by the OR logic gate. The OR operator returns the value of FALSE or Boolean 0 only if both operands are FALSE or have a Boolean value of 0. Similar to other logical operators, the OR operator can be combined with other logical operators to create more complex expressions. Similar to the AND operator, the OR operator evaluates the second operand only if required.

The basic OR operator is also called the inclusive OR operator. The XOR or the exclusive OR operator returns the Boolean value of 1 or TRUE if the number of the inputs having a value of 1 or TRUE is odd. The OR operator is used in most programming languages which support logical and comparison operators. In the programming world, it is mainly used to control the flow in programs, similar to other logical operators. It is also an important component while setting up digital circuit logic.

Advertisements

Related Terms

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…