The 6 Logical Connectives: Complete Guide with Truth Tables

2. The 6 Logical Connectives: Complete Guide with Truth Tables

In this guide, you’ll learn everything about logical connectives, also known as logical operators. These operators are widely used in mathematics, programming, and everyday reasoning, and we’ll study each one in detail.

What is a Logical Connective?

logical connective is a symbol or operator that allows you to combine propositions to form new compound propositions. The truth value of the resulting proposition depends on:

  1. The truth values of the original propositions
  2. The type of connective used

Logical connectives are essential in:

  • Propositional logic – For constructing valid arguments
  • Programming – In conditional structures (if, while, etc.)
  • Mathematics – For proving theorems and developing theories
  • Digital circuits – For designing logic gates

The 6 Main Logical Connectives

ConnectiveNameSymbolExample
NegationNOT¬, ~, ′¬p
ConjunctionAND∧, ·p ∧ q
DisjunctionORp ∨ q
ConditionalIF-THEN→, ⊃p → q
BiconditionalIF AND ONLY IF↔, ≡p ↔ q
Exclusive DisjunctionXOR⊻, ⊕p ⊻ q

1. Negation (¬)

Negation is the simplest connective. It’s a unary operator, meaning it acts on a single proposition.

Definition

Negation reverses the truth value of a proposition:

  • If p is true, then ¬p is false
  • If p is false, then ¬p is true

Negation Symbols

SymbolCommon Use
¬pMathematical logic
~pLogic and some programming languages
p′Boolean algebra
!pProgramming (C, Java, JavaScript)
NOT pNatural language, SQL

Ways to Express Negation

  • “Not p”
  • “It is not the case that p”
  • “It is false that p”
  • “p is not true”

Truth Table for Negation

p¬p
TF
FT

Examples

Proposition pNegation ¬p
“Today is Monday”“Today is NOT Monday”
“Water boils at 100°C”“Water does NOT boil at 100°C”
“5 is greater than 3”“5 is NOT greater than 3”

Property: Double Negation

The negation of a negation returns the original value:

\(\neg(\neg p) \equiv p\)

Example: “It is not false that 2+2=4” is equivalent to “2+2=4”

2. Conjunction (∧)

Conjunction connects two propositions and is true only when both are true.

Definition

The compound proposition p ∧ q is true only if:

  • p is true AND
  • q is true

In any other case, the conjunction is false.

Conjunction Symbols

SymbolCommon Use
p ∧ qMathematical logic
p · qBoolean algebra
p & qSome texts
p && qProgramming (C, Java, JavaScript)
p AND qSQL, natural language

Ways to Express Conjunction in English

Conjunction isn’t only expressed with “and.” It also includes:

Word/PhraseExample
and“It’s raining and it’s cold”
but“It’s expensive but it’s good”
moreover“She studies, moreover she works”
however“He’s young, however he’s responsible”
althoughAlthough he’s tired, he keeps working”
while“She studies while listening to music”
despiteDespite the difficulty, he tries”

Note: In logic, all these expressions are formalized the same way: p ∧ q

Truth Table for Conjunction

pqp ∧ q
TTT
TFF
FTF
FFF

Conjunction is true only in the first row.

Examples

Example 1: “The number 4 is even and is greater than 2″

  • p: “4 is even” → T
  • q: “4 is greater than 2” → T
  • p ∧ q → T

Example 2: “Today is Monday and it’s raining”

  • If today is Monday but it’s not raining: p ∧ q → F
  • If today isn’t Monday even though it’s raining: p ∧ q → F
  • Only true if both conditions are met

3. Inclusive Disjunction (∨)

Disjunction (also called “logical OR”) connects two propositions and is true when at least one is true.

Definition

The compound proposition p ∨ q is true if:

  • p is true, OR
  • q is true, OR
  • both are true

It’s only false when both are false.

Disjunction Symbols

SymbolCommon Use
p ∨ qMathematical logic
p + qBoolean algebra
p || qProgramming (C, Java, JavaScript)
p OR qSQL, natural language

Why Is It Called “Inclusive”?

It’s called inclusive because it includes the case where both propositions are true. In formal logic, “p or q” means “p, q, or both.”

This differs from everyday use of “or” in English. For example:

Everyday PhraseCommon InterpretationLogical Interpretation
“Do you want coffee or tea?”Only oneOne, the other, or both
“You can pay with cash or card”Only oneOne, the other, or both

Note: It’s understood that you could pay part with cash and the rest with card if that’s the case, so logically it can be interpreted as “both.”

Truth Table for Disjunction

pqp ∨ q
TTT
TFT
FTT
FFF

Disjunction is false only in the last row.

Examples

Example 1: “To get the job, you must know English or French”

  • If you know only English → T
  • If you know only French → T
  • If you know both → T
  • If you know neither → F

Example 2: “The number x is less than 5 or greater than 10″

  • If x = 3 → T (satisfies the first)
  • If x = 15 → T (satisfies the second)
  • If x = 7 → F (satisfies neither)

4. The Conditional (→)

The conditional (also called material implication) expresses an “if… then…” relationship between two propositions.

Definition

In the proposition p → q:

  • p is the antecedent (hypothesis, condition)
  • q is the consequent (conclusion, result)

The proposition p → q is false only when:

  • The antecedent (p) is true AND
  • The consequent (q) is false

In all other cases, it is true.

Conditional Symbols

SymbolCommon Use
p → qMathematical logic
p ⊃ qClassical logic
p ⇒ qSome texts
if p then qProgramming, natural language

Ways to Express the Conditional in English

Word/PhraseExample
If… thenIf it rains, then I get wet”
WheneverWhenever you study, you pass”
WhenWhen it’s cold, I wear a coat”
Only if“I’ll go out only if I finish work”
Implies“Being a mammal implies being a vertebrate”
Sufficient for“Studying is sufficient for passing”
Necessary for“Passing is necessary for graduating”

Truth Table for the Conditional

pqp → q
TTT
TFF
FTT
FFT

The conditional is false only in the second row.

Examples

Example 1: “If you study, then you will pass”

  • p: “You study”
  • q: “You will pass”
  • Only false if you study and don’t pass

Example 2: “If 12 is divisible by 4, then 12 is divisible by 2”

  • p: “12 is divisible by 4” → T
  • q: “12 is divisible by 2” → T
  • p → q → T (the implication is true)

Propositions Derived from the Conditional

From a conditional p → q, four related propositions can be formed:

NameFormDescription
Direct (Original)p → qThe original proposition
Converseq → pAntecedent and consequent are swapped
Inverse¬p → ¬qBoth parts are negated
Contrapositive¬q → ¬pBoth are negated and swapped

Example

Given the proposition: “If it rains, then the street gets wet” (p → q)

TypeProposition
DirectIf it rains, then the street gets wet
ConverseIf the street gets wet, then it rains
InverseIf it doesn’t rain, then the street doesn’t get wet
ContrapositiveIf the street isn’t wet, then it didn’t rain

Important Relationships

  • The direct and contrapositive always have the same truth value
  • The converse and inverse always have the same truth value

Note: The converse of a true proposition is NOT always true. For example, “If it rains, the street gets wet” is true, but “If the street is wet, it rained” may be false (the street could be wet for another reason).

For further reading: The equivalences between these propositions will be studied in detail in the chapter on Laws of Equivalence and Implication.

The Paradoxes of Material Implication

The truth table of the conditional produces results that seem counterintuitive. These are known as the paradoxes of material implication.

Paradox 1: “From falsehood, anything follows”

When the antecedent is false, the implication is true regardless of the consequent. This phenomenon is called vacuous truth.

ExampleIs it true?
“If 2+2=5, then the Moon is made of cheese”True
“If the Earth is flat, then I’m a millionaire”True
“If pigs fly, then 1=0”True

Why? Because the antecedent is false, the condition is never “triggered,” so there’s no way for the implication to fail.

Paradox 2: “Truth is implied by anything”

When the consequent is true, the implication is true regardless of the antecedent.

ExampleIs it true?
“If the Moon is made of cheese, then 2+2=4”True
“If I’m the president, then water is H₂O”True

Why Do These Paradoxes Occur?

Material conditional in classical logic:

  • Does not require a causal connection between p and q
  • Does not require thematic relevance between p and q
  • Only defines when it’s impossible for p→q to be false

Historical note: Philosopher C.I. Lewis systematically identified these paradoxes in 1918. As an alternative, he proposed relevant logic, which does require a connection between antecedent and consequent.

5. The Biconditional (↔)

The biconditional (also called double implication or equivalence) expresses that two propositions have the same truth value.

Definition

The proposition p ↔ q is true when:

  • Both are true, OR
  • Both are false

It’s false when they have different truth values.

Biconditional Symbols

SymbolCommon Use
p ↔ qMathematical logic
p ⇔ qSome texts
p ≡ qLogical equivalence
p iff q“if and only if”

Ways to Express the Biconditional in English

Word/PhraseExample
If and only if“You pass if and only if you get 60% or more”
When and only when“It’s an equilateral triangle when and only when it has 3 equal sides”
Is equivalent to“Being even is equivalent to being divisible by 2″
Is necessary and sufficient“Being 18 years old is necessary and sufficient to vote”

Truth Table for the Biconditional

pqp ↔ q
TTT
TFF
FTF
FFT

The biconditional is true when p and q have the same value.

Fundamental Equivalence

The biconditional is equivalent to the conjunction of two conditionals (specifically the direct and the converse):

\(p \leftrightarrow q \equiv (p \rightarrow q) \land (q \rightarrow p)\)

This means: “if p then q” AND “if q then p”

Examples

Example 1: “A triangle is equilateral if and only if its three sides are equal”

  • If it’s equilateral → it has 3 equal sides ✓
  • If it has 3 equal sides → it’s equilateral ✓
  • Biconditional is true

Example 2: “You pass the course if and only if you get 60% or more”

  • If you pass → you have 60%+ ✓
  • If you have 60%+ → you pass ✓
  • Biconditional is true

Example 3: “A number is even if and only if it is divisible by 2″

  • The definition of an even number is always divisible by 2, so this is always true.

6. Exclusive Disjunction (⊻)

Exclusive disjunction (also called XOR) is true when exactly one of the propositions is true, but not both.

Definition

The proposition p ⊻ q is true if:

  • p is true and q is false, OR
  • p is false and q is true

It’s false when both have the same truth value.

Exclusive Disjunction Symbols

SymbolCommon Use
p ⊻ qMathematical logic
p ⊕ qBoolean algebra, circuits
p XOR qProgramming, technical language
p ^ qSome languages (C, Python for bitwise)

Ways to Express Exclusive Disjunction in English

Word/PhraseExample
Either… or (but not both)Either you’re a man or you’re a woman”
One or the other, not both“The number is even or odd, not both
Exclusively“You can choose exclusively soup or salad”

Relationship with the Biconditional

Exclusive disjunction is the negation of the biconditional:

\(p \veebar q \equiv \neg(p \leftrightarrow q)\)

Compare the truth tables:

pqp ↔ qp ⊻ q
TTTF
TFFT
FTFT
FFTF

The values are exactly opposite!

Examples in Everyday Language

In everyday language, many uses of “or” are actually exclusive:

PhraseInterpretation
“Are you a man or a woman?”Only one
“You either pass the exam or fail”Only one
“The number is even or odd”Only one
“You can choose soup or salad” (on a menu)Only one

Applications in Digital Circuits

The XOR gate has multiple applications in digital electronics:

ApplicationDescription
Binary addersXOR simulates adding 2 bits without carry
ComparatorsIf XOR = 0, the bits are equal
Parity detectionVerifies errors in data transmission
EncryptionFundamental operation in cryptography
Pseudorandom numbersGenerates sequences that simulate randomness

Historical fact: The Apollo 11 guidance computer (1969) was built entirely with NOR gates, demonstrating that a single type of gate can implement any logical function.

Operator Hierarchy (Order of Precedence)

When a logical expression has multiple connectives, which one is evaluated first? The operator hierarchy establishes the order of evaluation.

Precedence Table

PriorityOperatorSymbolEvaluated
1 (highest)Parentheses( )First
2Negation¬Second
3ConjunctionThird
4DisjunctionFourth
5ConditionalFifth
6 (lowest)BiconditionalLast

Application Examples

Example 1: ¬p ∧ q

  • First, evaluate ¬p
  • Then, evaluate (result) ∧ q

Example 2: p ∨ q ∧ r

  • First, evaluate q ∧ r (∧ has higher precedence than ∨)
  • Then, evaluate p ∨ (result)
  • Equivalent to: p ∨ (q ∧ r)

Example 3: p → q ∨ r

  • First, evaluate q ∨ r
  • Then, evaluate p → (result)
  • Equivalent to: p → (q ∨ r)

Using Parentheses

Parentheses always have the highest priority and can change the order of evaluation:

ExpressionEvaluation
p ∨ q ∧ rp ∨ (q ∧ r)
(p ∨ q) ∧ rDifferent result

Tip: When in doubt, use parentheses to make the order of evaluation explicit.

Tautology, Contradiction, and Contingency

When evaluating compound propositions with truth tables, we can classify them into three types based on their results.

Tautology

tautology is a compound proposition that is always true, regardless of the truth values of its components.

Classic example: p ∨ ¬p (Law of Excluded Middle)

p¬pp ∨ ¬p
TFT
FTT

Always true → Tautology

Other examples of tautologies:

  • p → p (Identity)
  • p ∨ ¬p (Excluded Middle)
  • ¬(p ∧ ¬p) (Non-contradiction)
  • (p ∧ q) → p (Simplification)

Contradiction

contradiction is a compound proposition that is always false, regardless of the truth values of its components.

Classic example: p ∧ ¬p

p¬pp ∧ ¬p
TFF
FTF

Always false → Contradiction

Other examples of contradictions:

  • p ∧ ¬p
  • ¬(p ∨ ¬p)
  • (p ↔ ¬p)

Contingency

contingency is a compound proposition that can be true or false depending on the values of its components.

Example: p → q

pqp → q
TTT
TFF
FTT
FFT

Has mixed values → Contingency

Most compound propositions are contingencies.

Summary

TypeDefinitionExample
TautologyAlways Tp ∨ ¬p
ContradictionAlways Fp ∧ ¬p
ContingencySometimes T, sometimes Fp → q

Practice Exercises

Exercise 1: Formalization

Translate the following sentences into symbolic language using:

  • p: “It’s raining”
  • q: “It’s cold”
  • r: “I’m carrying an umbrella”
  1. It’s raining and it’s cold
  2. If it rains, then I carry an umbrella
  3. It’s raining or it’s cold, but not both
  4. I carry an umbrella if and only if it’s raining
  5. It’s not raining and it’s not cold

Exercise 2: Truth Tables

Construct the truth table for the following propositions and indicate whether each is a tautology, contradiction, or contingency:

  1. (p ∧ q) → p
  2. p → (p ∨ q)
  3. (p → q) ∧ (q → p) ↔ (p ↔ q)
  4. ¬(p ∨ q) ↔ (¬p ∧ ¬q)

Exercise 3: Identifying Connectives

Identify the main connective in each sentence:

  1. “If you study and practice, then you will pass”
  2. “The number is prime or composite, but not both”
  3. “It is not true that all cats are black”
  4. “You will pass if and only if you submit the project”

Answers

Answers to Exercise 1

  1. p ∧ q
  2. p → r
  3. p ⊻ q (or also: (p ∨ q) ∧ ¬(p ∧ q))
  4. r ↔ p
  5. ¬p ∧ ¬q

Answers to Exercise 2

1. (p ∧ q) → p

pqp∧q(p∧q)→p
TTTT
TFFT
FTFT
FFFT

→ Tautology (always true)

2. p → (p ∨ q)

pqp∨qp→(p∨q)
TTTT
TFTT
FTTT
FFFT

→ Tautology

3. (p → q) ∧ (q → p) ↔ (p ↔ q)

I’ll leave this as an exercise, but I’ll clarify that it’s a tautology that demonstrates the definition of the biconditional.

4. ¬(p ∨ q) ↔ (¬p ∧ ¬q)

This is one of De Morgan’s Laws that we’ll see later, and it’s a tautology. I’ll also leave this one as homework.

Answers to Exercise 3

  1. Conditional (→) – “If… then…”
  2. Exclusive disjunction (⊻) – “or… but not both”
  3. Negation (¬) – “It is not true that…”
  4. Biconditional (↔) – “if and only if”

Additional Content

How Many Rows Does a Truth Table Have?

The number of rows in a truth table is calculated with the formula:

\[ \# \text{Rows} = 2^n\]

Where n is the number of different propositions (variables).

PropositionsRows
1 (p)2¹ = 2
2 (p, q)2² = 4
3 (p, q, r)2³ = 8
4 (p, q, r, s)2⁴ = 16
5 (p, q, r, s, t)2⁵ = 32

In upcoming chapters, we’ll explore:

  • Truth Tables: How to build them step by step
  • Laws of Equivalence and Implication: Contraposition, De Morgan, and more
  • Valid Arguments: How to use logic to prove arguments.

Did you find this post useful? Leave me a comment with your questions or suggestions! And don’t forget to check out the next installment of this series on mathematical logic.

Leave a Comment

Your email address will not be published. Required fields are marked *