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

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

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

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

View Full Document
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
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

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

View Full Document
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.
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
Ask a homework question - tutors are online