1.1 Propositional Logic: Proposition
1.1 Propositional Logic: Proposition
Proposition Logic
Definition: Propositional Logic deals with statements (propositions) and compound statements
built from simpler statements using logical connectives.
Exclusive OR
Negation
p q p⊕q
p ¬p T T F
T F T F T
F T F T T
F F F
Conjunction
Implication
p q p∧q
T T T p q p→q
T F F T T T
F T F T F F
F F F F T T
F F T
Disjunction (Inclusive OR)
Biconditional
p q p∨q
T T T p q p↔q
T F T T T T
F T T T F F
F F F F T F
F F T
1
[INT 1358]: Discrete Mathematics I
1.1 pg. 13 # 13
Let p and q be the propositions
• p: You drive over 65 miles per hour.
b) You drive over 65 miles per hour, but you do not get a speeding ticket.
p ∧ ¬q
c) You will get a speeding ticket if you drive over 65 miles per hour.
p→q
f) You get a speeding ticket, but you do not drive over 65 miles per hour. q ∧ ¬p
g) Whenever you get a speeding ticket, you are driving over 65 miles per hour.
q→p
1.1 pg. 14 # 23
Write each of these statements in the form “if p, then q” in English. [Hint: Refer to the list of
common ways to express conditional statements.]
c) That the Pistons win the championship implies that they beat the Lakers.
If the Pistons win the championship, then they beat the Lakers.
2
[INT 1358]: Discrete Mathematics I
1.1 pg. 14 # 25
Write each of these propositions in the form “p if and only if q” in English.
a If it is hot outside you buy an ice cream cone, and if you buy an ice cream cone, it is hot
outside.
You buy an ice cream cone if and only if it is hot outside.
b For you to win the contest it is necessary and sufficient that you have the only winning ticket.
You win the contest if and only if you have the only winning ticket.
c You get promoted only if you have connections, and you have connections only if you get
promoted.
You get promoted if and only if you have connections.
1.1 pg. 15 # 33
Construct a truth table for each of these compound propositions
a) (p ∨ q) → (p ⊕ q)
p q p∨q p⊕q (p ∨ q) → (p ⊕ q)
T T T F F
T F T T T
F T T T T
F F F F T
c) (p ∨ q) ⊕ (p ∧ q)
p q p∨q p∧q (p ∨ q) ⊕ (p ∧ q)
T T T T F
T F T F T
F T T F T
F F F F F
d) (p ↔ q) ⊕ (¬p ↔ q)
p q ¬p p ↔ q ¬p ↔ q (p ↔ q) ⊕ (¬p ↔ q)
T T F T F T
T F F F T T
F T T F T T
F F T T F T
3
[INT 1358]: Discrete Mathematics I
1.1 pg. 15 # 37
Construct a truth table for each of these compound propositions
a) p → (¬q ∨ r)
p q r ¬q ¬q ∨ r p → (¬q ∨ r)
T T T F T T
T T F F F F
T F T T T T
T F F T T T
F T T F T T
F T F F F T
F F T T T T
F F F T T T
b) ¬p → (q → r)
p q r ¬p q → r ¬p → (q → r)
T T T F T T
T T F F F T
T F T F T T
T F F F T T
F T T T T T
F T F T F F
F F T T T T
F F F T T T
d) (p → q) ∧ (¬p → r)
p q r ¬p p → q ¬p → r (p → q) ∧ (¬p → r)
T T T F T T T
T T F F T T T
T F T F F T F
T F F F F T F
F T T T T T T
F T F T T F F
F F T T T T T
F F F T T F F
f) (¬p ↔ ¬q) ↔ (q ↔ r)
4
[INT 1358]: Discrete Mathematics I
Bit Operations
A bit string is a sequence of zero or more bits. The length of this string is the number of bits in
the string.
The bitwise OR, bitwise AND, and bitwise XOR of two strings of the same length to be the
strings that have as their bits the OR, AND, and XOR of the corresponding bits in the two strings,
respectively. We use the symbols ∨, ∧, and ⊕ to represent the bitwise OR, bitwise AND, and
bitwise XOR operations, respectively.
1.1 pg. 16 # 43
Find the bitwise OR, bitwise AND, and bitwise XOR of each of these pairs of bit strings.