mathematics for computing
DESCRIPTION
Mathematics for Computing. Lecture 2: Computer Logic and Truth Tables Dr Andrew Purkiss-Trew Cancer Research UK [email protected]. Logic. Propositions Connective Symbols / Logic gates Truth Tables Logic Laws. Propositions. - PowerPoint PPT PresentationTRANSCRIPT
Mathematics for Computing
Lecture 2:Computer Logic and Truth Tables
Dr Andrew Purkiss-TrewCancer Research UK
Propositions
Definition: A proposition is a statement that is either true or false. Which ever of these (true or false) is the case is called the truth value of the proposition.
Connectives
Compound propositione.g. ‘If Brian and Angela are not both happy, then either Brian is not happy or Angela is not happy’
Atomic proposition:‘Brian is happy’ ‘Angela is happy’
Connectives:and, or, not, if-then
Conjugation
Logical ‘and’
Symbol ٨Written p ٨ q Alternative forms p & q, p . q, pqLogic gate version
pq pq
Compound Propositions
p q ~q
T T F
T F T
F T F
F F T
~(p ٨ ~q)
p q ~q p ٨~q
T T F F
T F T T
F T F F
F F T F
p q ~q p ٨~q ~(p ٨ ~q)
T T F F T
T F T T F
F T F F T
F F T F T
p q
T T
T F
F T
F F
Mathematics for Computing
Lecture 3:Computer Logic and Truth Tables 2
Dr Andrew Purkiss-TrewCancer Research UK
Logical Equivalence
Logical ‘equals’
Symbol ≡
Written p ≡ p
p q ~p ~q ~p ٨ ~q
~(~p ٨ ~q)
T T F F F T
T F F T F T
F T T F F T
F F T T T F
p ٧ q
T
T
T
F