Software Engineering
Home Planning Requirements Writing Hazard Analysis Requirement Analysis Config Control Software Design Software Testing Software Standards Basic Logic

Basic Logic - The Implication Operator

In binary logic, we know about operators such as AND, OR, NOT. Another operator that is important in logic and in test design is the implies operator.

A -> B   (A implies B)

Another way of stating the implies operator is with if…then:

IF A THEN B

The truth table is:

A

B

A -> B

0

0

1

*

0

1

1

 **

1

0

0

Logical contradiction!

1

1

1

* Note that if A = 0 and A causes B, then it is valid if A=0 and B=0, therefore A -> B = 1.

**Note that even if A=0, the result is True (1). This is because there may be other causes that result in B becoming True. Therefore, it is valid for A to be False and A -> B to be True.

For example:

IF (A) I turn the light on THEN (B) I’ll be able to see.
If the light is off (A = 0), what other conditions could allow me to see (B = 1)?
Possible answers: candles, night vision equipment, opening the blinds.

The only contradiction is for A to be True and B to be False; therefore it is the only condition where A -> B is False.

Another way of stating IF A THEN B is to say that there is a relationship between A and B. A may cause B, or it may simply occur in conjunction with B. The nature of the relationship need not be cause-effect (or as they say in statistics - correlation is not causation).

The truth table is:

A

B

A -> B

0

0

1

Deny the consequent.

0

1

1

1

0

0

Contradiction!

1

1

1

Affirm the antecedent.

If it is true that the relationship A -> B exists, then only two valid conclusions can be drawn from data:

  1. Affirm the antecedent. If A is True (1) then B must be True (1), because if B is False it creates a contradiction.

  2. Deny the consequent. If B is False (0) then A must be False (0); because if A is true it creates a contradiction.

 

Formal Logical Fallacies:

  • Affirming the consequent. If B is True, then concluding that A is True is a formal fallacy. NO conclusion can be drawn about A; it could be either True or False!

  • Denying the antecedent. If A is False, then assuming that B is False is a formal fallacy. NO conclusion can be drawn about B; it could be either True or False.