0% found this document useful (0 votes)
92 views41 pages

IM5eCh02 Final

This document provides an instructor's manual for a chapter on the logic of compound statements. It discusses several key points: 1) Developing students' ability to reason logically is important for mathematics and computer science. Exercises are given to help students practice logical concepts like negation and contraposition. 2) Some common mistakes students make include incorrectly negating statements with inequality and misunderstanding simplification of logical statements. Extra examples or assigning easier problems may help address difficulties. 3) The terms "only if" and "necessary and sufficient conditions" can be confusing for students but are important concepts. Examples can help develop intuition for these terms. 4) Students often struggle with determining whether arguments are valid or

Uploaded by

Ehab Rushdy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views41 pages

IM5eCh02 Final

This document provides an instructor's manual for a chapter on the logic of compound statements. It discusses several key points: 1) Developing students' ability to reason logically is important for mathematics and computer science. Exercises are given to help students practice logical concepts like negation and contraposition. 2) Some common mistakes students make include incorrectly negating statements with inequality and misunderstanding simplification of logical statements. Extra examples or assigning easier problems may help address difficulties. 3) The terms "only if" and "necessary and sufficient conditions" can be confusing for students but are important concepts. Examples can help develop intuition for these terms. 4) Students often struggle with determining whether arguments are valid or

Uploaded by

Ehab Rushdy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Instructor’s Manual: Chapter 2 1

Chapter 2: The Logic of Compound Statements

The ability to reason using the principles of logic is essential for solving problems in abstract math-
ematics and computer science and for understanding the reasoning used in mathematical proof and
disproof. Because a significant number of students who come to college have had limited opportu-
nity to develop this ability, a primary aim of Chapters 2 and 3 is to help students develop an inner
voice that speaks with logical precision. Consequently, the various rules used in logical reasoning are
developed both symbolically and in the context of their somewhat limited but very important use
in everyday language. Exercise sets for Sections 2.1–2.3 and 3.1–3.4 contain sentences for students
to negate, write the contrapositive for, and so forth. Virtually all students benefit from doing these
exercises. Another aim of Chapters 2 and 3 is to teach students the rudiments of symbolic logic as
a foundation for a variety of upper-division courses. Symbolic logic is used in, among others, the
study of digital logic circuits, relational databases, artificial intelligence, and program verification.

Suggestions
1. In Section 2.1 a surprising number of students apply De Morgan’s law to write the negation of,
for example, “1 < x ≤ 3” as “1 ≥ x > 3.” You may find that it takes some effort to teach them to
avoid making this mistake.
2. In Sections 2.1 and 2.4, students have more difficulty than you might expect simplifying statement
forms and circuits. Only through trial and error can you learn the extent to which this is the case
at your institution. If it is, you might either assign only the easier exercises or build in extra time to
teach students how to do the more complicated ones. Discussion of simplification techniques occurs
again in Chapter 6 in the context of set theory. At this later point in the course most students are
able to deal with it successfully.
3. In ordinary English, the phrase “only if” is often used as a synonym for “if and only if.” But it
is possible to find informal sentences for which the intuitive interpretation is the same as the logical
definition. It is helpful to give examples of such statements when you introduce the logical definition.
For instance, it is not hard to get students to agree that “The team will win the championship only
if it wins the semifinal game” means the same as “If the team does not win the semifinal game then
it will not win the championship.” Once students see this, you can suggest that they remember this
example when they encounter more abstract “only if”statements.
Through guided discussion, students also come to agree that the statement “Winning the semi-
final game is a necessary condition for winning the championship” translates to “If the team does
not win the semifinal game then it will not win the championship.” They can be encouraged to use
this (or a similar statement) as a reference to help develop intuition for general statements of the
form “A is a necessary condition for B.”
With students who have weaker backgrounds, you may find yourself tying up excessive amounts
of class time discussing “only if” and “necessary and sufficient conditions.” You might just assign
the easier exercises, or you might assign exercises on these topics to be done for extra credit (putting
corresponding extra credit problems on exams) and use the results to help distinguish A from B
students. It is probably best not to omit these topics altogether, though, because the language of
“only if” and “necessary and sufficient conditions” is a standard part of the technical vocabulary of
textbooks used in upper-division courses, as well as occurring regularly in non-mathematical writing.
4. In Section 2.3, many students mistakenly conclude that an argument is valid if, when they
compute the truth table, they find a single row in which both the premises and the conclusion are
true. The source of students’ difficulty appears to be their tendency to ignore quantification and to
misinterpret if-then statements as “and” statements. Since the definition of validity includes both
a universal quantifier and if-then, it is helpful to go back over the definition and the procedures for
testing for validity and invalidity after discussing the general topic of universal conditional statements
2 Solutions for Exercises: The Logic of Compound Statements

in Section 3.1. As a practical measure to help students assess validity and invalidity correctly, the
first example in Section 2.3 is of an invalid argument whose truth table has eight rows, several
of which have true premises and a true conclusion. To further focus students’ attention on the
situations where all the premises are true, the truth values for the conclusions of arguments are
omitted when at least one premise is false.
5. In Section 2.3, you might suggest that students just familiarize themselves with, but not memorize,
the various forms of valid arguments covered in Section 2.3. It is wise, however, to have them learn
the terms modus ponens and modus tollens (because these are used in some upper-division computer
science courses) and converse and inverse errors (because these errors are so common).

Section 2.1

1. Common form: If p then q.


p
Therefore, q
(a + 2b)(a2 − b) can be written in prefix notation. All algebraic expressions can be written in
prefix notation.

2. Common form: If p then q.


∼q
Therefore, ∼p
All prime numbers are odd. 2 is odd

3. Common form: p∨q


∼p
Therefore, q
My mind is shot. Logic is confusing.

4. Common form: If p then q.


If q then r.
Therefore, If p then r.
Has 4 vertices and 6 edges. Is complete; Any two of its vertices can be joined by a path

5. a. It is a statement because it is a true sentence. 1,024 is a perfect square because 1,024 = 322 ,
and the next smaller perfect square is 312 = 961, which has fewer than four digits.
b. The truth or falsity of this sentence depends on the reference for the pronoun “she.”
Considered on its own, the sentence cannot be said to be either true or false, and so it is not
a statement.
c. This sentence is false; hence it is a statement.
d. This is not a statement because its truth or falsity depends on the value of x.

6. a. s ∧ i b. ∼s ∧ ∼i

7. m ∧ ∼ c

8. a. (h ∧ w) ∧ ∼s b. ∼ w ∧ (h ∧ s) c. ∼ w∧ ∼ h ∧ ∼ s
d. (∼w ∧ ∼s) ∧ h e. w∧ ∼ (h ∧ s) (w ∧ (∼ h ∨ ∼ s) is also acceptable)

9. a. p ∨ q b. r ∧ p c. r ∧ ( p ∨ q)

10. a. p ∧ q ∧ r b. p ∧ ∼ q c. p ∧ (∼q ∨ ∼r) d. (∼ p ∧ q) ∧ ∼ r e. ∼ p ∨ (q ∧ r)


Instructor’s Manual: Section 2.1 3

11. Inclusive or. For instance, a team could win the playoff by winning games 1, 3, and 4 and
losing game 2. Such an outcome would satisfy both conditions.

12.
p q ∼p ∼p ∧ q
T T F F
T F F F
F T T T
F F T F

13.
p q p∧q p∨q ∼ (p ∧ q) ∼ (p ∧ q) ∨ (p ∨ q)
T T T T F T
T F F T T T
F T F T T T
F F F F T T

14.
p q r q∧r p ∧ (q ∧ r)
T T T T T
T T F F F
T F T F F
T F F F F
F T T T F
F T F F F
F F T F F
F F F F F

15.
p q r ∼q ∼q∨r p ∧ (∼ q ∨ r)
T T T F T T
T T F F F F
T F T T T T
T F F T T T
F T T F T F
F T F F F F
F F T T T F
F F F T T F

16.
p q p∧q p ∨ (p ∧ q) p
T T T T T
T F F T T
F T F F F
F F F F F
| {z }
same truth values

The truth table shows that p ∨ (p ∧ q) and p always have the same truth values. Thus they
are logically equivalent. (This proves one of the absorption laws.)
4 Solutions for Exercises: The Logic of Compound Statements

17.
p q p∧q ∼p ∼q ∼ (p ∧ q) ∼ p∧ ∼ q
T T T F F F F
T F F F T T F ←
F T F T F T F ←
F F F T T T T
| {z }
different truth values in rows 2 and 3
The truth table shows that ∼ (p ∧ q) and ∼ p ∧ ∼ q do not always have the same truth values.
Therefore they are not logically equivalent.
18.
p t p∨t
T T T
F T T
| {z }
same truth values
The truth table shows that p ∨ t and t always have the same truth values. Thus they are
logically equivalent. (This proves one of the universal bound laws.)
19.
p t p ∧t p
T T T T
F T F F
| {z }
same truth values
The truth table shows that p ∧ t and p always have the same truth values. Thus they are
logically equivalent. This proves the identity law for ∧.
20.
p c p ∧c p ∨c
T F F T ←
F F F F
| {z }
different truth values in row 1
The truth table shows that p ∧ c and p ∨ c do not always have the same truth values. Thus
they are not logically equivalent.
21.
p q p q r p∧q q ∧r (p ∧ q) ∧ r p ∧ (q ∧ r )
T T T T T T T
T T F T F F F
T F T F F F F
T F F F F F F
F T T F T F F
F T F F F F F
F F T F F F F
F F F F F F F
| {z }
same truth values
The truth table shows that (p ∧ q) ∧ r and p ∧ (q ∧ r) always have the same truth values. Thus
they are logically equivalent. (This proves the associative law for ∧.)
Instructor’s Manual: Section 2.1 5

22.
p q r q∨r p∧q p∧r p ∧ (q ∨ r) (p ∧ q) ∨ (p ∧ r)
T T T T T T T T
T T F T T F T T
T F T T F T T T
T F F F F F F F
F T T T F F F F
F T F T F F F F
F F T T F F F F
F F F F F F F F
| {z }
same truth values
The truth table shows that p ∧ (q ∨ r) and (p ∧ q) ∨ (p ∧ r) always have the same truth values.
Therefore they are logically equivalent. This proves the distributive law for ∧ over ∨.

23.
p q r p∧q q ∨r (p ∧ q) ∨ r p ∧ (q ∨ r )
T T T T T T T
T T F T T T T
T F T F T T T
T F F F F F F
F T T F T T F ←
F T F F T F F
F F T F T T F ←
F F F F F F F
| {z }
different truth values in rows 5 and 7
The truth table shows that (p ∧ q) ∨ r and p ∧ (q ∨ r) have different truth values in rows 5 and
7. Thus they are not logically equivalent. (This proves that parentheses are needed with ∧
and ∨.)

24.
p q r p∨q p∧r (p ∨ q) ∨ (p ∧ r) (p ∨ q) ∧ r
T T T T T T T
T T F T F T F ←
T F T T T T T ←
T F F T F T F
F T T T F T T
F T F T F T F ←
F F T F F F F
F F F F F F F
| {z }
different truth values in rows 2, 3, and 6
The truth table shows that (p ∨ q) ∨ (p ∧ r) and (p ∨ q) ∧ r have different truth values in rows
2, 3, and 6. Hence they are not logically equivalent.

25. Hal is not a math major or Hal’s sister is not a computer science major.

26. Sam is not an orange belt or Kate is not a red belt.

27. The connector is not loose and the machine is not unplugged.

28. The train is not late and my watch is not fast.


6 Solutions for Exercises: The Logic of Compound Statements

29. This computer program does not have a logical error in the first ten lines and it is not being
run with an incomplete data set.

30. The dollar is not at an all-time high or the stock market is not at a record low.

31. a. 01, 02, 11, 12 b. 21, 22 c. 11, 10, 21, 20

32. −2 ≥ x or x ≥ 7

33. −10 ≥ x or x ≥ 2

34. 2 ≤ x ≤ 5

35. x > −1 and x ≤ 1

36. 1 ≤ x or x < −3

37. 0 ≤ x or x < −7

38. This statement’s logical form is (p ∧ q) ∨ r, so its negation has the form ∼((p ∧ q) ∨ r) ≡
∼(p ∧ q) ∧ ∼r ≡ (∼p ∨ ∼q) ∧ ∼r. Thus a negation for the statement is (num orders ≤ 100 or
num instock > 500) and num instock ≥ 200.

39. The statement’s logical form is (p ∧ q) ∨ ((r ∧ s) ∧ t), so its negation has the form

∼ ((p ∧ q) ∨ ((r ∧ s) ∧ t)) ≡ ∼ (p ∧ q) ∧ ∼ ((r ∧ s) ∧ t))


≡ (∼ p ∨ ∼ q) ∧ (∼ (r ∧ s)∨ ∼ t))
≡ (∼ p ∨ ∼ q) ∧ ((∼ r ∨ ∼ s) ∨ ∼ t)).

Thus a negation is (num orders ≥ 50 or num instock ≤ 300) and ((50 > num orders or
num orders ≥ 75) or num instock ≤ 500).

40.
p q ∼p ∼q p∧q p∧∼q ∼ p ∨ (p∧ ∼ q) (p ∧ q) ∨ (∼ p ∨ (p ∧ ∼ q))
T T F F T F F T
T F F T F T T T
F T T F F F T T
F F T T F F T T
Since all the truth values of (p ∧ q) ∨ (∼p ∨ (p ∧ ∼q)) are T, (p ∧ q) ∨ (∼p ∨ (p ∧ ∼q)) is a
tautology.

41.
p q ∼p ∼q p∧∼q ∼p∨q (p ∧ ∼ q)(p ∨ q)
T T F F F T F
T F F T T F F
F T T F F T F
F F T T F T F
Since all the truth values of (p ∧ ∼q) ∧ (∼p ∨ q) are F, (p ∧ ∼q) ∧ (∼p ∨ q) is a contradiction.
Instructor’s Manual: Section 2.1 7

42.
p q r ∼p ∼q ∼p∧q q∧r ((∼ p ∧ q) ∧ (q ∧ r)) ((∼ p ∧ q) ∧ (q ∧ r))∧ ∼ q
T T T F F F T F F
T T F F F F F F F
T F T F T F F F F
T F F F T F F F F
F T T T F T T T F
F T F T F T F F F
F F T T T F F F F
F F F T T F F F F
| {z }
all F ′ s
Since all the truth values of ((∼ p ∧ q) ∧ (q ∧ r))∧ ∼ q are F , ((∼ p ∧ q) ∧ (q ∧ r))∧ ∼ q is a
contradiction.
43.
p q ∼p ∼q ∼p∨q p∧ ∼ q (∼ p ∨ q) ∨ (p ∧ ∼ q)
T T F F T F T
T F F T F T T
F T T F T F T
F F T T T F T
| {z }
all T ′ s
44. a. No real numbers satisfy this inequality
b. No real numbers satisfy this inequality.
45. Let b be “Bob is a double math and computer science major,” m be “Ann is a math major,”
and a be “Ann is a double math and computer science major.” Then the two statements can
be symbolized as follows: a. (b ∧ m)∧ ∼ a and b. ∼ (b ∧ a) ∧ (m ∧ b). Note: The entries
in the truth table assume that a person who is a double math and computer science major is
also a math major and a computer science major.

b m a ∼a b∧m m∧b b∧a ∼ (b ∧ a) (b ∧ m)∧ ∼ a ∼ (b ∧ a) ∧ (m ∧ b)


T T T F T T T F F F
T T F T F T F T T T
T F T F T F T F F F
T F F T F F F T F F
F T T F F F F T F F
F T F T F F F T F F
F F T F F F F T F F
F F F T F F F T F F
| {z }
same truth values
The truth table shows that (b ∧ m)∧ ∼ a and ∼ (b ∧ a) ∧ (m ∧ b) always have the same truth
values. Hence they are logically equivalent.
46. a. Solution 1: Construct a truth table for p ⊕ p using the truth values for exclusive or.
p p⊕p
T F
F F
because an exclusive or statement is false when both components are true and when both
components are false, and the two components in p ⊕ p are both p.
Since all its truth values are false, p ⊕ p ≡ c, a contradiction.
8 Solutions for Exercises: The Logic of Compound Statements

Solution 2: Replace q by p in the logical equivalence p ⊕ q ≡ (p ∨ q) ∧ ∼(p ∧ q), and simplify


the result.
p ⊕ p ≡ (p ∨ p) ∧ ∼(p ∧ p) by definition of ⊕
≡ p ∧ ∼p by the identity laws
≡c by the negation law for ∧

b. Yes.
p q r p⊕q q⊕r (p ⊕ q) ⊕ r p ⊕ (q ⊕ r)
T T T F F T T
T T F F T F F
T F T T T F F
T F F T F T T
F T T T F F F
F T F T T T T
F F T F T T T
F F F F F F F
| {z }
same truth values
The truth table shows that (p ⊕ q) ⊕ r and p ⊕ (q ⊕ r) always have the same truth values. So
they are logically equivalent.
c. Yes.
p q r p⊕q p∧r q∧r (p ⊕ q) ∧ r (p ∧ r) ⊕ (q ∧ r)
T T T F T T F F
T T F F F F F F
T F T T T F T T
T F F T F F F F
F T T T F T T T
F T F T F F F F
F F T F F F F F
F F F F F F F F
| {z }
same truth values
The truth table shows that (p ⊕ q) ∧ r and (p ∧ r) ⊕ (q ∧ r) always have the same truth values.
So they are logically equivalent.

47. There is a famous story about a philosopher who once gave a talk in which he observed that
whereas in English and many other languages a double negative is equivalent to a positive,
there is no language in which a double positive is equivalent to a negative. To this, another
philosopher, Sidney Morgenbesser, responded sarcastically, “Yeah, yeah.”
[Strictly speaking, sarcasm functions like negation. When spoken sarcastically, the words “Yeah,
yeah” are not a true double positive; they just mean “no.”]

48. a. the distributive law b. the commutative law for ∨


c. the negation law for ∨ d. the identity law for ∧
49. a. the commutative law for ∨ b. the distributive law
c. the negation law for ∧ d. the identity law for ∨
50. (p ∧ ∼q) ∨ p ≡ p ∨ (p ∧ ∼q) by the commutative law for ∨
≡p by the absorption law (with ∼q in place of q)

51. Solution 1 : p ∧ (∼ q ∨ p) ≡ p ∧ (p ∨ ∼ q) commutative law for ∨


≡ p absorption law
Instructor’s Manual: Section 2.2 9

Solution 2 : p ∧ (∼ q ∨ p) ≡ (p ∧ ∼ q) ∨ (p ∧ p) distributive law


≡ (p ∧ ∼ q) ∨ p identity law for ∧
≡ p by exercise 50.

52. ∼ (p ∨ ∼ q) ∨ (∼ p ∧ ∼ q) ≡ (∼ p ∧ ∼ (∼ q)) ∨ (∼ p ∧ ∼ q) De Morgan’s law


≡ (∼ p ∧ q) ∨ (∼ p ∧ ∼ q) double negative law
≡ ∼ p ∧ (q∨ ∼ q) distributive law
≡ ∼ p∧ t negation law for ∨
≡ ∼p identity law for ∧
53. ∼((∼p ∧ q) ∨ (∼p ∧ ∼q)) ∨ (p ∧ q) ≡ ∼[∼p ∧ (q ∨ ∼q)] ∨ (p ∧ q) by the distributive law
≡ ∼(∼p ∧ t) ∨ (p ∧ q) by the negation law for ∨
≡ ∼(∼p) ∨ (p ∧ q) by the identity law for ∧
≡ p ∨ (p ∧ q) by the double negative law
≡ p by the absorption law

54. (p ∧ (∼ (∼ p ∨ q))) ∨ (p ∧ q) ≡ (p ∧ (∼ (∼ p)∧ ∼ q)) ∨ (p ∧ q) De Morgan’s law


≡ (p ∧ (p∧ ∼ q)) ∨ (p ∧ q) double negative law
≡ ((p ∧ p)∧ ∼ q)) ∨ (p ∧ q) associative law for ∧
≡ (p ∧ ∼ q)) ∨ (p ∧ q) idempotent law for ∧
≡ p ∧ (∼ q ∨ q) distributive law
≡ p ∧ (q∨ ∼ q) commutative law for ∨
≡ p∧ t negation law for ∨
≡ p identity law for ∧

Section 2.2
1. If this loop does not contain a stop or a go to, then it will repeat exactly N times.
2. If I catch the 8:05 bus, then I am on time for work.
3. If you do not freeze, then I’ll shoot.
4. If you don’t fix my ceiling, then I won’t pay my rent.
5.
p q ∼p ∼q ∼p∨q ∼ p ∨ q →∼ q
T T F F T F
T F F T F T
F T T F T F
F F T T T T
6.
p q ∼p ∼p∧q p∨q (p ∨ q) ∨ (∼ p ∧ q) (p ∨ q) ∨ (∼ p ∧ q) → q
T T F F T T T
T F F F T T F
F T T T T T T
F F T F F F T
7.
p q r ∼q p ∧∼q p ∧∼q →r
T T T F F T
T T F F F T
T F T T T T
T F F T T F
F T T F F T
F T F F F T
F F T T F T
F F F T F T
10 Solutions for Exercises: The Logic of Compound Statements

8.
p q r ∼p ∼p∨q ∼p∨q →r
T T T F T T
T T F F T F
T F T F F T
T F F F F T
F T T T T T
F T F T T F
F F T T T T
F F F T T F

9.
p q r ∼r p ∧∼r q ∧r p ∧∼r ↔q ∨r
T T T F F T F
T T F T T T T
T F T F F T F
T F F T T F F
F T T F F T F
F T F T F T F
F F T F F T F
F F F T F F T

10.
p q r p→r q→r (p → r) ↔ (q → r)
T T T T T T
T T F F F T
T F T T T T
T F F F T F
F T T T T T
F T F T F F
F F T T T T
F F F T T T

11.
p q r q→r p → (q → r) p∧q p∧q →r (p → (q → r)) ↔ (p ∧ q → r)
T T T T T T T T
T T F F F T F T
T F T T T F T T
T F F T T F T T
F T T T T F T T
F T F F T F T T
F F T T T F T T
F F F T T F T T

12. If x > 2 then x2 > 4, and if x < −2 then x2 > 4.

13. a.
p q ∼p p→q ∼p ∧q
T T F T T
T F T F F
F T F T T
F F T T T
| {z }
same truth values
Instructor’s Manual: Section 2.2 11

The truth table shows that p → q and ∼p ∨ q always have the same truth values. Hence they
are logically equivalent.
b.
p q ∼q p→q ∼ (p → q) p∧∼q
T T F T F F
T F T F T T
F T F T F F
F F T T F F
| {z }
same truth values

The truth table shows that ∼ (p → q) and p ∧ ∼ q always have the same truth values. Hence
they are logically equivalent.

14. a.
p q r ∼q ∼r q∨r p∧ ∼ q p∧ ∼ r p→q∨r p∧∼q→r p∧∼r→q
T T T F F T F F T T T
T T F F T T F T T T T
T F T T F T T F T T T
T F F T T F T T F F F
F T T F F T F F T T T
F T F F T T F F T T T
F F T T F T F F T T T
F F F T T F F F T T T
| {z }
same truth values
The truth table shows that the three statement forms p → q ∨ r, p ∧ ∼ q → r, and p ∧ ∼ r → q
always have the same truth values. Thus they are all logically equivalent.
b. If n is prime and n is not odd, then n is 2.
And: If n is prime and n is not 2, then n is odd.

15.
p q r q→r p→q p → (q → r) (p → q) → r
T T T T T T T
T T F F T F F
T F T T F T T
T F F T F T T
F T T T T T T
F T F F T T F ←
F F T T T T F ←
F F F T T T F ←
| {z }
different truth values

The truth table shows that p → (q → r) and (p → q) → r do not always have the same truth
values. (They differ for the combinations of truth values for p, q, and r shown in rows 6, 7,
and 8.) Therefore they are not logically equivalent.

16. Let p represent “You paid full price” and q represent “You didn’t buy it at Crown Books.”
Thus, “If you paid full price, you didn’t buy it at Crown Books” has the form p → q. And
“You didn’t buy it at Crown Books or you paid full price” has the form q ∨ p.
12 Solutions for Exercises: The Logic of Compound Statements

p q p→q q ∨p
T T T T
T F F T ←
F T T T ←
F F T F
| {z }
different truth values
These two statements are not logically equivalent because their forms have different truth
values in rows 2 and 4.
(An alternative representation for the forms of the two statements is p → ∼q and ∼q ∨ p. In
this case, the truth values differ in rows 1 and 3.)

17. Let p represent “2 is a factor of n,” q represent “3 is a factor of n,” and r represent “6 is a
factor of n.” The statement “If 2 is a factor of n and 3 is a factor of n, then 6 is a factor of n”
has the form p ∧ q → r. And the statement “2 is not a factor of n or 3 is a not a factor of n
or 6 is a factor of n” has the form ∼ p ∨ ∼ q ∨ r.

p q r ∼p ∼q p∧q p∧q →r ∼ p∨ ∼ q ∨ r
T T T F T T T T
T T F F T T F F
T F T F F F T T
T F F F F F T T
F T T T T F T T
F T F T T F T T
F F T T F F T T
F F F T F F T T
| {z }
same truth values
The truth table shows that p ∧ q → r and ∼ p ∨ ∼ q ∨ r always have the same truth values.
Therefore they are logically equivalent.

18. Part 1 : Let p represent “It walks like a duck,” q represent “It talks like a duck,” and r represent
“It is a duck.” The statement “If it walks like a duck and it talks like a duck, then it is a duck”
has the form p ∧ q → r. And the statement “Either it does not walk like a duck or it does not
talk like a duck or it is a duck” has the form ∼ p ∨ ∼ q ∨ r.

p q r ∼p ∼q p ∧q ∼ p∨ ∼ q p ∧q →r (∼ p ∨ ∼ q) ∨ r
T T T F F T F T T
T T F F F T F F F
T F T F T F T T T
T F F F T F T T T
F T T T F F T T T
F T F T F F T T T
F F T T T F T T T
F F F T T F T T T
| {z }
same truth values
The truth table shows that p ∧ q → r and (∼ p ∨ ∼ q) ∨ r always have the same truth values.
Thus the following statements are logically equivalent:“If it walks like a duck and it talks like
a duck, then it is a duck” and “Either it does not walk like a duck or it does not talk like a
duck or it is a duck.”
Instructor’s Manual: Section 2.2 13

Part 2 : The statement “If it does not walk like a duck and it does not talk like a duck then
it is not a duck” has the form ∼ p ∧ ∼ q →∼ r.

p q r ∼p ∼q ∼r p ∧q ∼ p∧ ∼ q p ∧q →r (∼ p ∧ ∼ q) →∼ r
T T T F F F T F T T
T T F F F T T F F T ←
T F T F T F F F T T
T F F F T T F F T T
F T T T F F F F T T
F T F T F T F F T T
F F T T T F F T T F ←
F F F T T T F T T T
| {z }
different truth values
The truth table shows that p ∧ q → r and (∼ p ∧ ∼ q) →∼ r do not always have the same
truth values. (They differ for the combinations of truth values of p, q, and r shown in rows 2
and 7.) Thus they are not logically equivalent, and so the statement “If it walks like a duck
and it talks like a duck, then it is a duck” is not logically equivalent to the statement “If it
does not walk like a duck and it does not talk like a duck then it is not a duck.” In addition,
because of the logical equivalence shown in Part 1, we can also conclude that the following
two statements are not logically equivalent: “Either it does not walk like a duck or it does not
talk like a duck or it is a duck” and “If it does not walk like a duck and it does not talk like a
duck then it is not a duck.”

19. False. The negation of an if-then statement is not an if-then statement. It is an and statement.

20. a. Negation: P is a square and P is not a rectangle.


b. Negation: Today is New Year’s Eve and tomorrow is not January.
c. Negation: The decimal expansion of r is terminating and r is not rational.
d. Negation: n is prime and both n is not odd and n is not 2. Or: n is prime and n is neither
odd nor 2.
e. Negation: x is nonnegative and x is not positive and x is not 0.
Or: x is nonnegative but x is not positive and x is not 0.
Or: x is nonnegative and x is neither positive nor 0.
f. Negation: Tom is Ann’s father and either Jim is not her uncle or Sue is not her aunt.
g. Negation: n is divisible by 6 and either n is not divisible by 2 or n is not divisible by 3.

21. By assumption, p → q is false. By definition of a conditional statement, the only way this can
happen is for the hypothesis, p, to be true and the conclusion, q, to be false.
a. The only way ∼ p → q can be false is for ∼ p to be true and q to be false. But since p is
true, ∼ p is false. Hence ∼ p → q is not false and so it is true.
b. Since p is true, then p ∨ q is true because if one component of an and statement is true,
then the statement as a whole is true.
c The only way q → p can be false is for q to be true and p to be false. Thus, since q is false,
q → p is not false and so it is true.

22. a. Contrapositive: If P is not a rectangle, then P is not a square.


b. Contrapositive: If tomorrow is not January, then today is not New Year’s Eve.
c. Contrapositive: If r is not rational, then the decimal expansion of r is not terminating.
d. Contrapositive: If n is not odd and n is not 2, then n is not prime.
14 Solutions for Exercises: The Logic of Compound Statements

e. Contrapositive: If x is not positive and x is not 0, then x is not nonnegative.


Or: If x is neither positive nor 0, then x is negative.

f. Contrapositive: If either Jim is not Ann’s uncle or Sue is not her aunt, then Tom is not her
father.

g. Contrapositive: If n is not divisible by 2 or n is not divisible by 3, then n is not divisible


by 6.

23. a. Converse: If P is a rectangle, then P is a square.


Inverse: If P is not a square, then P is not a rectangle.

b. Converse: If tomorrow is January, then today is New Year’s Eve.


Inverse: If today is not New Year’s Eve, then tomorrow is not January.

c. Converse: If r is rational then the decimal expansion of r is terminating.


Inverse: If the decimal expansion of r is not terminating, then r is not rational.

d. Converse: If n is odd or n is 2, then n is prime.


Inverse: If n is not prime, then n is not odd and n is not 2.

e. Converse: If x is positive or x is 0, then x is nonnegative.


Inverse: If x is not nonnegative, then both x is not positive and x is not 0.
Or: If x is negative, then x is neither positive nor 0.

f. Converse: If Jim is Ann’s uncle and Sue is her aunt, then Tom is her father.
Inverse: If Tom is not Ann’s father, then Jim is not her uncle or Sue is not her aunt

g. Converse: If n is divisible by 2 and n is divisible by 3, then n is divisible by 6


Inverse: If n is not divisible by 6, then n is not divisible by 2 or n is not divisible by 3.

24.
p q p→q q→p
T T T T
T F F T ←
F T T F ←
F F T T
| {z }
different truth values

The truth table shows that p → q and q → p have different truth values in the second and
third rows. Hence they are not logically equivalent.

25.
p q ∼p ∼q p→q ∼ p →∼ q
T T F F T T
T F F T F T ←
F T T F T F ←
F F T T T T
| {z }
different truth values

The truth table shows that p → q and ∼ p →∼ q have different truth values in rows 2 and 3,
so they are not logically equivalent. Thus a conditional statement is not logically equivalent
to its inverse.
Instructor’s Manual: Section 2.2 15

26.
p q ∼p ∼q ∼ q →∼ p p→q
T T F F T T
T F F T F F
F T T F T T
F F T T T T
| {z }
same truth values

The truth table shows that ∼q → ∼p and p → q always have the same truth values and
thus are logically equivalent. It follows that a conditional statement and its contrapositive are
logically equivalent to each other.

27.
p q ∼p ∼q q→p ∼ p →∼ q
T T F F T T
T F F T T T
F T T F F F
F F T T T T
| {z }
same truth values

The truth table shows that q → p and ∼ p →∼ q always have the same truth values and thus
are logically equivalent. It follows that the converse and inverse of a conditional statement are
logically equivalent to each other.

28. The if-then form of “I say what I mean” is “If I mean something, then I say it.”
The if-then form of “I mean what I say” is “If I say something, then I mean it.”
Thus “I mean what I say” is the converse of “I say what I mean,” and so the two statements
are not logically equivalent.

29. The corresponding tautology is (p → (q ∨ r)) ↔ ((p ∧ ∼q) → r)

p q r ∼q q ∨r p∧∼q p → (q ∨ r ) p∧∼q →r (p → (q ∨ r )) ↔
((p ∧ ∼ q) → r )
T T T F T F T T T
T T F F T F T T T
T F T T T T T T T
T F F T F T F F T
F T T F T F T T T
F T F F T F T T T
F F T T T F T T T
F F F T F F T T T

The truth table shows that (p → (q ∨ r)) ↔ ((p ∧ ∼q) → r) is a tautology because all of its
truth values are T.

30. The corresponding tautology is p ∧ (q ∨ r) ↔ (p ∧ q) ∨ (p ∧ r)


16 Solutions for Exercises: The Logic of Compound Statements

p q r q∨r p ∧q p ∧r p ∧ (q ∨ r) (p ∧ q) ∨ (p ∧ r) p ∧ (q ∨ r) ↔
(p ∧ q) ∨ (p ∧ r)
T T T T T T T T T
T T F T T F T T T
T F T T F T T T T
T F F F F F F F T
F T T T F F F F T
F T F T F F F F T
F F T T F F F F T
F F F F F F F F T
| {z }
all T ’s
The truth table shows that p ∧ (q ∨ r) ↔ (p ∧ q) ∨ (p ∧ r) is always true. Hence it is a tautology.
31. The corresponding tautology is (p → (q → r)) ↔ ((p ∧ q) → r).

p q r q→r p ∧q p → (q → r) (p ∧ q) → r) p → (q → r) ↔ (p ∧ q) → r
T T T T T T T T
T T F F T F F T
T F T T F T T T
T F F T F T T T
F T T T F T T T
F T F F F T T T
F F T T F T T T
F F F T F T T T
| {z }
all T ’s
The truth table shows that (p → (q → r)) ↔ ((p ∧ q) → r) is always true. Hence it is a
tautology.
32. If this quadratic equation has two distinct real roots, then its discriminant is greater than zero,
and if the discriminant of this quadratic equation is greater than zero, then the equation has
two real roots.
33. If this integer is even, then it equals twice some integer, and if this integer equals twice some
integer, then it is even.
34. If the Cubs do not win tomorrow’s game, then they will not win the pennant.
If the Cubs win the pennant, then they will have won tomorrow’s game.
35. If Sam is not an expert sailor, then he will not be allowed on Signe’s racing boat.
If Sam is allowed on Signe’s racing boat, then he is an expert sailor.
36. The Personnel Director did not lie. By using the phrase “only if,” the Personnel Director set
forth conditions that were necessary but not sufficient for being hired: if you did not satisfy
those conditions then you would not be hired. The Personnel Director’s statement said nothing
about what would happen if you did satisfy those conditions.
37. If a new hearing is not granted, payment will be made on the fifth.
38. If it doesn’t rain, then Ann will go.
39. If a security code is not entered, then the door will not open.
40. If I catch the 8:05 bus, then I am on time for work.
41. If this triangle has two 45◦ angles, then it is a right triangle.
Instructor’s Manual: Section 2.2 17

42. If this number is not divisible by 3, then it is not divisible by 9.


If this number is divisible by 9, then it is divisible by 3.

43. If Jim does not do his homework regularly, then Jim will not pass the course.
If Jim passes the course, then he will have done his homework regularly.

44. If Jon’s team wins the rest of its games, then it will win the championship.

45. If this computer program produces error messages during translation, then it is not correct.
If this computer program is correct, then it does not produce error messages during translation.

46. a. This statement is the converse of the given statement, and so it is not necessarily true.
For instance, if the actual boiling point of compound X were 200◦ C, then the given statement
would be true but this statement would be false.
b. This statement must be true. It is the contrapositive of the given statement.
c. must be true d. not necessarily true e. must be true f. not necessarily true
Note: To solve this problem, it may be helpful to imagine a compound whose boiling point is
greater than 150◦ C. For concreteness, suppose it is 200◦ C. Then the given statement would
be true for this compound, but statements a, d, and f would be false.

47. a. p ∧ ∼q → r ≡ ∼(p ∧ ∼q) ∨ r


b. p ∧ ∼q → r ≡ ∼(p ∧ ∼q) ∨ r by the identity for → shown in
the directions [an acceptable answer]
≡ ∼[∼(∼(p ∧ ∼q)) ∧ ∼r] by De Morgan’s law [another acceptable answer]
≡ ∼[(p ∧ ∼q) ∧ ∼r] by the double negative law
[another acceptable answer]
Any of the expressions in part (b) would also be acceptable answers for part (a).

48. a. p∨ ∼ q → r ∨ q ≡ ∼ (p ∨ ∼ q) ∨ (r ∨ q) by the identity for → shown in the


directions [an acceptable answer]
≡ (∼ p ∧ ∼ (∼ q)) ∨ (r ∨ q) by De Morgan’s law
[another acceptable answer]
≡ (∼ p ∧ q) ∨ (r ∨ q) by the double negative law
[another acceptable answer]
b. p∨ ∼ q → r ∨ q ≡ (∼ p ∧ q) ∨ (r ∨ q) by part (a)
≡ ∼ (∼ (∼ p ∧ q)∧ ∼ (r ∨ q)) by De Morgan’s law
≡ ∼ (∼ (∼ p ∧ q) ∧ (∼ r ∧ ∼ q)) by De Morgan’s law
Any of the expressions in part (b) would also be acceptable answers for part (a).

49. a. (p → r) ↔ (q → r) ≡ (∼p ∨ r) ↔ (∼q ∨ r)


≡ [∼(∼p ∨ r) ∨ (∼q ∨ r)] ∧ [∼(∼q ∨ r) ∨ (∼p ∨ r)]
by the identity for ↔ shown in the
directions [an acceptable answer]
≡ [(p ∧ ∼r) ∨ (∼q ∨ r)] ∧ [(q ∧ ∼r) ∨ (∼p ∨ r)]
by De Morgan’s law [another acceptable answer]
b. (∼p ∨ r) ↔ (∼q ∨ r) ≡ ∼[∼(p ∧ ∼r) ∧ ∼(∼q ∨ r)] ∧ ∼[∼(q ∧ ∼r) ∧ ∼(∼p ∨ r)]
by De Morgan’s law
≡ ∼[∼(p ∧ ∼r) ∧ (q ∧ ∼r)] ∧ ∼[∼(q ∧ ∼r) ∧ (p ∧ ∼r)]
by De Morgan’s law

Any of the expressions in part (b) would also be acceptable answers for part (a).
18 Solutions for Exercises: The Logic of Compound Statements

50. a. (p → (q → r)) ↔ ((p ∧ q) → r) ≡ [∼ p ∨ (q → r)] ↔ [∼ (p ∧ q) ∨ r]


≡ [∼ p ∨ (∼ q ∨ r)] ↔ [∼ (p ∧ q) ∨ r]
≡ ∼ [∼ p ∨ (∼ q ∨ r)] ∨ [∼ (p ∧ q) ∨ r]
∧∼ [∼ (p ∧ q) ∨ r] ∨ [∼ p ∨ (∼ q ∨ r)]

b. By part (a), De Morgan’s law, and the double negative law,


(p → (q → r)) ↔ ((p ∧ q) → r) ≡ ∼ [∼ p ∨ (∼ q ∨ r)] ∨ [∼ (p ∧ q) ∨ r]
∧∼ [∼ (p ∧ q) ∨ r] ∨ [∼ p ∨ (∼ q ∨ r)]
≡ ∼ [∼ p ∨ (∼ q ∨ r)]∧ ∼ [∼ (p ∧ q) ∨ r]
∧ ∼ ∼ [(p ∧ q)∧ ∼ r]∧ ∼ [∼ p ∨ (∼ q ∨ r)]
≡ ∼ ∼ [p ∧ ∼ (∼ q ∨ r)] ∧ [(p ∧ q)∧ ∼ r]
∧ ∼ ∼ [(p ∧ q)∧ ∼ r] ∧ [p ∧ ∼ (∼ q ∨ r)]
≡ ∼ ∼ [p ∧ (q ∧ ∼ r)] ∧ [(p ∧ q)∧ ∼ r]
∧ ∼ ∼ [(p ∧ q)∧ ∼ r] ∧ [p ∧ (q∧ ∼ r)].
Any of the expressions in the right-hand column would also be acceptable answers for part (a).

51. Yes. As in exercises 47-50, the following logical equivalences can be used to rewrite any
statement form in a logically equivalent way using only ∼ and ∧:

p → q ≡∼ p ∨ q p ↔ q ≡ (∼ p ∨ q) ∧ (∼ q ∨ p)
p ∨ q ≡∼ (∼ p ∧ ∼ q) ∼ (∼ p) ≡ p

The logical equivalence p ∧ q ≡ ∼ (∼ p ∨ ∼ q) can then be used to rewrite any statement form
in a logically equivalent way using only ∼ and ∨.

Section 2.3


1. 2 is not rational.

2. 1 − 0.99999... is less than every positive real number.

3. Logic is not easy.

4. This graph cannot be colored with two colors.

5. They did not telephone.

6. premises conclusion
z }| {
p q p→q p →q p∨q
T T T T T  critical row
T F F T
F T T F
F T T T F  critical row

Rows 2 and 4 of the truth table are the critical rows in which all the premises are true, but
row 4 shows that it is possible for an argument of this form to have true premises and a false
conclusion. Thus this argument form is invalid.
Instructor’s Manual: Section 2.3 19

7. premises conclusion
z }| {
p q r ∼q p p →q ∼q ∨r r
T T T F T T T T  critical row
T T F F T T F
T F T T T F T
T F F T T F T
F T T F F T T
F T F F F T F
F F T T F T T
F F F T F T T
This row describes the only situation in which all the premises are true. Because the conclusion
is also true here, the argument form is valid.
8. premises conclusion
z }| {
p q r ∼ q p ∨ q p →∼ q p → r r
T T T F T F T
T T F F T F F
T F T T T T T T  critical row
T F F T T T F
F T T F T T T T  critical row
F T F F T T T F  critical row
F F T T F T T
F F F T F T T
This row shows that it is possible for an argument of this form to have true premises and a
false conclusion. Thus this argument form is invalid.
9. premises conclusion
z }| {
p q r ∼q ∼r p∧q p ∧ q →∼ r p∨ ∼ q ∼q→p ∼r
T T T F F T F T T
T T F F T T T T T T  critical row
T F T T F F T T T F  critical row
T F F T T F T T T T  critical row
F T T F F F T F T
F T F F T F T F T
F F T T F F T T F
F F F T T F T T F
Rows 2, 3, and 4 of the truth table are the critical rows in which all the premises are true, but
row 3 shows that it is possible for an argument of this form to have true premises and a false
conclusion. Hence the argument form is invalid.
10.
premise conclusion
p q r ∼p ∼q ∼r ∼ p∧ ∼ q p ∨q r p ∨q →r ∼ r → ∼ p∧ ∼ q
T T T F F F F T T T T  critical row
T T F F F T F T F F F
T F T F T F F T T T T  critical row
T F F F T T F T F F F
F T T T F F F T T T T critical row
F T F T F T F T F F F
F F T T T F T F T T T critical row
F F F T T T T F F T T critical row
20 Solutions for Exercises: The Logic of Compound Statements

This form of argument has just one premise. Rows 1, 3, 5, 7, and 8 of the truth table represent
all the situations in which the premise is true, and in each of these rows the conclusion is also
true. Therefore, the argument form is valid.

11. premises conclusion


z }| {
p q r ∼p ∼q ∼r q∨r p → q∨r ∼ q∨ ∼ r ∼ p∨ ∼ r
T T T F F F T T F
T T F F F T T T T T  critical row
T F T F T F T T T F  critical row
T F F F T T F F T
F T T T F F T T F
F T F T F T T T T T  critical row
F F T T T F T T T T  critical row
F F F T T T F T T T  critical row

Rows 2, 3, 6, 7, and 8 of the truth table represent the situations in which all the premises are
true, but row 3 shows that it is possible for an argument of this form to have true premises
and a false conclusion. Hence the argument form is invalid.

12. a. premises conclusion


z }| {
p q p→q q p
T T T T T  critical row
T F F F
F T T T F  critical row
F T T F
Rows 1 and 3 of the truth table represent the situations in which all the premises are true,
but row 3 shows that it is possible for an argument of this form to have true premises and a
false conclusion. Hence the argument form is invalid.
b. premises conclusion
z }| {
p q p→q ∼p ∼q
T T T F
T F F T T  critical row
F T T F
F T T T F  critical row

Rows 2 and 4 of the truth table represent the situations in which all the premises are true,
but row 4 shows that it is possible for an argument of this form to have true premises and a
false conclusion. Hence the argument form is invalid.

13. premises conclusion


z }| {
p q p→q ∼q ∼p
T T T F
T F F T
F T T F
F F T T T critical row

Row 4 of the truth table represents the only situation in which all the premises are true, and
in this row the conclusion is also true. Therefore, the argument form (modus tollens) is valid.
Instructor’s Manual: Section 2.3 21

14. premise conclusion


p q p p∨q
T T T T  critical row
T F F
F T T T  critical row
F F F

The truth table shows that in the two situations (represented by rows 1 and 3) in which the
premise is true, the conclusion is also true. Therefore, Generalization, version (a), is valid.

15. premise conclusion


p q q p∨q
T T T T  critical row
T F F
F T T T  critical row
F F F

The truth table shows that in the two situations (represented by rows 1 and 3) in which the
premise is true, the conclusion is also true. Therefore, Generalization, version (b), is valid.

16. premise conclusion


p q p ∧q p
T T T T critical row
T F F
F T F
F F F

The truth table shows that in the only situation (represented by row 1) in which both premises
are true, the conclusion is also true. Therefore, Specialization, version (sa), is valid.

17. premise conclusion


p q p ∧q q
T T T T critical row
T F F
F T F
F F F

The truth table shows that in the only situation (represented by row 1) in which both premises
are true, the conclusion is also true. Therefore, Specialization, version (b), is valid.
22 Solutions for Exercises: The Logic of Compound Statements

18. premises conclusion


z }| {
p q p ∨q ∼q p
T T T F
T F T T T critical row
F T T F
F T F T
Row 2 represents the only situation in which both premises are true. Because the conclusion
is also true here the argument form is valid.

19. premises conclusion


z }| {
p q p∨q ∼p q
T T T F
T F T F
F T T T T  critical row
F F F T
The truth table shows that in the only situation (represented by row 3) in which both premises
are true, the conclusion is also true. Therefore, Elimination, version (b), is valid.

20. premises conclusion


z }| {
p q r p→q q→r p→r
T T T T T T  critical row
T T F T F
T F T F T
T F F F T
F T T T T T  critical row
F T F T F
F F T T T T  critical row
F F F T T T  critical row

The truth table shows that in the four situations (represented by rows 1, 5, 7, and 8) in which
both premises are true, the conclusion is also true. Therefore, Transitivity is valid.

21. premises conclusion


z }| {
p q r p∨q p→r q→r r
T T T T T T T  critical row
T T F T F F
T F T T T T T  critical row
T F F T F T
F T T T T T T  critical row
F T F T T F
F F T F T T
F F F F T T
The truth table shows that in the three situations (represented by rows 1, 3, 5) in which all
three premises are true, the conclusion is also true. Therefore, proof by division into cases is
valid.
Instructor’s Manual: Section 2.3 23

22. Let p represent “Tom is on team A” and q represent “Hua is on team B.” Then the argument
has the form
∼p → q
∼q → p
∴ ∼p ∨ ∼q

premises conclusion
z }| {
p q ∼p ∼q ∼p→q ∼q →p ∼p∨∼q
T T F F T T F  critical row
T F F T T T T  critical row
F T T F T T T  critical row
F F T T F F
Rows 1, 2, and 3 of the truth table are the critical rows in which all the premises are true, but
row 1 shows that it is possible for an argument of this form to have true premises and a false
conclusion. Thus this argument form is invalid.

23. form: p ∨q
p→r
... q∨ ∼ r

premises conclusion
z }| {
p q r ∼r p ∨q p→r q∨ ∼ r
T T T F T T T  critical row
T T F T T F
T F T F T T F  critical row
T F F T T F
F T T F T T T  critical row
F T F T T T T  critical row
F F T F F T
F F F T F T
Rows 1, 3, 5, and 6 represent the situations in which both premises are true, but in row 3 the
conclusion is false. Hence, it is possible for an argument of this form to have true premises
and a false conclusion, and so the given argument is invalid.

24. form: p → q
q
... p invalid: converse error

25. form: p ∨ q
∼p
... q valid: elimination

26. form: p → q
q→r
... p→r valid: transitivity

27. form: p → q
∼p
... ∼q invalid: inverse error
24 Solutions for Exercises: The Logic of Compound Statements

28. form: p→q invalid, converse error


q
... p

29. form: p→q invalid, inverse error


∼p
... ∼q

30. form: p→q invalid, converse error


q
... p

31. form: p ∧q valid, generalization


... q

32. form: p→r valid, proof by division into cases


q→r
... p∨q →r

33. A valid argument with a false conclusion must have at least one false premise. In the following
example, the second premise is false. (The first premise is true because its hypothesis is false.)
If the square of every real number is positive, then no real number is negative.
The square of every real number is positive.
Therefore, no real number is negative.

34. An invalid argument with a true conclusion can have premises that are either true or false.
In the following example the first premise is true for either one of following two reasons: its
hypothesis is false and its conclusion is true.
If the square of every real number is positive, then some real numbers are positive.
Some real numbers are positive.
Therefore, the square of every real number is positive.

35. A correct answer should indicate that for a valid argument, any argument of the same form
that has true premises has a true conclusion, whereas for an invalid argument, it is possible to
find an argument of the same form that has true premises and a false conclusion. The validity
of an argument does not depend on whether the conclusion is true or not. The validity of an
argument only depends on the formal relationship between its premises and its conclusion.

36. The program contains an undeclared variable.


One explanation:
1. There is not a missing semicolon and there is not a misspelled variable name. (by (c) and
(d) and definition of ∧)
2. It is not the case that there is a missing semicolon or a misspelled variable name. (by (1)
and De Morgan’s laws)
3. There is not a syntax error in the first five lines. (by (b) and (2) and modus tollens)
4. There is an undeclared variable. (by (a) and (3) and elimination)

37. The treasure is buried under the flagpole.


One explanation:
1. The treasure is not in the kitchen. (by (c) and (a) and modus ponens)
2. The tree in the front yard is not an elm. (by (b) and (1) and modus tollens)
3. The treasure is buried under the flagpole. (by (d) and (2) and elimination)
Instructor’s Manual: Section 2.3 25

38. a. A is a knave and B is a knight.

One explanation:
1. Suppose A is a knight.
2. ∴ What A says is true. (by definition of knight)
3. ∴ B is a knight also. (That’s what A said.)
4. ∴ What B says is true. (by definition of knight)
5. ∴ A is a knave. (That’s what B said.)
6. ∴ We have a contradiction: A is a knight and a knave. (by (1) and (5))
7. ∴ The supposition that A is a knight is false. (by the contradiction rule)
8. ∴ A is a knave. (negation of supposition)
9. ∴ What B says is true. (B said A was a knave, which we now know to be true.)
10. ∴ B is a knight. (by definition of knight)

b. C is a knave and D is a knight

One explanation:
1. Suppose C is a knight.
2. ... C is a knave (because what C said was true).
3. ... C is both a knight and a knave (by (1) and (2)), which is a contradiction.
4. ... C is not a knight (because by the contradiction rule the supposition is false).
5. ... What C says is false (because since C is not a knight he is a knave and knaves
always speak falsely).
6. ... At least one of C or D is a knight (by De Morgan’s law).
7. ... D is a knight (by (4) and (6) and elimination).
8. ... C is a knave and D is a knight (by (4) and (7)).
To check that the problem situation is not inherently contradictory, note that if C is a
knave and D is a knight, then each could have spoken as reported.

c. One is a knight and the other is a knave.


One explanation:
There is one knave. E and F cannot both be knights because then both would also be
knaves (since each would have spoken the truth), which is a contradiction. Nor can E and
F both be knaves because then both would be telling the truth which is impossible for
knaves. Hence, the only possible answer is that one is a knight and the other is a knave.
But in this case both E and F could have spoken as reported, without contradiction.

d. U , Z, X, and V are knaves and W and Y are knights.


One explanation:
1. The statement made by U must be false because if it were true then U would not
be a knight (since none would be a knight), but since he spoke the truth he would be a
knight and this would be a contradiction.
2. ... there is at least one knight, and U is a knave (since his statement that there are
no knights is false).
3. Suppose Z spoke the truth. Then so did W (since if there is exactly one knight then
it is also true that there are at most three knights). But this implies that there are at
least two knights, which contradicts Z ′ s statement. Hence Z cannot have spoken the
truth.
4. ... there are at least two knights, and Z is a knave (since his statement that there is
exactly one knight is false). Also X ′ s statement is false because since both U and Z are
knaves it is impossible for there to be exactly five knights. Hence X also is a knave.
5. ... there are at least three knaves (U , Z, and X), and so there are at most three
knights.
6. ... W ′ s statement is true, and so W is a knight.
26 Solutions for Exercises: The Logic of Compound Statements

7. Suppose V spoke the truth. Then V , W , and Y are all knights (otherwise there would
not be at least three knights because U , Z, and X are known to be knaves). It follows
that Y spoke the truth. But Y said that exactly two were knights. This contradicts the
result that V , W , and Y are all knights.
8. ... V cannot have spoken the truth, and so V is a knave.
9. ... U , Z, X, and V are all knaves, and so there are at most two knights.
10. Suppose that Y is a knave. Then the only knight is W , which means that Z spoke
the truth. But we have already seen that this is impossible. Hence Y is a knight.
11. By 6, 9, and 10, the only possible solution is that U , Z, X, and V are knaves and W
and Y are knights. Examination of the statements shows that this solution is consistent:
in this case, the statements of U , Z, X, and V are false and those of W and Y are true.

39. The chauffeur killed Lord Hazelton.


One explanation:
1. Suppose the cook was in the kitchen at the time of the murder.
2. ∴ The butler killed Lord Hazelton with strychnine. (by (c) and (1) and modus ponens)
3. ∴ We have a contradiction: Lord Hazelton was killed by strychnine and a blow on the
head. (by (2) and (a))
4. ∴ The supposition that the cook was in the kitchen is false. (by the contradiction rule)
5. ∴ The cook was not in the kitchen at the time of the murder. (negation of supposition)
6. ∴ Sara was not in the dining room when the murder was committed. (by (e) and (5) and
modus ponens)
7. ∴ Lady Hazelton was in the dining room when the murder was committed. (by (b) and
(6) and elimination)
8. ∴ The chauffeur killed Lord Hazelton. (by (d) and (7) and modus ponens)

40. One solution: Suppose Socko is telling the truth. Then Fats is also telling the truth because
if Lefty killed Sharky then Muscles didn’t kill Sharky. Consequently, two of the men were
telling the truth, which contradicts the fact that all were lying except one. Therefore, Socko
is not telling the truth: Lefty did not kill Sharky. Hence Muscles is telling the truth and all
the others are lying. It follows that Fats is lying, and so Muscles killed Sharky.
Another solution: The statements of Socko and Muscles contradict each other, which implies
that one is lying and the other is telling the truth. If Socko is telling the truth, then Fats
is also telling the truth, which contradicts the fact that only one person told the truth. So
Muscles is the only one who told the truth. Hence Muscles is telling the truth and all the
others are lying. It follows that Fats is lying, and so Muscles killed Sharky.

41. (1) p → t by premise (d)


∼p by premise (c)
∴ ∼p by modus tollens
(2) ∼p by (1)
∴ ∼p ∨ q by generalization
(3) ∼p ∨ q → r by premise (a)
∼p ∨ q by (2)
∴ r by modus ponens
(4) ∼p by (1)
r by (3)
∴ ∼p ∧ r by conjunction
(5) ∼p ∧ r → ∼s by premise (e)
∼p ∧ r by (4)
∴ ∼s by modus ponens
Instructor’s Manual: Section 2.3 27

(6) s ∨ ∼q by premise (b)


∼s by (5)
∴ ∼q by elimination

42. (1) q→r by premise (b)


∼r by premise (d)
... ∼q by modus tollens
(2) p ∨q by premise (a)
∼q by (1)
... p by elimination
(3) ∼q →u∧s by premise (e)
∼q by (1)
... u∧s by modus ponens
(4) u∧s by (3)
... s by specialization
(5) p by (2)
s by (4)
... p ∧s by conjunction
(6) p ∧s→t by premise (c)
p ∧s by (5)
... t by modus ponens
43. (1) ∼w by premise (d)
u∨w by premise (e)
∴ u by elimination
(2) u → ∼p by premise (c)
u by (1)
∴ ∼p by modus ponens
(3) ∼p → r ∧ ∼s by premise (a)
∼p by (2)
∴ r ∧ ∼s by modus ponens
(4) r ∧ ∼s by (3)
∴ ∼s by specialization
(5) ∼t → s by premise (b)
∼s by (4)
∴ ∼t by modus tollens

44. (1) ∼q∨s by premise (d)


∼s by premise (e)
... ∼q by elimination
(2) p→q by premise (a)
∼q by (1)
... ∼p by modus tollens
(3) r∨s by premise (b)
∼s by premise (e)
... r by elimination
(4) ∼p by (2)
r by (3)
... ∼p ∧r by conjunction
28 Solutions for Exercises: The Logic of Compound Statements

(5) ∼p ∧r →u by premise (f)


∼p ∧r by (4)
... u by modus ponens
(6) ∼ s →∼ t by premise (c)
∼s by premise (e)
... ∼t by modus ponens
(7) w∨t by premise (g)
∼t by (6)
... w by elimination
(8) u by (5)
w by (7)
... u∧w by conjunction

Section 2.4

1. R = 1
2. R = 1
3. S = 1
4. S = 1
5. The input/output table is as follows:

Input Output
P Q R
1 1 1
1 0 1
0 1 0
0 0 1
6. The input/output table is as follows:

Input Output
P Q R S
1 1 1 1
1 1 0 0
1 0 1 1
1 0 0 1
0 1 1 1
0 1 0 0
0 0 1 1
0 0 0 0
7. The input/output table is as follows:

Input Output
P Q R
1 1 0
1 0 1
0 1 0
0 0 0
Instructor’s Manual: Section 2.4 29

8. The input/output table is as follows:

Input Output
P Q R S
1 1 1 1
1 1 0 1
1 0 1 1
1 0 0 1
0 1 1 1
0 1 0 1
0 0 1 1
0 0 0 1

9. P ∨ ∼Q

10. (P ∨ Q)∧ ∼ Q

11. (P ∧ ∼Q) ∨ R

12. (P ∨ Q)∨ ∼ (Q ∧ R)

13.
P NOT
OR
Q

14.
P
OR NOT R
Q

15.

P
OR

NOT
AND

Q NOT

16. P
AND
Q
OR

R NOT
30 Solutions for Exercises: The Logic of Compound Statements

17.
P
AND
Q NOT OR S

NOT
AND
R

18. a. (P ∧ Q ∧ ∼R) ∨ (∼P ∧ Q ∧ R)


b. P
Q AND
R NOT

NOT OR

AND

19. a. (P ∧ Q∧ ∼ R) ∨ (P ∧ ∼ Q∧ ∼ R) ∨ (∼ P ∧ Q ∧ ∼ R)
b. One circuit (among many) having the given input/output table is the following:

P
Q AND

R NOT

NOT AND OR S

NOT

NOT

AND

NOT

20. a. (P ∧ Q ∧ R) ∨ (P ∧ ∼Q ∧ R) ∨ (∼P ∧ ∼Q ∧ ∼R)


Instructor’s Manual: Section 2.4 31

b. P
Q AND

R
OR

NOT AND

NOT

AND
NOT

NOT

21. a. (P ∧ Q ∧ ∼ R) ∨ (∼ P ∧ Q ∧ R) ∨ (∼ P ∧ Q ∧ ∼ R)
b. One circuit (among many) having the given input/output table is the following:
P
Q AND

R NOT

NOT AND OR S

NOT

AND

NOT

22. The input/output table is

Input Output
P Q R S
1 1 1 0
1 1 0 1
1 0 1 0
1 0 0 0
0 1 1 0
0 1 0 0
0 0 1 1
0 0 0 0
One circuit (among many) having this input/output table is shown below.
32 Solutions for Exercises: The Logic of Compound Statements

P
Q AND
R NOT

OR

NOT

AND

NOT

23. The input/output table is as follows:

Input Output
P Q R S
1 1 1 1
1 1 0 0
1 0 1 0
1 0 0 0
0 1 1 0
0 1 0 0
0 0 1 0
0 0 0 1
One circuit (among many) having this input/output table is the following:
P
Q AND
R

OR S
NOT

NOT AND

NOT

24. Let P and Q represent the positions of the switches in the classroom, with 0 being “down”
and 1 being “up.” Let R represent the condition of the light, with 0 being “off” and 1 being
“on.” Initially, P = Q = 0 and R = 0. If either P or Q (but not both) is changed to 1, the
light turns on. So when P = 1 and Q = 0, then R = 1, and when P = 0 and Q = 1, then
R = 1. Thus when one switch is up and the other is down the light is on, and hence moving
the switch that is down to the up position turns the light off. So when P = 1 and Q = 1, then
R = 0. It follows that the input/output table has the following appearance:

Input Output
P Q R
1 1 0
1 0 1
0 1 1
0 0 0
Instructor’s Manual: Section 2.4 33

One circuit (among many) having this input/output table is the following:
P
AND
Q NOT

OR R

NOT
AND

25. Let P , Q, and R indicate the positions of the switches, with 1 indicating that the switch is in
the on position. Let an output of 1 indicate that the security system is enabled. The complete
input/output table is as follows:

Input Output
P Q R S
1 1 1 1
1 1 0 1
1 0 1 1
1 0 0 0
0 1 1 1
0 1 0 0
0 0 1 0
0 0 0 0

One circuit (among many) having this input/output table is the following:

P
Q AND
R

AND

NOT

OR S

NOT AND

NOT
AND

Note: One alternative answer interchanges the 1’s and 0’s.

26. The Boolean expression for (a) is (P ∧ Q) ∨ Q, and for (b) it is (P ∨ Q) ∧ Q. We must show
that if these expressions are regarded as statement forms, then they are logically equivalent.
34 Solutions for Exercises: The Logic of Compound Statements

Now
(P ∧ Q) ∨ Q ≡ Q ∨ (P ∧ Q) by the commutative law for ∨
≡ (Q ∨ P ) ∧ (Q ∨ Q) by the distributive law
≡ (Q ∨ P ) ∧ Q by the idempotent law
≡ (P ∨ Q) ∧ Q by the commutative law for ∧

Alternatively, by the absorption laws, both statement forms are logically equivalent to Q.

27. The Boolean expression for circuit (a) is ∼ P ∧(∼ (∼ P ∧Q)) and for circuit (b) it is ∼ (P ∨Q).
We must show that if these expressions are regarded as statement forms, then they are logically
equivalent. Now

∼ P ∧ (∼ (∼ P ∧ Q)) ≡ ∼ P ∧ (∼ (∼ P )∨ ∼ Q) by De Morgan’s law


≡ ∼ P ∧ (P ∨ ∼ Q) by the double negative law
≡ (∼ P ∧ P ) ∨ (∼ P ∧ ∼ Q) by the distributive law
≡ (P ∧ ∼ P ) ∨ (∼ P ∧ ∼ Q) by the commutative law for ∧
≡ c ∨(∼ P ∧ ∼ Q) by the negation law for ∧
≡ (∼ P ∧ ∼ Q)∨c by the commutative law for ∨
≡ ∼P∧∼Q by the identity law for ∨
≡ ∼ (P ∨ Q) by De Morgan’s law.

28. The Boolean expression for circuit (a) is (P ∧ Q) ∨ (P ∧ ∼ Q) ∨ (∼ P ∧ ∼ Q) and for circuit
(b) it is P ∨ ∼ Q. We must show that if these expressions are regarded as statement forms,
then they are logically equivalent. Now

(P ∧ Q) ∨ (P ∧ ∼ Q) ∨ (∼ P ∧ ∼ Q)

≡ ((P ∧ Q) ∨ (P ∧ ∼ Q)) ∨ (∼ P ∧ ∼ Q) by inserting parentheses (which is


legal by the associative law for ∨)
≡ (P ∧ (Q∨ ∼ Q)) ∨ (∼ P ∧ ∼ Q) by the distributive law
≡ (P ∧ t) ∨ (∼ P ∧ ∼ Q) by the negation law for ∨
≡ P ∨ (∼ P ∧ ∼ Q) by the identity law for ∧
≡ (P ∨ ∼ P ) ∧ (P ∨ ∼ Q) by the distributive law
≡ t ∧ (P ∨ ∼ Q) by the negation law for ∨
≡ (P ∨ ∼ Q) ∧ t by the commutative law for ∧
≡ P∨ ∼ Q by the identity law for ∧.

29. The Boolean expression for circuit (a) is (P ∧ Q) ∨ (∼ P ∧ Q) ∨ (P ∧ ∼ Q) and for circuit
(b) it is P ∨ Q. We must show that if these expressions are regarded as statement forms, then
they are logically equivalent. Now

(P ∧ Q) ∨ (∼ P ∧ Q) ∨ (P ∧ ∼ Q)

≡ ((P ∧ Q) ∨ (∼ P ∧ Q)) ∨ (P ∧ ∼ Q) by inserting parentheses (which is


legal by the associative law for ∨)
≡ ((Q ∧ P ) ∨ (Q∧ ∼ P )) ∨ (P ∧ ∼ Q) by the commutative law for ∧
≡ (Q ∧ (P ∨ ∼ P )) ∨ (P ∧ ∼ Q) by the distributive law
≡ (Q∧ t) ∨(P ∧ ∼ Q) by the negation law for ∨
≡ Q ∨ (P ∧ ∼ Q) by the identity law for ∧
≡ (Q ∨ P ) ∧ (Q ∨ ∼ Q) by the distributive law
≡ (Q ∨ P )∧ t by the negation law for ∨
≡ Q∨P by the identity law for ∧
≡ P ∨Q by the commutative law for ∨.
Instructor’s Manual: Section 2.4 35

30. (P ∧ Q) ∨ (∼P ∧ Q) ∨ (∼P ∧ ∼Q) ≡ (P ∧ Q) ∨ ((∼P ∧ Q) ∨ (∼P ∧ ∼Q)


by inserting parentheses (which is
legal by the associative law)
≡ (P ∧ Q) ∨ (∼P ∧ (Q ∨ ∼Q)) by the distributive law
≡ (P ∧ Q) ∨ (∼P ∧ t) by the negation law for ∨
≡ (P ∧ Q) ∨ ∼P by the identity law for ∧
≡ ∼P ∨ (P ∧ Q) by the commutative law for ∨
≡ (∼P ∨ P ) ∧ (∼P ∨ Q) by the distributive law
≡ (P ∨ ∼P ) ∧ (∼P ∨ Q) by the commutative law for ∨
≡ t ∧ (∼P ∨ Q) by the negation law for ∨
≡ (∼P ∨ Q) ∧ t by the commutative law for ∧
≡ ∼P ∨ Q by the identity law for ∧

31. (∼ P ∧ ∼ Q) ∨ (∼ P ∧ Q) ∨ (P ∧ ∼ Q) ≡ ((∼ P ∧ ∼ Q) ∨ (∼ P ∧ Q)) ∨ (P ∧ ∼ Q)


by inserting parentheses (which is
legal by the associative law)
≡ (∼ P ∧ (∼ Q ∨ Q)) ∨ (P ∧ ∼ Q) by the distributive law
≡ (∼ P ∧ (Q∨ ∼ Q)) ∨ (P ∧ ∼ Q) by the commutative law for ∨
≡ (∼ P ∧ t) ∨(P ∧ ∼ Q) by the negation law for ∨
≡ ∼ P ∨ (P ∧ ∼ Q) by the identity law for ∧
≡ (∼ P ∨ P ) ∧ (∼ P ∨ ∼ Q) by the distributive law
≡ (P ∨ ∼ P ) ∧ (∼ P ∨ ∼ Q) by the commutative law for ∨
≡ t ∧(∼ P ∨ ∼ Q) by the negation law for ∨
≡ (∼ P ∨ ∼ Q)∧ t by the commutative law for ∧
≡ ∼P∨∼Q by the identity law for ∧
≡ ∼ (P ∧ Q) by De Morgan’s law.

32. (P ∧ Q ∧ R) ∨ ((P ∧ ∼ Q ∧ R) ∨ (P ∧ ∼ Q∧ ∼ R)
≡ ((P ∧ (Q ∧ R)) ∨ (P ∧ (∼ Q ∧ R))) ∨ (P ∧ (∼ Q∧ ∼ R)) ∨ (P ∧ ∼ Q)
by inserting parentheses (which is
legal by the associative law)
≡ (P ∧ [(Q ∧ R) ∨ (∼ Q ∧ R)] ∨ (P ∧ [∼ Q∧ ∼ R]) by the distributive law
≡ P ∧ ([(Q ∧ R) ∨ (∼ Q ∧ R)] ∨ [∼ Q∧ ∼ R]) by the distributive law
≡ P ∧ ([(R ∧ Q) ∨ (R∧ ∼ Q)] ∨ [∼ Q∧ ∼ R]) by the commutative law for ∧
≡ P ∧ ([(R ∧ (Q∨ ∼ Q)] ∨ [∼ Q∧ ∼ R]) by the distributive law
≡ P ∧ ([(R∧ t] ∨[∼ Q∧ ∼ R]) by the negation law for ∨
≡ P ∧ (R ∨ [∼ Q∧ ∼ R]) by the identity law for ∧
≡ P ∧ ((R ∨ ∼ Q) ∧ (R∨ ∼ R)) by the distributive law
≡ P ∧ ((R ∨ ∼ Q) ∧ t]) by the negation law for ∨
≡ P ∧ (R ∨ ∼ Q) by the identity law for ∧.

33. a.
(P | Q) | (P | Q) ≡ ∼ [(P | Q) ∧ (P | Q)] by definition of |
≡ ∼ (P | Q) by the idempotent law for ∧
≡ ∼ [∼ (P ∧ Q)] by definition of |
≡ P ∧Q by the double negative law.

b.
P ∧ (∼ Q ∨ R) ≡ (P | (∼ Q ∨ R)) | (P | (∼ Q ∨ R))
by part (a)
≡ (P | [(∼ Q |∼ Q) | (R | R)]) | (P | [(∼ Q |∼ Q) | (R | R)])
by Example 2.4.7(b)
≡ (P | [((Q | Q) | (Q | Q)) | (R | R)]) | (P | [((Q | Q) | (Q | Q)) | (R | R)])
by Example 2.4.7(a)
36 Solutions for Exercises: The Logic of Compound Statements

34. a.
(P ↓ Q) ↓ (P ↓ Q) ≡ ∼(P ↓ Q) by part (a)
≡ ∼[∼(P ∨ Q)] by definition of ↓
≡P ∨Q by the double negative law
b.
P ∨Q ≡ ∼ (∼ (P ∨ Q)) by the double negative law
≡ ∼ (P ↓ Q) by definition of ↓
≡ (P ↓ Q) ↓ (P ↓ Q) by part (a).
c.
P ∧Q ≡ ∼ (∼ P ∨ ∼ Q) by De Morgan’s law and the double negative law
≡ ∼ P ↓∼ Q by definition of ↓
≡ (P ↓ P ) ↓ (Q ↓ Q) by part (a).
d.
P →Q ≡ ∼P ∨Q by Exercise 13(a) of Section 2.2
≡ (∼ P ↓ Q) ↓ (∼ P ↓ Q) by part (b)
≡ ((P ↓ P ) ↓ Q) ↓ ((P ↓ P ) ↓ Q) by part (a).
e.
P ↔Q ≡ (P → Q) ∧ (Q → P ) by the truth table on page 46 of the text

≡ ([(P ↓ P ) ↓ Q] ↓ [(P ↓ P ) ↓ Q)]) ∧ ([(Q ↓ Q) ↓ P ] ↓ [(Q ↓ Q) ↓ P )])


by part (d)
≡ (([(P ↓ P ) ↓ Q] ↓ [(P ↓ P ) ↓ Q)]) ↓ ([(P ↓ P ) ↓ Q] ↓ [(P ↓ P ) ↓ Q)]))
↓ (([(Q ↓ Q) ↓ P ] ↓ [(Q ↓ Q) ↓ P )]) ↓ ([(Q ↓ Q) ↓ P ] ↓ [(Q ↓ Q) ↓ P )]))
by part (c)

Section 2.5

1. 1910 = 16 + 2 + 1 = 100112
2. 55 = 32 + 16 + 4 + 2 + 1 = 1101112
3. 287 = 256 + 16 + 8 + 4 + 2 + 1 = 1000111112
4. 45810 = 256 + 128 + 64 + 8 + 2 = 1110010102
5. 1609 = 1024 + 512 + +64 + 8 + 1 = 110010010012
6. 1424 = 1024 + 256 + 128 + 16 = 101100100002
7. 11102 = 8 + 4 + 2 = 1410
8. 101112 = 16 + 4 + 2 + 1 = 2310
9. 1101102 = 32 + 16 + 4 + 2 = 5410
10. 11001012 = 64 + 32 + 4 + 1 = 10110

11. 10001112 = 64 + 4 + 2 + 1 = 7110


12. 10110112 = 64 + 16 + 8 + 2 + 1 = 9110
13. 1 1 1

1 0 1 12
+ 1 0 12
1 0 0 0 02
Instructor’s Manual: Section 2.5 37

14. 0 1 1

1 0 0 12
+ 1 0 1 12
1 0 1 0 02

15. 1 1 1 1

1 0 1 1 0 12
+ 1 1 1 0 12
1 0 0 1 0 1 02

16. 1 1 1 1 1 1 1

1 1 0 1 1 1 0 1 12
+ 1 0 0 1 0 1 1 0 1 02
1 0 0 0 0 0 1 0 1 0 12

17. 1

1 10 10 1

1 0 1 0 02
− 1 1 0 12
1 1 12

18. 10

0 0 10 0 10

1 1 0 1 02
− 1 1 0 12
1 1 0 12

19. 0 10

1 0 1 1 0 12
− 1 0 0 1 12
1 1 0 1 02

20. 1 10 1 10 1

0 10 0 10 0 10 10

1 0 1 0 1 0 02
− 1 0 1 1 12
1 1 1 1 0 12

21. a. S = 0, T = 1 b. S = 0, T = 1 c. S = 0, T = 0

22. Note that


111111112
+ 12
1000000002

and 1000000002 = (28 )10 . Because 12 = 110 , we have that

111111112 + 12 = (28 )10


− 12 − 110
111111112 = (28 − 1)10

flip the bits add 1


23. |−23|10 = 2310 = (16 + 4 + 2 + 1)10 = 000101112 −→ 11101000 −→
11101001. So the answer is 11101001.
38 Solutions for Exercises: The Logic of Compound Statements

flip the bits add 1


24. |−67|10 = 6710 = (64 + 2 + 1)10 = 010000112 −→ 10111100 −→ 10111101.
So the 8-bit two’s complement is 10111101.
flip the bits add 1
25. |−4|10 = 410 = 000001002 −→ 11111011 −→ 11111100. So the answer is 11111100.
flip the bits add 1
26. |−115|10 = 11510 = (64 + 32 + 16 + 2 + 1)10 = 011100112 −→ 10001100 −→ 10001101
So the 8-bit two’s complement is 10001101.
27. Because the leading bit is 1, this is the 8-bit two’s complement of a negative integer.
flip the bits add 1
11010011 −→ 00101100 −→ 001011012 = (32 + 8 + 4 + 1)10 = |−45|10 .
So the answer is −45.
flip the bits
28. Because the leading bit is 1, this is the 8-bit two’s complement of a negative integer. 10011001 −→
add 1
01100110 −→ 011001112 = (64 + 32 + 4 + 2 + 1)10 = |−103|10 . So the answer is −103.
29. Because the leading bit is 1, this is the 8-bit two’s complement of a negative integer.
flip the bits add 1
11110010 −→ 00001101 −→ 000011102 = (8 + 4 + 2)10 = |−14|10 .
So the answer is −14.
flip the bits
30. Because the leading bit is 1, this is the 8-bit two’s complement of a negative integer. 10111010 −→
add 1
01000101 −→ 010001102 = (64 + 4 + 2)10 = |−70|10 . So the answer is −70.
31. 5710 = (32 + 16 + 8 + 1)10 = 1110012 → 00111001
flip the bits add 1
|−118|10 = (64 + 32 + 16 + 4 + 2)10 = 011101102 −→ 10001001 −→ 10001010.
So the 8-bit two’s complements of 57 and −118 are 00111001 and 10001010. Adding the 8-bit
two’s complements in binary notation gives

00111001
+ 10001010
11000011

Since the leading bit of this number is a 1, the answer is negative. Converting back to decimal
flip the bits add 1
form gives 11000011 −→ 00111100 −→ 001111012 = (32 + 16 + 8 + 4 + 1)10 = |61|10 .
So the answer is −61.
32. 6210 = (32 + 16 + 8 + 4 + 2)10 = 1111102 → 00111110
flip the bits add 1
|−18|10 = (16 + 2)10 = 00010010 −→ 11101101 −→ 11101110
Thus the 8-bit two’s complements of 62 and −18 are 00111110 and 10110111. Adding the 8-bit
two’s complements in binary notation gives

00111110
+ 11101110
00101100

Truncating the 1 in the 28 th position gives 00101100. Since the leading bit of this number is
a 0, the answer is positive. Converting back to decimal form gives

00101100 → 1011002 = (32 + 8 + 4)10 = 4410 .


So the answer is 44.
Instructor’s Manual: Section 2.5 39

flip the bits add 1


33. |−6|10 = (4 + 2)10 = 1102 −→ 00000110 → 11111001 −→ 11111010
flip the bits add 1
|−73|10 = (64 + 8 + 1)10 = 01001001 −→ 10110110 −→ 10110111
Thus the 8-bit two’s complements of −6 and −73 are 11111010 and 10110111. Adding the
8-bit two’s complements in binary notation gives

11111010
+ 10110111
10110001

Truncating the 1 in the 28 th position gives 10110001. Since the leading bit of this number is
a 1, the answer is negative. Converting back to decimal form gives

flip the bits add 1


10110001 −→ 01001110 −→ 010011112 = (64 + 8 + 4 + 2 + 1) = 7910 = |−79|10

So the answer is −79.

34. 8910 = (64 + 16 + 8 + 1)10 = 010110012


flip the bits add 1
|−55|10 = (32 + 16 + 4 + 2 + 1)10 = 001101112 −→ 11001000 −→ 11001001
So the 8-bit two’s complements of 89 and −55 are 01001111 and 11010101. Adding the 8-bit
two’s complements in binary notation gives

01011001
+ 11001001
100100010

Truncating the 1 in the 28 th position gives 00100010. Since the leading bit of this number is
a 0, the answer is positive. Converting back to decimal form gives

001000102 = (32 + 2)10 = 3410 .

So the answer is 34.


flip the bits add 1
35. |−15|10 = (8 + 4 + 2 + 1)10 = 000011112 −→ 11110000 −→ 11110001
flip the bits add 1
|−46|10 = (32 + 8 + 4 + 2)10 = 001011102 −→ 11010001 −→ 11010010
So the 8-bit two’s complements of −15 and −46 are 11110001 and 10100010. Adding the 8-bit
two’s complements in binary notation gives

11110001
+ 11010010
111000011

Truncating the 1 in the 28 th position gives 11000011. Since the leading bit of this number is
a 1, the answer is negative. Converting back to decimal form gives

flip the bits add 1


11000011 −→ 00111100 −→ 001111012 = −(32 + 16 + 8 + 4 + 1)10 = |−61|10 .

So the answer is −61.


40 Solutions for Exercises: The Logic of Compound Statements

36. 12310 = (64 + 32 + 16 + 8 + 2 + 1)10 = 011110112


flip the bits add 1
|−94|10 = (64 + 16 + 8 + 4 + 2)10 = 010111102 −→ 10100001 −→ 10100010
So the 8-bit two’s complements of 123 and −94 are 01111011 and 10100010. Adding the 8-bit
two’s complements in binary notation gives

01111011
+ 10100010
100011101

Truncating the 1 in the 28 th position gives 00011101. Since the leading bit of this number is
a 0, the answer is positive. Converting back to decimal form gives

000111012 = (16 + 8 + 4 + 1)10 = 2910 .

So the answer is 29.


37. a. The 8-bit two’s complement of −128 is computed as follows:
|−128|10 = 12810 = (27 )10
flip the bits add 1
= 100000002 −→ 01111111 −→ 10000000.
So the 8-bit two’s complement of −128 is 10000000. If the two’s complement procedure is
flip the bits add 1
applied to this result, the following is obtained 10000000 −→ 01111111 −→ 10000000.
So the 8-bit two’s complement of the 8-bit two’s complement of −128 is 10000000, which is
the 8-bit two’s complement of −128.
b. Suppose a, b, and a + b are integers in the range from 1 through 128. Then

1 ≤ a ≤ 128 = 27 1 ≤ b ≤ 128 = 27 1 ≤ a + b ≤ 128 = 27 .

Multiplying all parts of all three inequalities by −1 gives

−1 ≥ −a ≥ −27 − 1 ≥ −b ≥ −27 − 1 ≥ −(a + b) ≥ −27 .

Thus
28 − (a + b) ≥ 28 − 27 ≥ 27 (2 − 1) = 27 ,
and
(28 − a) + (28 − b) = 28 + (28 − (a + b)) ≥ 28 + 27 .
Therefore, the 8-bit two’s complement of (28 − a) + (28 − b) has 1’s in both the 28 th and the
27 th positions. The 1 in the 28 th position is truncated, and the 1 in the 27 th position shows
that the sum is negative.
38. A2BC16 = 10·163 + 2·162 + 11·16 + 12 = 41,66010
39. E0D16 = 14·162 + 0 + 13 = 359710
40. 39EB16 = 3·163 + 9·162 + 14·16 + 11 = 14, 82710
41. 0001 1100 0000 1010 1011 11102
42. B53DF 816 = 1011 0101 0011 1101 1111 10002
43. 4ADF 8316 = 0100 1010 1101 1111 1000 00112
44. 2E16
45. 1011 0111 1100 01012 = B7C516
Instructor’s Manual: Section 2.5 41

46. 1011 0111 1100 01012 = B7C516

47. a. 6·84 + 1·83 + 5·82 + 0·8 + 2·1 = 25,41010


b. 207638 = 2·84 + 0·83 + 7·82 + 6·8 + 3 = 8, 69110
c. To convert an integer from octal to binary notation:
(i) Write each octal digit of the integer in fixed 3-bit binary notation (and include leading zeros
as needed). Note that

octal digit 0 1 2 3 4 5 6 7
3-bit binary equivalent 000 001 010 011 100 101 110 111

(ii) Juxtapose the results.


As an example, consider converting 615028 to binary notation:

68 = 1102 18 = 0012 58 = 1012 08 = 0002 28 = 0102 .

So in binary notation the integer should be 110 001 101 000 0102 . This result can be checked by
writing the integer in decimal notation and comparing it to the answer obtained in part (a):

110 001 101 000 0102 = (1 · 214 + 1 · 213 + 1 · 29 + 1 · 28 + 1 · 26 + 1 · 2)10 = 2541010 .

This is the same as the answer obtained in part (a). So the two methods give the same result.
To convert an integer from binary to octal notation:
(i) Group the digits of the binary number into sets of three, starting from the right and adding
leading zeros as needed:
(ii) Convert the binary numbers in each set of three into octal digits;
(iii) Juxtapose those octal digits.
As an example consider converting 11010111012 to octal notation. Grouping the binary digits
in sets of three and adding two leading zeros gives

001 101 011 101.

To convert each group into an octal digit, note that

0012 = 18 1012 = 58 0112 = 38 1012 = 58 .

So the octal version of the integer should be 15358 . To check this result, observe that

1 101 011 1012 = (1 · 29 + 1 · 28 + 1 · 26 + 1 · 24 + 1 · 23 + 1 · 22 + 1)10 = 86110

and
15358 = (1 · 83 + 5 · 82 + 3 · 8 + 5)10 = 86110
also. So the two methods give the same result.

You might also like