Math Home

Logic

In mathematical logic, statements have one of two values: True (T) or False (F). This creates a two value system.

Most children start learning math when they learn to count. The counting sequence, \(1, 2, 3, \dots\) is infinite, and infinity is a difficult concept even for adults. Then they add 0 to the system, and negatives, and irrationals, etc. It is a very technical and complicated system. The system we are studying now only has 2 points: T and F.

In this section, we take different parts of speech and formally define logical operations on the T, F space.

Negation

Negation will "flip" the value. The symbol for negation is \(\neg\). The statement \(\neg P\) is read "not P". Written as formula: \(\neg T = F\) and \(\neg F = T\).

Conjunction

The symbol for conjunction (and/but) is \(\wedge\). The statement \(P \wedge Q\) is read "P and Q". Written as formula: \(T \wedge T = T\), \(T \wedge F = F\), \(F \wedge T = F\), and \(F \wedge F = F\).

Disjunction

There are two symbols for disjunction.

The symbol for inclusive or is \(\vee\). The statement \(P \vee Q\) is read "P or Q". Written as formula: \(T \vee T = T\), \(T \vee F = T\), \(F \vee T = T\), and \(F \vee F = F\).

The symbol for exclusive or is \(\oplus\). The statement \(P \oplus Q\) is read "P exclusive or Q". Written as formula: \(T \oplus T = F\), \(T \oplus F = T\), \(F \oplus T = T\), and \(F \oplus F = F\).

Truth tables are similar to addition or multiplication tables. But, when learning addition, we cannot list all possible sums. We need to create algorithms so we can, in theory, compute a sum of any two numbers. In logic, we only have two states. So, we can define an operation by computing for all possible inputs as we did above. A truth table give us an organized way to do this.

The following are the truth tables of the operations listed above.

\(P\)

T

F

T

F

\(\neg P\)

F

T

F

T

\(P\)

T

T

F

F

T

T

F

F

\(Q\)

T

F

T

F

T

F

T

F

\(P \wedge Q\)

T

F

F

F

T

F

F

F

\(P\)

T

T

F

F

T

T

F

F

\(Q\)

T

F

T

F

T

F

T

F

\(P \vee Q\)

T

T

T

F

T

T

T

F

\(P\)

T

T

F

F

T

T

F

F

\(Q\)

T

F

T

F

T

F

T

F

\(P \oplus Q\)

F

T

T

F

F

T

T

F

Try entering values for \(P\) and \(Q\).

\(P \wedge Q=\) T

\(P \vee Q=\) T

\(P \oplus Q=\) F

\(\neg P=\) F

\(\neg Q=\) F\(P \wedge Q=\) T

\(P \vee Q=\) T

\(P \oplus Q=\) F