Logical conjunction

In logic and/or mathematics, logical conjunction or and is a two-place logical operation that results in a value of true if both of its operands are true, otherwise a value of false.


Logical conjunction is an operation on two logical values, typically the values of two propositions, that produces a value of true if and only if both of its operands are true.

Truth table

The truth table of p AND q (also written as or in logic, in many programming languages, or pcdotq in electronics):

p q

Venn diagram

The Venn diagram of "A and B" (the red area is true)

The analogue of conjunction for a (possibly infinite) family of statements is universal quantification, which is part of predicate logic.

Introduction and elimination rules

As a rule of inference, conjunction introduction is a classically valid, simple argument form. The argument form has two premises, A and B. Intuitively, it permits the inference of their conjunction.

Therefore, A and B.

or in logical operator notation:

vdash A and B

Here is an example of an argument that fits the form conjunction introduction:

Everyone should vote.
Democracy is the best system of government.
Therefore, everyone should vote and democracy is the best system of government.

Conjunction elimination is another classically valid, simple argument form. Intuitively, it permits the inference from any conjunction of either element of that conjunction.

A and B.
Therefore, A.

...or alternately,

A and B.
Therefore, B.

In logical operator notation:

A and B
vdash A

...or alternately,

A and B
vdash B


The following properties apply to conjunction:

(a land (b land c)) equiv ((a land b) land (a land c))

(a rightarrow b) rightarrow ((a land c) rightarrow (b land c))

  • truth-preserving: The interpretation under which all variables are assigned a truth value of 'true' produces a truth value of 'true' as a result of conjunction.
  • falsehood-preserving: The interpretation under which all variables are assigned a truth value of 'false' produces a truth value of 'false' as a result of conjunction.

If using binary values for true (1) and false (0), then logical conjunction works exactly like normal arithmetic multiplication.

Applications in computer programming

In high-level computer programming, logical conjunction is commonly represented by an infix operator, usually as a keyword such as "AND" or the ampersand symbol "&". Many languages also provide short-circuit control structures corresponding to logical conjunction.

Logical conjunction is often used for bitwise operations, where 0 corresponds to false and 1 to true:

  • 0 AND 0  =  0,
  • 0 AND 1  =  0,
  • 1 AND 0  =  0,
  • 1 AND 1  =  1.

The operation can also be applied to two binary words viewed as bitstrings of equal length, by taking the bitwise AND of each pair of bits at corresponding positions. For example:

  • 11000110 AND 10100011  =  10000010.

This can be used to select part of a bitstring using a bit mask. For example, 10011101 AND 00001000  =  00001000 extracts the fifth bit of an 8-bit bitstring.

In computer networking, bit masks are used to derive the network address of a subnet within an existing network from a given IP address, by ANDing the IP address and the subnet mask.

Logical conjunction "AND" is also used in SQL operations to form database queries.

Set-theoretic intersection

The intersection used in set theory is defined in terms of a logical conjunction: xAB if and only if (xA) ∧ (xB). Because of this, set-theoretic intersection shares several properties with logical conjunction, such as associativity, commutativity, and idempotence.

Rhetorical considerations

The classical "trivium" divides the study of articulate argumentation into the disciplines of grammar, logic, and rhetoric. Grammar concerns those aspects of language that are internal to the language itself, in other words, that can be abstracted from considerations of the object world and the language user. Logic deals with the properties of language and reasoning that are independent of particular manners of interpretation and invariant over conceivable languages. Rhetoric treats those aspects of language and its use in reasoning that necessarily take the nature of the interpreter into consideration.

Natural languages are evolved for many purposes beyond their use in logical argumentation, and so any study of logic in a natural language context must sort out those aspects of natural language that are pertinent to its use in logic and those that are not.

English "and" has properties not captured by logical conjunction, because "and" can sometimes imply order. For example, "They got married and had a child" in common discourse means that the marriage came before the child. Then again the word "and" in common usage can imply a partition of a thing into parts, as "The American flag is red, white, and blue." Here it is not meant that the flag is at once red, white, and blue, but rather that it has a part of each color.

A minor issue of logic and language is the role of the word "but". Logically, the sentence "it's raining, but the sun is shining" is equivalent to "it's raining, and the sun is shining", so logically, "but" is equivalent to "and". However, "but" and "and" are semantically distinct in natural language. Speakers use "but", a conjunction of contradiction, to mark their surprise or reservation vis-a-vis a circumstance that goes against a trend.

One way to resolve this problem of correspondence between symbolic logic and natural language is to observe that the first sentence (using "but"), implies the existence of a hidden but mistaken assumption, namely that the sun does not shine when it rains. We might say that, given probability p that it rains and the sun shines, and probability 1 − p that it rains and the sun does not shine, or that it does not rain at all, we would say "but" in place of "and" when p was low enough to warrant our incredulity.

That implication captures the semantic difference of "and" and "but" without disturbing their logical equivalence. On the other hand, in Brazilian logic, the logical equivalence is broken between A BUT NOT B (where "BUT NOT" is a single operator) and A AND (NOT B), which is a weaker statement.

"But" is also sometimes disjunctive (It never rains but it pours); sometimes minutive (Canada has had but three shots on goal); sometimes contrastive (He was not God, but merely an exalted man); sometimes a spatial preposition (He's waiting but the house); and sometimes interjective (My, but that's a lovely boat). These uses await semantic assimilation with conjunctive "but".

Like "and", "but" is sometimes non-commutative: "He got here, but he got here late" is not equivalent to "He got here late, but he got here". This example shows also that unlike "and", "but" can be felicitously used to conjoin sentences that entail each other; compare "He got here late, and he got here".

See also

External links

Search another word or see conjoinon Dictionary | Thesaurus |Spanish
Copyright © 2014, LLC. All rights reserved.
  • Please Login or Sign Up to use the Recent Searches feature