3 Proposition Logic
3 Proposition Logic
Proposition Logic
Compound Propositions
Applications of Propositional
Logic
Logic on 3
propositions.
A proposition is a (declarative) statement that is
either true or false but not both.
We say that the truth value of a proposition is
either true (T) or false (F).
Examples: Islamabad is Capital of Pakistan.
(True)
– 5 + 2 = 8. (False)
It is raining today. (either
True or False)
Logic
Propositional variables (or
Overview
statement
7
Example:
Proposition A: It rains outside
Proposition B: We will see a movie
A new (combined) proposition:
If it rains outside then we will see a movie
Propositions Operators 9
Example:
“If I am elected, then I will lower taxes.”
“If you get 100% on the final, then you will
Let an
get p be
A.”the statement “Maria learns discrete
mathematics” and q the statement “Maria will find a good
job.”
Express the statement p → q as a statement in English.
“If Maria learns discrete mathematics, then she will find a
good job.”
“Maria will find a good job when she learns discrete
mathematics.”
“For Maria to get a good job, it is sufficient for her to learn
discrete mathematics.”
“Maria will find a good job unless she does not learn
We can form some new conditional statements starting
Propositions Statement
with a conditional statement p → q.
16
Let p be the statement “You can take the flight,” and let
q be the statement “You buy a ticket.”
Solution: p ↔ q is the statement
“You can take the flight if and only if you buy a ticket.”
Propositions Table 22
Propositions
symbol Operations
with two possible values, namely, 0 (zero) and 1
(one).
1 represents T (true), 0 represents F (false).
A variable is called a Boolean variable if its value is
either true or false.
Consequently, a Boolean variable can be represented
using a bit.
Computer bit operations correspond to the logical
connectives.
By replacing true by a one and false by a zero in the truth
tables for the operators ∧, ∨, and ⊕ as follows:
We will also use the notation OR, AND,
Compound Logic and Bit 26
Propositions Operations
Example:
Find the bitwise OR, bitwise AND, and bitwise XOR of the
bit strings 01 1011 0110 and 11 0001 1101.
Solution:
The bitwise OR, bitwise AND, and bitwise XOR of these
strings are obtained by taking the OR, AND, and XOR of
the corresponding bits, respectively
Proposition Logic Applications 27
Translating English
Logic Puzzles
Sentences
System Specifications Logic Circuits
Boolean Searches
Combinatorial circuit
28