0% found this document useful (0 votes)
91 views3 pages

CSE 311: Foundations of Computing I Section: Gates and Equivalences Solutions Binary Addition

The document discusses several topics relating to foundations of computing including: 1) Binary addition problems and their solutions in decimal 2) Using propositional equivalences to prove two formulas are equivalent 3) Proving several formulas are tautologies by showing equivalence to True (T) 4) Proving some pairs of formulas are not equivalent by finding cases where they differ 5) Converting a formula to a circuit diagram 6) Writing logical expressions using boolean algebra and simplifying them
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)
91 views3 pages

CSE 311: Foundations of Computing I Section: Gates and Equivalences Solutions Binary Addition

The document discusses several topics relating to foundations of computing including: 1) Binary addition problems and their solutions in decimal 2) Using propositional equivalences to prove two formulas are equivalent 3) Proving several formulas are tautologies by showing equivalence to True (T) 4) Proving some pairs of formulas are not equivalent by finding cases where they differ 5) Converting a formula to a circuit diagram 6) Writing logical expressions using boolean algebra and simplifying them
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/ 3

CSE 311: Foundations of Computing I

Section: Gates and Equivalences Solutions

Binary Addition
Just as a quick recall of binary, do the following operations. Then, convert your answers to base-10.
(a) (101011)2 + (1111)2

Solution: (111010)2 = 58

(b) (101011)2 (1111)2

Solution: (100100)2 = 36

(c) (101011)2 (1111)2

Solution: (1010000101)2 = 645

Equivalences
Prove that each of the following pairs of propositional formulae are equivalent using propositional equiv-
alences.
(a) p q (p q) (p q)

Solution:
pq (p q) (q p) [iff is two implications]
(p q) (q p) [Law of Implication]
((p q) q) ((p q) p) [Distributivity]
(p q) (q q) ((p p) (p q)) [Distributivity]
(p q) (p q)) [Negation]
(p q) (p q) [Commutativity]

(b) p (q r) q (p r)

Solution:
p (q r) p (q r) [Law of Implication]
(p q) r [Associativity]
(q p) r [Commutativity]
q (p r) [Associativity]
q (p r) [Law of Implication]

1
Tautologies
Prove that each of the following propositional formulae are tautologies by showing they are equivalent
to T.
(a) ((p q) (q r)) (p r)

Solution:
((p q) (q r)) (p r) ((p q) (q r)) (p r) [Law Impl.]
((p q) (q r)) (p r) [DeMorgan]
(((p q) (p r) (q r) [Associativity]
(((p r) p) ((p r) q)) (q r) [Distributivity]
(((p p) r) ((p r) q)) (q r) [Assoc., Commut.]
((T r) ((p r) q)) (q r) [Negation]
(T ((p r) q)) (q r) [Domination]
((p r) q) (q r) [Identity]
(q ((p r) q) r ((p r) q)) [Distributivity]
((q q) (p r)) (r r p q) [Assoc., Comm.]
(T (p r)) (T p q) [Negation]
TT [Domination]
T [Identity]

(b) (p q) (p r) (q r)

Solution:
(p q) (p r) (q r) (p (r q)) (q r) [Distrib.]
(p (r q)) (q r) [Law of Implication]
(p (r q)) (q r) [DeMorgan]
p ((r q) (r q)) [Assoc., Comm.]
p T [Negation]
T [Identity]

(c) (p q) (p q) q

Solution:
(p q) (p q) q (q (p p)) q [Comm., Assoc., Distrib.]
(q T) q [Negation]
q q [Identity]
T [Negation]

2
Non-equivalence
Prove that each of the following pairs of propositional formulae are not equivalent by finding an input
they differ on.
(a) p q qp

Solution: When p = T and q = F, then p q F, but q p T.

(b) (p q) r p (q r)

Solution: When p = F, q = F, and r = F, then (p q) r F, but p (q r) T.

Convert To A Circuit
(a) ((p q) (p r)) (q r)

Solution: Solution omitted due to effort in typesetting. Please come to office hours if you want to
see it.

Boolean Algebra
For each of the following parts, write the logical expression using boolean algebra operators. Then,
simplify it using axioms and laws of boolean algebra.
(a) p (q (p q))

Solution: First, we replace , , and . This gives us p0 + q 0 + pq; note that the parentheses
are not necessary in boolean algebra, because the operations are all commutative and associa-
tive. We can use DeMorgans laws to get the slightly simpler (pq)0 + pq. Then, we can use
complementarity to get 1. (Note that this is another way of saying the formula is a tautology.)

(b) (p (q p))

Solution: First, we use DeMorgans laws to push the negation through. This gives us p(qp).
Now, we convert to + and which results in p0 (q 0 + p0 ). Using distribution, we get p0 q 0 + p0 p0 , and
by idempotency, we get p0 q 0 + p0 . Then, we can use identity to get p0 q 0 + p0 1. Then, factoring out
p0 gives us p0 (q 0 + 1). Using null gives us p0 1, and identity gives us p0

You might also like