| advertise add site services publishers database health videos | ![]() | about toolbar stats live show health store more stuff JOIN/LOGIN |
Hospital Management System - All Inclusive bwci.com | Inclusive Dental - Contact Us - 1-866-497-3692 inclusivedental.com |
"Either or" redirects here. For the philosophical work by Søren Kierkegaard, see Either/Or. "Disjunction" redirects here. For separation of chromosomes, see meiosis. OR logic gate This audio file was created from a revision dated 2006-07-21, and does not reflect subsequent edits to the article. (Audio help) In logic and mathematics, or, also known as logical disjunction or inclusive disjunction, is a logical operator that results in true whenever one or more of its operands are true. E.g. in this context, "A or B" is true if A is true, or if B is true, or if both A and B are true. In grammar, or is a coordinating conjunction. In ordinary language "or" sometimes has the meaning of exclusive disjunction.
[edit] NotationOr is usually expressed with an infix operator. In mathematics and logic, it is usually ∨; in electronics +; and in programming languages, | or or. Some programming languages have a related control structure, the short-circuit or, written ||, or else, etc. [edit] DefinitionLogical disjunction is an operation on two logical values, typically the values of two propositions, that produces a value of false if and only if both of its operands are false. More generally a disjunction is a logical formula that can have one or more literals separated only by ORs. A single literal is often considered to be a degenerate disjunction. [edit] Truth tableThe truth table of p OR q is:
[edit] Venn diagramThe Venn diagram of "p or q" (red is true) [edit] PropertiesThe following properties apply to disjunction:
[edit] SymbolThe mathematical symbol for logical disjunction varies in the literature. In addition to the word "or", the symbol " All of the following are disjunctions: The corresponding operation in set theory is the set-theoretic union. [edit] Applications in computer scienceOperators corresponding to logical disjunction exist in most programming languages. [edit] Bitwise operationDisjunction is often used for bitwise operations. Examples:
The [edit] Logical operationMany languages distinguish between bitwise and logical disjunction by providing two distinct operators; in languages following C, bitwise disjunction is performed with the single pipe ( Logical disjunction is usually short-circuited; that is, if the first (left) operand evaluates to Although in most languages the type of a logical disjunction expression is boolean and thus can only have the value [edit] Constructive disjunctionThe Curry-Howard correspondence relates a constructivist form of disjunction to tagged union types. [edit] UnionThe union used in set theory is defined in terms of a logical disjunction: x ∈ A ∪ B if and only if (x ∈ A) ∨ (x ∈ B). Because of this, logical disjunction satisfies many of the same identities as set-theoretic union, such as associativity, commutativity, distributivity, and de Morgan's laws. [edit] Notes
[edit] See also[edit] External links
| |||||||||||||||||||||||||||||||||||||||
| ↑ top of page ↑ | about thumbshots |