Mathorio
Answer key
Boolean Expressions
Show your work for each problem.
- 1.In (no parentheses), which operation is done first?
- a)AND ()
- b)OR ()
- c)NOT ()
- d)Left to right, so OR
Answer: NOT ()
NOT is done first: . Then AND: . OR comes last.
- 2.Evaluate for and . Answer 1 for true or 0 for false.
Answer: 0
, because is 0.
- 3.Evaluate for and . Answer 1 for true or 0 for false.
Answer: 1
, so .
- 4.How many rows does the truth table of an expression with the variables , and have?
- a)3
- b)6
- c)9
- d)8
Answer: 8
3 variables give rows, not .
- 5.Evaluate for and . Answer 1 for true or 0 for false.
Answer: 0
- NOT first: what is for ? 0
- Now AND: what is ? 0
- 6.Evaluate for and . Answer 1 for true or 0 for false.
Answer: 1
- What is for ? 1
- What is ? 1
- 7.Which expression means the same as ?
- a)
- b)
- c)
- d)
Answer:
AND is done before OR, so the parentheses go around : .
- 8.Evaluate for , , . Answer 1 for true or 0 for false.
Answer: 1
, then . Working left to right would wrongly give .
- 9.Evaluate for , , . Answer 1 for true or 0 for false.
Answer: 0
- Parentheses first: what is ? 1
- What is ? 0
- What is for ? 0
- 10.Evaluate for and . Answer 1 for true or 0 for false.
Answer: 1
- What is ? 0
- What is ? 1
- What is ? 0
- What is ? 1
- OR last: what is the value of the whole expression? 1
- 11.In how many rows of its truth table is equal to 1?
Answer: 1
only when and : that is 1 row out of 4.
- 12.What is the final column of for the rows = 00, 01, 10, 11?
- a)0, 1, 1, 1
- b)1, 0, 1, 1
- c)1, 1, 0, 1
- d)0, 1, 0, 0
Answer: 1, 0, 1, 1
: 0, 0, 1, 1 OR : 1, 0, 1, 0 gives 1, 0, 1, 1. The expression is 0 only when and .
- 13.Build the truth table of . In how many rows is it equal to 1?
Answer: 1
- How many rows does the table have? 4
- In how many rows is equal to 1? 3
- NOT flips every row. In how many rows is equal to 1? 1
- 14.In how many rows of its truth table is equal to 1?
Answer: 5
in 4 of the 8 rows. Among the rows with , only (row 110) gives . Total: rows.
- 15.Build the truth table of . In how many rows is it equal to 1?
Answer: 3
- How many rows does the table have? 8
- In how many rows is equal to 1? 6
- Now AND with : in how many rows are both and equal to 1? 3
- 16.Build the truth table of . Which expression is equivalent to it?
- a)
- b)
- c)
- d)
Answer:
For = 00, 01, 10, 11: is 0, 0, 0, 1 and is 0, 0, 1, 0. OR gives 0, 0, 1, 1, which is exactly the column of .
- 17.Compare the truth tables of and . In how many rows do they differ?
Answer: 2
- How many rows does each table have? 8
- In how many rows is equal to 1? 5
- In how many rows is equal to 1? 3
- In how many rows do the two final columns differ? 2
- 18.Evaluate for , , . Answer 1 for true or 0 for false.
Answer: 1
- Inside the parentheses, NOT first: what is ? 0
- Then AND: what is ? 0
- Then OR: what is the value inside the parentheses? 0
- Finally the outer NOT: what is the value of the whole expression? 1