Logical disjunction
Encyclopedia
|
| Tutorials | Encyclopedia | Dictionary | Directory |
|
Logical disjunction
OR logic gate. 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. In grammar, or is a coordinating conjunction. In ordinary language "or" rather has the meaning of exclusive disjunction.
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. Truth tableThe truth table of p OR q (also written as p?q (logic), p || q (in C-family languages in computer programming), or p + q (electronics)) is as follows:
Venn diagramThe Venn diagram of "p or q" (red is true) PropertiesThe following properties apply to disjunction:
SymbolThe mathematical symbol for logical disjunction varies in the literature. In addition to the word "or", the symbol "\or", deriving from the Latin word vel for "or", is commonly used for disjunction. For example: "A \or B " is read as "A or B ". Such a disjunction is false if both A and B are false. In all other cases it is true. All of the following are disjunctions:
The corresponding operation in set theory is the set-theoretic union. Applications in computer scienceOperators corresponding to logical disjunction exist in most programming languages. Bitwise operationDisjunction is often used for bitwise operations. Examples:
The 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 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. Notes
See also
External links
bs:Disjunkcija sudova bg:????????? ????????? cs:Disjunkce da:Disjunktion de:Disjunktion et:Disjunktsioon es:Disyunción lógica eo:Logika a?o fa:??? ????? fr:Disjonction logique ko:??? id:Logika disjungsi it:Disgiunzione inclusiva he:?? (??????) lt:Disjunkcija mk:??????? ??????????? nl:Logische disjunctie ja:??? no:Inklusiv disjunksjon pl:Alternatywa pt:Disjunção lógica ro:Disjunc?ie logic? ru:?????????? simple:Inclusive disjunction sk:Disjunkcia (logika) sr:??????????? sv:Disjunktion (logik) th:?????????????????????? uk:???'?????? (???????) Source: Wikipedia | The above article is available under the GNU FDL. | Edit this article
|
|
top
©2008-2009 TutorGig.com. All Rights Reserved. Privacy Statement