Logical OR Symbol

What Does Logical OR Symbol Mean?

The logical OR symbol is a conditional operator used between two different statements to test the validity of each statement. A true result is delivered only when one or both statements are true.

Advertisements

The logical OR operator is used in conditions where an operation may have one false statement. In programming languages, the logical OR operator is often represented by a single or two vertical dashes (||) placed between test expressions.

Techopedia Explains Logical OR Symbol

The logical OR symbol is part of the Boolean algebra family and is frequently used in programming languages where two or more statements are operated to determine a condition type.

What is important to appreciate about the OR statement is that it is one of the most fundamental, primitive conditions available. An OR statement along with the conditional AND statement form the basis of most all computing and electronic circuitry.

A programming language often provides two distinct operators to distinguish bitwise and logical OR operations. In C programming language, the bitwise OR operation uses a single vertical dash (|), whereas the logical OR operation uses double vertical dashes. The logical OR operation uses short circuiting. Thus, if the left operand evaluates as false, the result will be false and the right operand will not be evaluated.

Advertisements

Related Terms

Latest API Management Terms

Related Reading

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…