OR Operator

Why Trust Techopedia

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
Technology Specialist
Margaret Rouse
Technology Specialist

Margaret is an award-winning writer and educator known for her ability to explain complex technical topics to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles in the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret’s idea of ​​a fun day is to help IT and business professionals to learn to speak each other’s highly specialized languages.