Download - Boo Lean Algebra
-
7/27/2019 Boo Lean Algebra
1/24
1 of 24
CSCI 220: Computer Architecture-IInstructor: Pranava K. Jha
Elements of Boolean Algebra
Important Boolean Identities
(i) (ii)
1. x + x = x x x = x Idempotence
2. (x) = x Involution
3. x + 1 = 1 x 0 = 0 4. x +0 = x x 1 = x 5. x + x= 1 x x =0 6. x + y = y + x x y = yx Commutativity
7. x +(y + z)= (x + y)+ z x (yz)= (x y) z Associativity
8. x (y + z)= xy + x z x +(yz)= (x + y) (x + z) Distributivity
9. x + x y = x x (x + y)= x Absorption
10. x + x y = x + y x (x+ y)= x y Absorption
11. (x + y)= x y (x y) = x + y De Morgans law
Q. 1.Using the basic identities of Boolean algebra, prove the following relationships. Ateach step, state which postulate or theorem is applied.
i. xy+ yz+ zx= xy + yz+ zx.ii. (x+ y)(y+ z)(z+ x) =xy + yz+ zx.
i. Identity used
xy+ yz+ zx= xy1 +yz1 +zx1 4(ii)
= xy(z+ z) +yz(x+ x) +zx(y+ y) 5(i)
= xyz+ xyz+ yzx +yzx+ zxy+ zxy 8(i)
= xyz+ xyz+ xyz+ xyz+ xyz+ xyz 6(ii)
= xyz+ xyz+ xyz+ xyz+ xyz+ xyz 6(i)
= (x+ x)yz+ x(y+ y)z+ xy(z+ z) 8(i)
= 1yz+ x1z + xy1 5(i)
= yz+ xz+ xy 4(ii)
= xy+ yz+ zx. QED
-
7/27/2019 Boo Lean Algebra
2/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
2 of 24
ii. Identity used
(x+ y)(y+ z)(z+ x) = (y+ x)(y+ z)(z+ x) 6(i)
= (y+ xz)(z+ x) 8(ii)
= (y+ xz)z+ (y+ xz)x 8(i)
= yz+ xzz+ yx + xzx 8(i)
= yz+ xzz+ yx + xxz 6(ii)
= yz+ xz+ yx + xz 1(ii)
= yz+ yx + xz+ xz 6(i)
= yz+ yx + xz 1(i)
= yx+ yz+ xz 6(i)
= xy+ yz+ zx. QED 6(ii)
Q. 2.Simplify each of the following expressions using theorems of Boolean algebra.
i. A + B +(A + B)CD
ii. ABC+ (ABC)
i. A + B +(A + B)CD =A + B + ACD + BCD
=A + ACD + B + BCD : commutativity of +.=A + CD + B + BCD : absorption law.
=A + CD + B(1+ CD) : distributivity of . over +.
=A + CD + B : 1 +x = 1 andx.1 =x.=A + B + CD
ii. ABC+ (ABC) =ABC+ A+ B + C : De Morgans law.= (A+ ABC) +B + C : commutativity of +.
=A(1 +BC) + B + C : distributivity of . over +.
=A1 +B + C : 1 +x = 1.
=A+ B + C
-
7/27/2019 Boo Lean Algebra
3/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
3 of 24
Q. 3.True or false? In each case, justify your answer.
i. If A + B + C= C+ D, thenA + B = D.ii. IfAB + AC= AD, thenB + C= D.
i. The given statement is false.
Counterexample: LetA = 1,B = 1,C= 1 andD = 0. Under these truth
assignments,A + B + C= 1 as well as C+ D = 1, yet A + B = 1 andD = 0.
ii. The given statement is false
Counterexample: LetA = 1,B = 0,C= 0 andD = 1. Under these truthassignments,AB+ AC= 0 as well as AD = 0, yet B + C= 0 andD = 1.
Q. 4.Prove that thatab + ac + bc = ab + ac.
Proof: ab + ac + bc= ab + ac+ (a+ a)bc=ab + ac + a bc + abc
=ab + a bc + ac + abc
=ab(1 + c) + ac(1 +b)
=ab + ac. QED
Alternative Proof: Eitherbc = 0 orbc = 1. Ifbc = 0, then the claim is immediate.
Suppose thatbc = 1, in which case b = 1 andc = 1, and henceab + ac + bc =ab + ac +1 = 1; also,ab + ac = a + a= 1. QED
Third Proof: Build a truth table, and demonstrate that ab + ac + bc and ab + acadmitthe same truth value for each truth assignment to a,b and c.
The present identity is calledconsensus theorem.
Q. 5.Given thatab =0 anda + b =1, prove thatac + ab + bc = b + c.
Proof: ac + ab + bc = ac + bc + ab
= (a + b)c + ab
=c + ab, sincea + b= 1=c + ab + ab, sinceab = 0
=c + (a + a)b=c + b=b + c. QED
Alternative proof: Sinceab =0 anda + b =1, eithera =0 andb =1, ora =1 andb =0.
Ifa =0 andb =1, thenac + ab + bc = 0c +1b +1c = b + c. Ifa =1 andb =0, thenac + ab + bc = 1c +0b +0c = c =0 + c = b + c. QED
-
7/27/2019 Boo Lean Algebra
4/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
4 of 24
Q. 6.Prove or present a counterexample: Ifx y = x z, theny = z, where denotesthe XOR (i.e., exclusive-OR) operation.
The given statement is true. To that end, the following truth table details all cases.
x y z xy x z0 0 0 0 0 0 0 1 0 1
0 1 0 1 0
0 1 1 1 1 1 0 0 1 1 1 0 1 1 0
1 1 0 0 1
1 1 1 0 0 It is clear that wheneverx y = x z(the cases marked with),y = z. QED
Alternative Proof: Eitherx = 0 orx = 1: (i) Ifx = 0, thenx y = y and x z= z, hence
x y = x z y = z; (ii) Ifx = 1, thenx y = yand x z= z, hencex y = x zy= z, i.e.,y = z. QED
1. The present exercise shows that XOR obeyscancellation property. Converse ofthe given statement is (trivially) true.
2. OR and AND do not obey cancellation property. What about NOR, NAND and
EQUIVALENCE?
XOR is an unusually important operation in mathematics, engineering and computer
science. Applications abound and may be seen in areas such as addition, error detection,
error correction and parity generation. The operation itself is commutative andassociative. Further, it obeys the cancellation property.
On the other hand, hardware realization of XOR is expensive:
a. A Boolean expression consisting of XOR of literals is not amenable to function
simplification. More precisely, 1 nx
is anodd function, i.e., it is TRUE ifand only if the number of literals (among 1, , ix ) that are TRUE is odd. This
kind of expression does not admit function simplification.
b. The lazy evaluation that works nicely with respect to AND and OR does not work
relative to XOR, i.e., the truth value of 1 nx cannot, in general, be
determined by inspecting the truth values of 1, , ix alone, wherei < n.
-
7/27/2019 Boo Lean Algebra
5/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
5 of 24
Q. 7.Determine whether or not the following identity holds in Boolean algebra:
x(yz) = (x+ y) (x+ z).
The given identity does not hold.
Counterexample: Forx = 0,y = 0 andz= 1,x(yz) = 0, while (x+ y)(x+ z) = 1.
Q. 8.Let denote theequivalenceoperation given by
xy = xy + xy.
Prove or present a counterexample: Ifx y = x z, theny = z.
The given statement is true. Note that
Ifx =0, thenxy + xy =y andxz + xz =z, and
Ifx =1, thenxy + xy =y and xz + xz =z.
Thus, ifx y = x z, then eithery =z ory = z. Observe thaty =zif and only ify = z.
Accordingly, ifx y = x z, theny = z. QED
A more convenient method of proof is to build a truth table (presented below), and
demonstrate that wheneverx y = x z, it is necessarily the case thaty = z.
x y z x y xz
0 0 0 1 1 0 0 1 1 0
0 1 0 0 1
0 1 1 0 0 1 0 0 0 0 1 0 1 0 1
1 1 0 1 0
1 1 1 1 1 It is clear that wheneverx y = x z(the cases marked with),y = z. QED
1. The present exercise shows thatequivalenceobeyscancellation property.
2. Converse of the given statement is (trivially) true.
-
7/27/2019 Boo Lean Algebra
6/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
6 of 24
Q. 9.The inhibition operationin Boolean algebra is denoted byand is defined asfollows:
xy = xy.
Is this operation commutative? Explain.
Note that x y = xyand y x = yx.
Forx =0 andy =1, it is clear thatxy =1 andyx =0. Accordingly,x y y x.
Conclusion: Inhibition operation is not commutative.
Q. 10.Is the inhibition operation associative? Explain.
Note that (a b) c = (a b ) c =(ab )c = (a+ b) c = ac + bc.
Further,a (b c) = a(b c) =a(bc) =abc.
Fora = 1,b = 1 andc = 1, it is clear that ac + bc = 1, whilea
b
c = 0, hence
(ab)c a (b c), i.e., inhibition operation is not associative.
Just saying thatac + bc is not equal toabc (because they look different) is notan acceptable argument. Show explicitly that for a particular truth assignment to a,b and
c, the two Boolean expressionsac + bc and abc admit distinct truth values, and
then conclude thatac + bc abc.
Meanwhile Boolean expressionsx + xy and x + ylook different, yet x + xy = x + y.
Note:The surefire method of attack for a problem of this type is to construct a truth tablethat details truth values of (ab)c and a (b c) against all possible truth values ofa,
band c. If there is even a single disagreement between (a b)c and a (bc), then
conclude that is not associative. On the other hand, if there is an agreement between the
two for every truth assignment to a,b and c, then conclude that is associative. For thegiven operation, the truth table (for testing associativity) is as follows.
a b c ab (ab)c b c a(b c)
0 0 0 0 0 0 0
0 0 1 0 1 1 1
0 1 0 1 0 0 00 1 1 1 0 0 0
1 0 0 0 0 0 0
1 0 1 0 1 1 0 *
1 1 0 0 0 0 0
1 1 1 0 1 0 0 *
* Disagreement
-
7/27/2019 Boo Lean Algebra
7/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
7 of 24
Q. 11.Consider the following operation of in Boolean algebra:
x y =x +y.
Determine whether or not is associative.
The given operation is associative if and only if (x y)z= x (y z) for allx,y and z.
Note that (x y) z= (x y) +z= (x +y) +z= x y +z.Further,x (y z) = x + (y z) = x + (y +z) = x +y +z.
Forx = 0,y = 0 andz= 0,x y +z= 0 whilex +y +z= 1.
Conclusion: (x y) z x (y z), and hence is notassociative.
A surefire recipe for a problem of this type is to build a truth table. Even a single
disagreement between (x y) zand x (y z) means that equality does not hold. On theother hand, if (x y) zand x (y z) systematically agree for all truth assignments tox,
yand z, then equality holds.
Q. 12.Prove the following Boolean identity using algebraic manipulation:
AB' + A'C'D' + A'B'D +A'B'CD' = B' +A'C'D'.
AB' + A'C'D' + A'B'D +A'B'CD'
= AB + A(B + B)CD + AB(C + C)D + ABCD
= AB + ABCD + ABCD + ABCD + ABCD + ABCD
= AB + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD
= AB + ABCD + ABCD + ABCD + ABCD + ABCD + ABCD
= AB + ACD(B +B)+ ABC(D + D)+ ABC(D + D)
= AB + ACD + ABC + ABC
= AB + ACD + AB(C + C)
= AB + ACD + AB
= AB + AB + ACD
= (A + A)B + ACD= B + ACD. QED
-
7/27/2019 Boo Lean Algebra
8/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
8 of 24
Q. 13.Do the following circuits implement the same Boolean function? Explain.
LetF1and F2be the functions implemented by the two circuits, respectively.
Build a truth table forF1and F2.
A B C BC F1= A(BC) AB F2= (AB)C
0 0 0 0 0 0 0
0 0 1 0 0 0 0
0 1 0 0 0 0 0
0 1 1 1 0 0 0
1 0 0 0 0 0 0
1 0 1 0 0 0 0
1 1 0 0 0 1 0
1 1 1 1 1 1 1
It is clear thatF1= F2for each truth assignment toA,B and C.Conclusion: The two circuits implement the same Boolean function.
This is basically a verification of the fact that the AND function is associative.
-
7/27/2019 Boo Lean Algebra
9/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
9 of 24
Q. 14.Do the following circuits implement the same Boolean function? Explain.
LetF1and F2be the functions implemented by the two circuits, respectively.
Build a truth table forF1and F2.
A B C (BC)' F1= (A(BC)')' (AB)' F2= ((AB)'C)'
0 0 0 1 1 1 1
0 0 1 1 1 1 0
0 1 0 1 1 1 1
0 1 1 0 1 1 0
1 0 0 1 0 1 1
1 0 1 1 0 1 0
1 1 0 1 0 0 1
1 1 1 0 1 0 1
ForA = 0,B = 0 andC= 1,F1= 1 whereasF2= 0, i.e.,F1 F2.
Conclusion: The two circuits do notimplement the same Boolean function.
This is basically a verification of the fact that the NAND function isnotassociative.
-
7/27/2019 Boo Lean Algebra
10/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
10 of 24
Q. 15.Do the following circuits implement the same Boolean function? Explain.
The first circuit implements the function
(ANOR B)NOR C= ((A+ B)'+ C)'= (A+ B) C' =AC' +BC'.
The second circuit implements the function
ANOR (BNOR C) = (A+ (B+ C)')'= A' (B+ C) = A'B+ A'C.
ForA = 0,B = 0 andC= 1,AC' +BC'evaluates to 0 whileA'B+ A'Cevaluates to 1.Therefore, the two circuitsdo notimplement the same function.
The mere fact thatAC' +BC'and A'B+ A'C"look" different is not an acceptablereason for their inequality. Show that for a particular truth assignment to the input
variablesA,B and C, the two expressions admit different truth values, and then conclude
that they are indeed unequal.
Whenever in doubt, build a truth table, and the result will surface immediately.
A B C AC' +BC' A' B+ A'C
0 0 0 0 0
0 0 1 0 1
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 0
1 1 0 1 0
1 1 1 0 0
The present exercise shows that the NOR operation is not associative.
-
7/27/2019 Boo Lean Algebra
11/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
11 of 24
Q. 16.Do the following circuits implement the same Boolean function? Explain.
The answer to this problem is YES or NO depending on whether (((A B)' C)' is
equal to (A(B C)' )' for all truth assignments toA,B and C. Accordingly, theproblem is easily resolved by means of a truth table.
It follows that the two circuits implement the same Boolean function.
Note: The foregoing conclusion may as well be reached by proving the equality between
((AB)' C)'and (A (B C)' )' by means of algebraic manipulation.
Remark: (AB)'is equal toA B given byAB+ A'B'.
-
7/27/2019 Boo Lean Algebra
12/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
12 of 24
Q. 17.Consider the following gates.
Which pairs of these gates have the equivalent behavior? Explain.
Reason
A and H are equivalent. XY = (X +Y)
B and G are equivalent. (XY) = X +Y
C and F are equivalent. XY = (X +Y)
D and E are equivalent. (XY) = X +Y
The equivalences themselves are based on De Morgans theorems.
Q. 18.A self-dual logic functionis a functionFsuch thatFis dual of itself. Determine
whether or not the following function is self-dual:
F(A,B,C) = m(0, 3, 5, 6).
It is clear thatF(A,B,C) =A'B'C' + A'BC + AB'C + ABC'.
The dual is obtainable by swapping AND and OR operations in the foregoing expression.
Accordingly,
Dual ofF(A,B,C) = (A' + B' + C')(A' + B + C)(A + B' + C)(A + B + C')
=
M(7, 4, 2, 1)= m(0, 3, 5, 6).
It follows that the given function is indeed self-dual.
-
7/27/2019 Boo Lean Algebra
13/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
13 of 24
Q. 19.For the following statement, present a proof or a counterexample:
Ifx + y = x + z, theny = z.
Counterexample: Letx = 1,y = 1 andz= 0. Under this truth assignment,x + y = 1 =x + z,
yety z.
Q. 20.Let be the operation given by
x y =x +y.
Determine whether or not this operation is associative.
Note that (x y) z= (x y) +z= (x +y) +z= x y +z.
Further,x (y z) = x + (y z) = x + (y +z) = x +y +z.
Forx = 0,y = 0 andz= 0, note thatx y +zevaluates to 0 whilex
+y
+zevaluates to 1.
Conclusion: (x y) z x (y z), hence is not associative.
A surefire recipe for a problem of this type is to build a truth table. Even a single
disagreement between (x y) zand x (y z) means that equality does not hold. On the
other hand, if (x y) zand x (y z) systematically agree for all truth assignments tox,yand z, then equality holds.
x y z x y (x y) z yz x (yz)
0 0 0 1 0 1 1 0 0 1 1 1 1 1
0 1 0 1 0 0 1 0 1 1 1 1 1 1
1 0 0 0 1 1 1
1 0 1 0 1 1 1
1 1 0 1 0 0 0
1 1 1 1 1 1 1
Not equal
-
7/27/2019 Boo Lean Algebra
14/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
14 of 24
Q. 21.Determine whether or not XOR distributes over AND.
Objective is to ascertain whether or not x (yz) = (x y)(xz) for all truth assignmentstox,y and z.
x y z yz x(yz) (xy) (xz) (xy)(xz)0 0 0 0 0 0 0 0
0 0 1 0 0 0 1 0
0 1 0 0 0 1 0 0
0 1 1 1 1 1 1 1
1 0 0 0 1 1 1 1
1 0 1 0 1 1 0 0 *
1 1 0 0 1 0 1 0 *
1 1 1 1 0 0 0 0
Since there are disagreements (indicated by *) betweenx (yz) and (xy)(x z), thegiven identity does not hold. Accordingly, XOR does not distribute over AND.
An alternative approach is to use algebraic simplification. To that end,
x (yz) =x(yz) +x(yz) =x(yz) + x(y +z) = xyz+ xy +xz, and
(xy)(xz) = (xy+ xy)(xz+ xz) =xyxz+ xyxz +xyxz+ xyxz=xyz+ xyz.
Forx = 1,y = 0 andz= 1,xyz+ xy +xz= 1 whilexyz+ xyz= 0. Accordingly,
xyz+ xy +xz xyz+ xyz, and hence the given identity does not hold.
-
7/27/2019 Boo Lean Algebra
15/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
15 of 24
Q. 22.Determine whether or not AND distributes over XOR.
Objective is to ascertain whether or not the following identity holds in Boolean algebra:
x(yz) = (xy) (xz).
The following truth table details all possible truth assignments tox,y and z, and validatesthe identity.
x y z x(yz) (xy) (xz)
0 0 0 0 0
0 0 1 0 0
0 1 0 0 0
0 1 1 0 0
1 0 0 0 0
1 0 1 1 1
1 1 0 1 1
1 1 1 0 0
Conclusion: AND distributes over XOR.
Q. 23.Determine whether or not XOR distributes over OR.
Objective is to ascertain whether or not x (y+ z) = (x y) + (x z) for all truthassignments tox,y and z.
Counterexample: Letx = 1,y = 0 andz= 1, and note thatx (y+ z) = 0 whereas
(xy) + (xz) = 1, hence XOR does not distribute over OR.
Alternative proof: Use a truth table.
x y z (y+ z) x(y+ z) (xy) (xz) (xy) + (xz)
0 0 0 0 0 0 0 0
0 0 1 1 1 0 1 1
0 1 0 1 1 1 0 1
0 1 1 1 1 1 1 1
1 0 0 0 1 1 1 1
1 0 1 1 0 1 0 1 1 1 0 1 0 0 1 1 1 1 1 1 0 0 0 0
Not identical
-
7/27/2019 Boo Lean Algebra
16/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
16 of 24
Q. 24.Determine whether or not OR distributes over XOR.
Objective is to determine whether or not x + (y z) = (x+ y)(x+ z).This is best done by means of a truth table.
x y z yz x+ (yz) x+ y x+ z (x+ y)(x+ z).0 0 0 0 0 0 0 0
0 0 1 1 1 0 1 1
0 1 0 1 1 1 0 1
0 1 1 0 0 1 1 0
1 0 0 0 1 1 1 0 1 0 1 1 1 1 1 0 1 1 0 1 1 1 1 0 1 1 1 0 1 1 1 0
It is clear that x + (y z) (x + y) (x + z). This is particularly true when x= 1, y = 0andz= 0.
Conclusion: OR does not distribute over XOR.
Q. 25.Illustrate the following identity using circuits of switches:
X+ YZ= (X+ Y)(X +Z).
Q. 26.Illustrate the following identity using circuits of switches:
X(X+ Y) = X.
=
X X
Y Z
X
YZ
=X
X
Y
X
-
7/27/2019 Boo Lean Algebra
17/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
17 of 24
Q. 27.Illustrate the following identities using circuits of switches:
i. XY+ XY= X.ii. X(X+ Y)Y= XY.
XY+ XY= X
X(X+ Y)Y =XY
Q. 28.Present an algebraic proof of the following identity:
xy+ (x y)z= xy + xz+ yz.
where denotes the XOR (Exclusive-OR) operation.
xy+ (xy)z =xy + (xy+ xy)z
=xy + xyz+ xyz=xy (z+ z) +xyz+ xyz
=xyz+ xyz+ xyz+ xyz
=xyz+ xyz+ xyz+ xyz+ xyz
=xyz+ xyz+ xyz+ xyz+ xyz+ xyz
=xyz+ xyz+ xyz+ xyz+ xyz+ xyz
=xy(z+ z) + (x+ x)yz+ xz(y+ y)
=xy + yz+ xz.
=xy + xz+ yz. QED
Q. 29.Simplify the Boolean expression:AB + ABC + ABCD + ABCDE + ABCDEF.
AB + ABC + ABCD + ABCDE + ABCDEF
= AB(1+ C + CD + CDE + CDEF)
= AB.
X Y
YX
=X
=
Y
X
X
Y
X
Y
-
7/27/2019 Boo Lean Algebra
18/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
18 of 24
Q. 30.Given thatab =0 anda + b =1, prove using algebraic manipulation that
ac + ab + bc = b + c.
ac + ab + bc = ac + bc + ab
=(a + b)c + ab= c + ab since a + b =1
= c + ab + ab, sinceab = 0= c +(a + a)b
= c + b
= b + c. QED
Alternative proof:
Sinceab =0 anda + b =1, either (i)a =0 andb =1, or (ii)a =1 andb =0.
Ifa =0 andb =1, thenac + ab + bc = 0c +1b +1c = b+ c. Ifa =1 andb =0, thenac + ab + bc = 1c +0b +0c = c =0+ c = b + c (as b =0).
QED
Q. 31.Prove thatXY + YZ + ZX= XY + YZ + ZX.
XY + YZ + ZX =XY(Z+ Z)+ (X+ X)YZ + ZX(Y+ Y)
=XYZ+ XYZ + XYZ+ XYZ + ZXY+ ZXY
=XYZ+ XYZ+ XYZ+ XYZ+ ZXY+ ZXY
=XY(Z+ Z) + (X+ X)YZ+ ZX(Y+ Y)
=XY + YZ + ZX. QED
A surefire recipe for this type of problem is to build a truth table and demonstrate that
XY + YZ + ZXand XY + YZ + ZXadmit the same truth value for each truthassignment toX,Yand Z.
-
7/27/2019 Boo Lean Algebra
19/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
19 of 24
Q. 32.Is it possible to build a three-input NANDgate by means of two numbers of two-
inputNANDgate? Justify your answer.
Solution: The answer is NO. To that end, first recall that the three-input Boolean
function, say,fis given byf(a, b, c) = (abc)= a+ b+ c. The only way a three-input
NAND gate could be implemented using two numbers of two-input NAND gates is toconnect the two-input NAND gates as follows:
where the three input variablesa,b and c may be assigned to the three input lines in anarbitrary way. Accordingly, there are six cases:
-
7/27/2019 Boo Lean Algebra
20/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
20 of 24
Fora =0, b =0 andc =1, (abc) =1 whileab + c = ba + c = 0.
Fora =0, c =0 andb =1, (abc) =1 whileac + b = ca + b = 0.
Forb =0, c =0 anda =1, (abc) =1 whilebc + a = cb + a = 0.
It follows that (abc)is not equal to any of the functions generated by the six
arrangements. Consequently, a three-inputNANDgate cannot be realized by means oftwo numbers of two-inputNANDgates.
Q. 33.For the following truth table, write (i) theminterm canonical formula in algebraic
form and inm-notation, and (ii) themaxterm canonical formulain algebraic form and inM-notation.
x y z f
0 0 0 1
0 0 1 1
0 1 0 0
0 1 1 11 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0
i. f(x,y,z) = xyz+ xyz+ xyz+ xyz+ xyz
=m(0, 1, 3, 5, 6).ii. f(x,y,z) = (x+ y+ z)(x+ y+z) (x+ y+ z)
= M(2, 4, 7).Q. 34.Express the Boolean expression (y+ z)(xy+ z) as a maxterm canonical formula
without constructing a truth table.
(y+ z)(xy+ z) = (y+ z)(x+ z)(y+ z)
= (xx+ y + z)(yy+ x + z)(xx+ y+ z)
= (x+ y + z)(x+ y + z)(y+ x + z)(y+ x + z)(x+ y+ z) )(x+ y+ z)
= (x+ y + z)(x+ y + z)(x+ y + z)(x+ y+ z)(x+ y+ z)(x+ y+ z)
= (x+ y + z)(x+ y + z)(x+ y+ z)(x+ y+ z)(x+ y + z)(x+ y+ z)
= (x+ y + z)(x+ y + z)(x+ y+ z)(x+ y + z)(x+ y+ z)
= M(0, 1, 2, 5, 6).
-
7/27/2019 Boo Lean Algebra
21/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
21 of 24
Q. 35.Express the complement of the following functions in disjunctive canonical form
and conjunctive canonical form using decimal notation:
i. f(x,y,z) = m(0, 2, 5).ii. f(x,y,z) = M(1, 2, 5, 7).i. f(x,y,z) = m(1, 3, 4, 6, 7) = M(0, 2, 5).ii. f(x,y,z) =M(0, 3, 4, 6) =m(1, 2, 5, 7).Q. 36.Prove that the following identities hold in Boolean algebra.
i. (x+ y) (x+ z) = x(yz).
ii. (x+ y)(x+ z) = x + (yz).
whereis theexclusive-NORoperation (also called the equivalenceoperation).
Recall the truth table of each ofexclusive-ORoperation andexclusive-NORoperation:
XOR XNOR
x y xy xy
0 0 0 1
0 1 1 0
1 0 1 0
1 1 0 1
The two identities are readily proved by means of a truth table.
i.
x y z x+ y x+ z (x+ y)(x+ z) y z x x(yz)
0 0 0 0 0 0 0 1 0
0 0 1 0 1 1 1 1 1
0 1 0 1 0 1 1 1 1
0 1 1 1 1 0 0 1 0
1 0 0 1 1 0 0 0 0
1 0 1 1 1 0 1 0 0
1 1 0 1 1 0 1 0 0
1 1 1 1 1 0 0 0 0
Identical
-
7/27/2019 Boo Lean Algebra
22/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
22 of 24
ii.
x y z x+ y x+ z (x+ y)(x+ z) yz x+ (y z)
0 0 0 0 0 1 1 1
0 0 1 0 1 0 0 00 1 0 1 0 0 0 0
0 1 1 1 1 1 1 1
1 0 0 1 1 1 1 1
1 0 1 1 1 1 0 1
1 1 0 1 1 1 0 1
1 1 1 1 1 1 1 1
Identical
Q. 37.
(i) Is theexclusive-NORoperation dual of theexclusive-ORoperation? Explain.(ii) Is theexclusive-NORoperation complement of theexclusive-ORoperation?
Explain.
(i) Answer is YES. To that end, it is clear from the truth tables ofexclusive-ORand
exclusive-NORthatx y = xy + xyand x y = xy + xy.
Now, dual(xy) = (x+ y)(x+ y)
=xx + xy+ yx + yy
= 0 +xy+ xy + 0
=xy + xy
=x y
(ii)exclusive-NORis indeed the complement ofexclusive-OR. This is clear from the truth
table itself. Equivalently, it is easy to see that (xy+ xy)= xy + xy.
Q. 38.Is theexclusive-NORoperation associative? Explain.
Proof:x (y z) =x(y z) + x(yz)=x (yz + yz) +x(yz + yz)
=x (yz + yz) +x(yz + yz)
=xyz + xyz+ xyz + xyz= (xy+ xy)z+ (xy+ xy)z
= (x y)z+ (xy)z
= (x y)z.
-
7/27/2019 Boo Lean Algebra
23/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
23 of 24
Q. 39.Develop a Boolean expression for the following logic diagrams.
f = ((x+ y)(x+ y))
= (x y+ xy)=x y+ xy
=x y.
f= (x y+ xy)=xy + x y
=x y.
Q. 40.Determine whether or notx y (x+ y) =xy, where is theexclusive-NORoperation.
The problem is readily resolved by means of a truth table.
x y xy x+ y xy (x+ y) xy
0 0 1 0 0 0
0 1 0 1 0 01 0 0 1 0 0
1 1 1 1 1 1
It is clear that for each truth assignment to the independent Boolean variables x and y,
x y (x+ y) =xy. Accordingly, the given identity holds in Boolean algebra.
x
y f
(xy)
(x(xy)) =x+ xy = x+ y
(y(xy)) =y+ xy = x + y
x
y f
(x+ y)
(x+ (x + y))= x(x + y) = x y
(y+ (x + y))= y(x + y) = xy
-
7/27/2019 Boo Lean Algebra
24/24
Computer Architecture-I: Boolean Identities (Instructor: Pranava K. Jha)
24 f 24
Q. 41.For each of the following gates, determine whether it is equivalent to an XOR
gate, an XNOR gate, or none of the two.
Gate Function performed by the gate Conclusion
A
f(x,y) =x y= (x) y+ x y=xy + x y
=x y.
XNORgate
B
f(x,y) =x y= (x) y +x (y)
=xy +x y
=x y.
XORgate
C
f(x,y) = (x y)
= (x y)
=x y. XORgate
D
f(x,y) =x y
=x y +x(y)
=x y +xy
=x y.
XNORgate
E
f(x,y) = (x y)
= (xy)
=x y. XNORgate
F
f(x,y) = (xy)
= (x y)
=x y. XORgate
o