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
Editor

Margaret jest nagradzaną technical writerką, nauczycielką i wykładowczynią. Jest znana z tego, że potrafi w prostych słowach pzybliżyć złożone pojęcia techniczne słuchaczom ze świata biznesu. Od dwudziestu lat jej definicje pojęć z dziedziny IT są publikowane przez Que w encyklopedii terminów technologicznych, a także cytowane w artykułach ukazujących się w New York Times, w magazynie Time, USA Today, ZDNet, a także w magazynach PC i Discovery. Margaret dołączyła do zespołu Techopedii w roku 2011. Margaret lubi pomagać znaleźć wspólny język specjalistom ze świata biznesu i IT. W swojej pracy, jak sama mówi, buduje mosty między tymi dwiema domenami, w ten…