Prepositional Logic Formulas and Problems – I

Next Article

Prepositional Logic is part of logic and deals with truth values of prepositions whether they are true or false. Hence it very useful in proving program correctness and other area where prepositional logic is applied.

Some common terminology used in prepositional logic are as follows.

Atomic Statements

Any simple statement that has a truth value is atomic statement.

Consider following examples

‘Delhi is capital of India’  is True statement.

What is your name ? is not a statement. Does not mean anything and it is a question.

1 + 3 = 4  is True and a good example of statement.

x + 5=8 is not because we do not know the values of x.

Compound Statements

When two or More atomic statements are joined together using a logical connectives then such a statement is called a Compound statement.

Types of Connectives

Disjunction    (∨)
Conjunction   (∧)
Negation        (¬)


It is better to use some kind of symbol to represent the atomic statement.

p : “Raju went to Market”.  [atomic]

q : “Rahul went to Market” [atomic]


p ∨ q : “Raju or Rahul went to Market “.[compound]

p ∧ q : “Raju and Rahul went to Market’.[compound]

Truth Table

Take all possible combination of truth value for atomic statements in a compound statement.

p: “Raju went to market ” is True.


q :”Rahul went to market” is False.

What would be the outcome of a compound statement made from above two statement?

For example :

(p v q) : ‘Raju or Rahul went to market’ is True because one of them went to market”.
T     F

A Truth Table represents all possible combination of truth values for an atomic or compound statement.


Logical Operation and their Truth tables

All truth table given below take variables.

p : “Raju is smart”.
¬ p : “Raju is not smart”.
q : “Raju is intelligent”.
¬q : “Raju is not intelligent”.

Truth Table for (p∨q)

Here either one of the values must be true to get a True output.
This statement means “P or Q”.


truth table p or q

Truth Table for (p ∧ q)


Here both variable value must be true to get an output of True.


Truth table p and q

It means “P and Q”.

Truth Table for (¬ p)


Variable value must be false to get  a True output.


Truth table not p


Truth Table for (p ⇒ q)

When p is True and Q is False the Output is False and all other combinations are True.

It means “P implies Q’

Truth Table p implies q

Truth Table for ( p ⇔q)

Truth table for p if and only if q

Both the values must be equal for output to be True.
It means “P if and Only if Q”.


In the next post we will discuss more about the Prepositional logic and solve some problems involving prepositional logic.


Next Article