Logical OR Symbol

Why Trust Techopedia

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

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.