Discrete Mathematics - Logic & Proofs (Propositional Logic)
Discrete Mathematics - Logic & Proofs (Propositional Logic)
PROPOSITIONAL LOGIC
Introduction
YES NO
1. conjunction
2. disjunction
3. exclusive or
Answer: p → q
“Maria will find a good job unless she does not learn
discrete mathematics.”
What is the value of the variable x after the statement
if 2 + 2 = 4 then x := x + 1
Answers:
the converse is:
“If the home team wins, then it is raining.” (q → p)
We can construct compound propositions using the negation operator and the
logical operators defined so far.
We will generally use parentheses to specify the order in which logical operators
in a compound proposition are to be applied.
By replacing true by a one and false by a zero in the truth tables for
the operators ∧, ∨, and ⊕,
A bit string is a sequence of zero or more bits. The length
of this string is the number of bits in the string.
Example: Find the bitwise OR, bitwise AND, and bitwise XOR of the bit strings 01
1011 0110 and 11 0001 1101.