Tutorial_3 - Tutorial 3 1. State whether each of the...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Tutorial 3 1. State whether each of the following is true or false. If false, tell why. a. !(p || q) is the same as !p || !q b. !!!p is the same as !p 2. Construct a truth table for each of the following boolean expressions, showing its truth value (0 or 1) for all 4 combinations of truth values of its operands p and q. a.!p || q p q !p || q 0 0 1 0 1 1 1 0 0 1 1 1 a. p q p&&q || !p&&!q 0 0 1 0 1 0 1 0 0 1 1 1 b. p q (p||q) && !(p&&q) 0 0 0
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
0 1 1 1 0 1 1 1 0 3. Use truth tables to determine whether the two boolean expressions in each of the following are equivalent. a. p q !(p && q) 0 0 1 0 1 1 1 0 1 1 1 0 p q !p && !q 0 0 1 0 1 0 1 0 0 1 1 0 b. !!p and p p !!p 0 0 1 1 p p
Background image of page 2
0 0 1 1 !!p and p are equivalent . c. !p || q and p || !q p q !p || q 0 0 1 0 1 1 1 0 0 1 1 1 p q p || !q 0 0 1 0 1 0 1 0 1 1 1 1 !p || q and p || !q are not equivalent . d. p q r p && (q && r) 0 0 0 0 0 0 1 0 0 1 1 0 1 1 1 1 1 0 0 0
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
1 0 0 0 1 0 0 1 0 1 0 p q r (p && q) && r 0 0 0 0 0 0 1 0 0 1 1 0 1 1 1 1 1 0 0 0 1 1 0 0 0 1 0 0 1 0 1 0 e.
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/15/2012 for the course BIOINFO, B SHES1202 taught by Professor Idonotknow during the Spring '11 term at University of Malaya.

Page1 / 8

Tutorial_3 - Tutorial 3 1. State whether each of the...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online