OR operation

OR operation (inclusive-OR operation) The logical connective combining two statements, truth values, or formulas P and Q in such a way that the outcome is true if either P or Q or if both P and Q is true (see table). The latter outcome distinguishes the OR from the exclusive-OR operation. The OR operation is usually denoted by ∨ and occasionally by +. It is one of the dyadic operations of Boolean algebra and is both commutative and associative.

One way of implementing the OR operation (e.g. in LISP) is to test P first, and then evaluate Q only if P is false. The resulting operation is noncommutative; in some languages there is a distinct notation for this.

When it is implemented as a basic machine code instruction, OR usually operates on pairs of bytes or pairs of words. In these cases the OR operation defined above is normally applied to pairs of corresponding bits.

Cite this article
Pick a style below, and copy the text for your bibliography.

  • MLA
  • Chicago
  • APA

JOHN DAINTITH. "OR operation." A Dictionary of Computing. 2004. Encyclopedia.com. 27 May. 2012 <http://www.encyclopedia.com>.

JOHN DAINTITH. "OR operation." A Dictionary of Computing. 2004. Encyclopedia.com. (May 27, 2012). http://www.encyclopedia.com/doc/1O11-ORoperation.html

JOHN DAINTITH. "OR operation." A Dictionary of Computing. 2004. Retrieved May 27, 2012 from Encyclopedia.com: http://www.encyclopedia.com/doc/1O11-ORoperation.html

Learn more about citation styles

Find thousands of answers for hundreds of subjects at Answers Encyclopedia .

All answers verified by trusted sources at Encyclopedia.com

Try Answers Encyclopedia now!

For students and teachers!

Encyclopedia.com provides students and teachers facts, information, and biographies from verified, citable sources, including:

Encyclopedia.com provides students and teachers facts, information, and biographies from verified, citable sources, including: