A fundamental concept in computer science. It explains how logical
statements (propositions) can be combined and modified using operators like
negation (NOT), conjunction (AND), disjunction (OR), exclusive OR (XOR),
implication, and biconditional. Truth tables is a method for determining the truth
value of complex logical formulas.
Propositional logic deals with propositions, which are sentences that can be either
true or false.
Logical operators like AND, OR, NOT, XOR, implication, and biconditional are used
to combine and modify propositions.
Truth tables are used to determine the truth value of logical formulas for all
possible combinations of variable values.
Example:
1.Delhi is the capital of India
2.1+3=5
Therefore,1 is true & 2 is false this is a propositional
The statements have two types:
1. Atomic statement or simple statement
2. Molecular statement or compound statement
1.Atomic statement or simple statement:
A statement which cannot be divided into further meaningful simple
statements.
Eg: 1. 2 is an even number
, Molecular statement or compound statement:
A statement which consist of more than one atomic statement
Eg:
1.Tamil is a language and Chennai is the capital of Tamilnadu
Logic:
Logic is fundamental to computers, dictating their actions based on true or false
statements. It governs scenarios like playing a ringtone only when the phone isn't
on silent or enabling a login button only after a username and password are
provided. Computer scientists use formal logical systems, such as propositional
logic, to express ideas about statements and their truth values with precision.
Propositions
Propositional logic deals with propositions, which are sentences that can be either
true or false. A proposition, such as "The robot is blue," can be represented by a
variable like 'P'. The truth value of the proposition depends on the state of the
world; it's true if the robot is indeed blue and false otherwise. Combining and
modifying these logical variables creates more complex logical formulas.
Negation (Not):
The negation of a proposition reverses its truth value. If P represents "The robot is
blue," then "not P" (represented by ¬P) is true when the robot is not blue. Negation
is a way to modify a single logical formula.
p ¬P
T F
F T
It is a unary operator