35
Assignment 2 Sample problems

Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

  • View
    288

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

Assignment 2 Sample problems

Page 2: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

Consider the following expression:

((False and not True) or False or (True and not True))

• True• False

Page 3: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

Consider the following expression:

((False and not True) or False or (True and not True))

• True• False

Page 4: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

How can we get ?

1. (False and not True) => False and False=>False2. (True and not True) => True and False=>False3. False or False or False => False

Page 5: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

Consider the following expression:

((False and (not True or False)) and (False or True))

• True• False

Page 6: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

Consider the following expression:

((False and (not True or False)) and (False or True))

• True• False

Page 7: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

How can we get ?

1. (not True or False) => False or False=>False2. (False and (not True or False)) => False and False=>False3. (False or True)) => True4. ((False and (not True or False)) and

(False or True)) =>False and True=>False

Page 8: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

Consider the following expression:

(not not True or True) and ((False and False) or (not not True or not False))

• True• False

Page 9: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

Consider the following expression:

(not not True or True) and ((False and False) or (not not True or not False))

• True• False

Page 10: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

How can we get ?

1. (not not True or True) => True or True=>True2. (False and False) =>False3. (not not True or not False)) => True or

True =>True4. (not not True or True) and ((False and

False) or (not not True or not False)) =>True and (False or True)=>True and True=True

Page 11: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

Consider the following expression: X=True Y=False C= True

(not X and Y) or (C and X) or (not not Y or X)) • True• False

Page 12: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

Consider the following expression: X=True Y=False C= True

(not X and Y) or (C and X) or (not not Y or X)) • True• False

Page 13: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

How can we get ?

1. (not X and Y) =>not True and False=>False2. (C and X) =>True and True=>True3. (not not Y or X) => False or True =>True4. (not X and Y) or (C and X) or (not not Y

or X) =>False or True or True=>True

Page 14: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

Consider the following expression: X=True Y=False C= True

(Y and not C) and ((not (Y or X)) or (not (C and X))

• True• False

Page 15: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

Consider the following expression: X=True Y=False C= True

(Y and not C) and ((not (Y or X)) or (not (C and X))

• True• False

Page 16: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

How can we get ?1. (Y and not C) =>False and False=>False2. (not (Y or X)) =>(not Y)and (not X)=>True

and False=>False3. (not (C and X))=> (not C) or (not X)

=>False or False=>False4. (Y and not C) and ((Y or not X) or (not not

C and not X)) =>False and (False or False)=>False

Page 17: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

Without knowing whether X is true or false, the result of

not X and X • True• False

Page 18: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

Without knowing whether X is true or false, the result of

not X and X • True• False

Page 19: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

How can we get ?

1. (not X and X ) X=True: =>False and False=>False X= False: =>True and False=>False

Page 20: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

Consider the following circuit. light is on in function of a, b, c

ba

c

Page 21: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

Consider the following circuit. light is on in function of a, b, c

ba

c

(a and b) or c

Page 22: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

Fill in the following truth table by entering True or False in the blanks

A B A and (B or not A)

False False

False True

True False

True True

Page 23: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

Fill in the following truth table by entering True or False in the blanks

A B A and (B or not A)

False False False

False True False

True False False

True True True

Page 24: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

How can we get ?

A and (B or not A)1. False and (False or not False) =>False

and true=>False2. False and (True or not False)=>False and

True => False3. True and (False or not True)=>True and

False=> False4. True and (True or not True)=> True and

True=>True

Page 25: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

For each of the truth tables below, write a logical expression to match the truth table (i.e. C = something that can include As, Bs, nots, ands, and ors). The simplest answer is preferred.

A B C

False False False

False True True

True False False

True True False

Page 26: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

For each of the truth tables below, write a logical expression to match the truth table (i.e. C = something that can include As, Bs, nots, ands, and ors). The simplest answer is preferred.

The answer is (not A) and B

A B C

False False False

False True True

True False False

True True False

Page 27: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

How can we get ?

In the truth table, we find (not A) and B in the second row can make C is True.

Page 28: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

For each of the truth tables below, write a logical expression to match the truth table (i.e. C = something that can include As, Bs, nots, ands, and ors). The simplest answer is preferred.

A B C

False False False

False True True

True False True

True True False

Page 29: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

For each of the truth tables below, write a logical expression to match the truth table (i.e. C = something that can include As, Bs, nots, ands, and ors). The simplest answer is preferred.

The answer is (not A and B) or (A and not B)Another answer is (A or B) and (not A or not B)

A B C

False False False

False True True

True False True

True True False

Page 30: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

How can we get ?

In the truth table

A B C minterm maxterm

False False False not A and not B A or B

False True True not A and B A or not B

True False True A and not B not A or B

True True False A and B not A or not B

Page 31: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

Use the circuit shown below to answer the following

questions. A

B

C

Page 32: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

Fill in the following truth table by entering True or False in the blanks

A B C

False False

False True

True False

True True

Page 33: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

Fill in the following truth table by entering True or False in the blanks

A B C

False False False

False True True

True False False

True True False

Page 34: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

What is a logical expression for the circuit/table using boolean operators (AND, OR, NOT)?

Page 35: Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False

What is a logical expression for the circuit/table using boolean operators (AND, OR, NOT)?

The answer is : (not A) and B