Boolean Logic
Boolean Logic
/4 s- 0
-
Boolean
L:ogic
Long ago Aristotle construct ed a complete system of formal logic and wrote six famous works
on the subject, contribut ing greatly to the organizat ion of man's reasoning . For centuries
aftem•ard , mathema ticians kept on trying to solve these logic problems using conventio nal
algebra but only Grorgt· Boolt• could manipula te these symbols successfully to arrive al a
solution wiU, his O\-m mr1thcmatical system o( logic. Boole's revolutio nary paper 'An
luvcstigntio11 of tlie Imus of tlie ll1C11tgl1t' was published in 1854 which led to the developm ent of
new system, the trlgcbrn uf logic, ' BOOLEA N ALGEBRA' or ' BOOLEAN LOGIC'.
Boole's work remained confined to papers only until 1938 w hen Cln11de E. Shmmo,r wrote a
paper titled 'A Symllolic A11nlysis of Relay Switching Circuits'. 1n this paper he a pplied Boolean
Logic to solve relay logic problems . As logic problems are binary decisions and Boolean logic
effectively deals with these binary values. Thus it is also called 'Switcl1i11g Algebra'.
,I Wl ]
- SY ER NIKHJL SIR
BY ER NIK/ tt SH
orm :
Or If we represent firs t statement as X a nd second statement as Y and result- as R then the above
table can also be \\"Tit-ten as follows :
T able 3.1
y 1 reomsents TRUE Y,1tun and
X R 0 represe'llS FALSE \'.1 1U9
1 1 1
1 0 0 ..,,.,;."f =
0 J 0 • If the result of any logical state.-
ment or expression Is always
I
0 0 0
TRUE or 1 fo( all Input combi-
nations, it ls called Tautology.
This is a truth table i.e., table of truth vnllles of tr11tl1 fim ctio1ts.
Now let us proceed with our discussion about logical operators
i.e.,
If the result of any logical
¢) NOT Operator ¢) OR Operator statement or expression Is
~) AND Operator always FALSE or 0 for all Input
combinations, ltls called Fallacy.
NOT Operator
1his operator operates on single variable and operation performed by NOT operator is called
f!)mpleme11tntio11 and the symbol we use for it' is (bar). Thus X means complement of X and YZ
means comple ment of YZ. As ·we know, the variables u sed in boolean equations have a unique
characteristic that they m ay assume only one of tw·o possible values O and 1, where O denotes
FALSE and 1 denotes TRUE value. TI.ms the complement operation can be defined quite simply.
0=1
1=0
T able 3.2 Truth Table for NOT Operators
X X (i.e., NOT X)
0 1
Figure 3.1 Venn diagram for X
1 0
.c
BY ER NIKHIL SIR
COMPUTER SCIENCE WITH PYTHON - X,
52
1 cntation S)1 mbol. If - is used then
Several olher symbols e.g. -, ' are also used for th_e comp cm 1 t of X. NOT operation.
15
- Xis read is 'negation of X' and if' is used then X' 1s read as comp emei:' - . . .
· I · ble VeM diagram for X lS gwen tn
singular or unary operation as it op~ratcs on smg e vana ·
Fig, 3.1 where shaded area depicts X.
OR Operator
· ·
A second tmportant operator m boolean algebra 1s
· OR t
opera or \\
,J,id, denotes operation called
/Mien/ ntiditio11 and the symbol we use for it is +. The + symbol, therefore, does not have lhe
1nom1al' meaning, but is a logical ndditio11 or logical OR symbol Thus X + Y can be read as
X OR )'. For OR operation Lhe possiblt? input and output combinations are as follows :
O+O -=O
0 + 1=1
1+ 0= 1 Shaded Portion
1+1 = 1 soowsX + Y
And the truth table of OR operator is gi\'en below: X y
--- 1 1
- 1-
To avoid ambiguity, there arc other symbols e.g., U, v, and V have been recommended as
replacements for the + sign. Computer people s till use the + sign, however, whid, was the
symbol originally proposed by Boole.Venn diagram for X + Y is given (Fig. 3.2), where s haded
area depicts X + Y.
AND Operator
MiO operator performs another important operation of boolean algebra called logical 11111Iti-
plicalion and the symbol for AND operation is (.) dot. Thus X. )' will be read as X AND Y. The
rules for AND operation are :
0.0 = 0
0J
0.] = 0
Shaded Portion
l .0=0 showsX · Y
1.1 =1
and the truth table for A?\lD is as follows : X.Y
T able 3.4 Truth Tobie for AND Operator figure 3.3 Venn diagram for (X . Y).
~ Y- ---:-1_X_._Y_(!_L~-.-X-A_N_D_X_)._--.
I ~- 0 0
I ~ ~ ~ ~
~
~ ,\~x,.. that "';~' w/1,•n botll X a,uJ Y cm:
U-- l l
I s, then ,\1 ltets tl1t re.wit J.
Venn diagram for X • Y i!'i given in f.ig. 3.3; where shaded area depicts (X . Y).
BYERNIKQ
Chop•cr 3 • BOOLEAN LOGIC 53 ~
0 1 0
0 1 l ~
~ , S i11ct• .\ . \, 2 are,,,,•.., o, hlndb{t') ,n
' wml (I wn1tl1 ,,,bl,• 1111-r1/i'i11r ; l llf)tlt m ri•
1 0 0 i1fil~ ll'lrl /,aw 2' i f' , 8 mll') Ill Iulo(, n1,•
1 0 1 left 171Q51 t'l.11w rm ll'ilt /1111\' /,al/ of tc,tal tm•
trlN (i.~ • -I CJllrwt / iu ;('f\.U 011d Im// IU
l 1 0 J's (i11 M ui SJ.
Tl1c.' t ro.1 c:ohmrn u-ill hen~ no of ; C'N)'t 1111d
1 1 1 I •, ltuli rJ rlion fi~t c-0l11m11 c-om('!t'ti11s: 8
,o 11 u1.1J w 0 11. TI1111 iz wiry. [,r1.1 cofur,m
So a column is added to list Y . Z (Table 3.6) /1,u .J O's 011d -I I \ m·.u col11mn /w, t11v
Ii
,~
·- -
II )( y z Y. Z
0 0 0 0
0 0 1 0
0 1 0 0 ~
llmt AND opac11io11 is
0 1 l 1 or plh-d 011/y on
rolumm \' and Z
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
BY ER NIKHIL SIR
COMPUTER SCIENCE WITH PYTHON _ )J
54
. th
One more column is now added to hst lues of yz (Table 3.7)
e va
l able 3.7 Truth Tobie f or Y • Zand YZ.
X y z Y.Z
-yz
0 )
0 0 0
1 0 )
0 0
0 1 0 0 1
0 1 1 1 0 ~ .
\ c IC t//llt ) Z C'Ollt:JIIIS
1 0 0 0 1 u.m.clt•11t'llh.·d m/ues of
1 )/
1 0 1 0
1 1 0 0 1
1 1 1 1 0
Now values of X are ORed (log,cn· l dd't ' ) t the value s of YZ and the resul tant value s are
n t 1011 o
contained in the last column (Table 3.8).
T able 3.8 Truth Table for X + Yl.
X y z v.z vz X+YZ
0 0 0 0 1 1
0 0 1 0 ] l ,\C'\1' ob~..--: ,·r/ir t?.fl"'"i ,,
X - ) Z ... (l, n\\D1 11£ 1· ,m J 2.
0 1 0 0 1 1 r1,r r~!alt !:Jl t,.,, ,. co1•1r le111t111ed
0 1 1 1 0 0 J J 1l1t ,1 OR,.-1 u irt, .\'
EXA~ PLE 3.1 Usi11g Boolcnn logic, verify using tn,t1r tnblc tlurl
X + XY = X for cad, X, Yiu 10, 1] .
•
Sol11tio11. As the expression X + XY = X is a two-variab
le
1. ?fame the pe.rson who develo ped expression, so we require possi ble comb ination of value s of
boolean logic. X, Y. Truth Table will be as follow s:
2. What is the other name of boolean
logic ? In which year was the boolean ,c y XY X+XY
logic/algebra developed ? 0 0 0
3. What is a buwy decision ? What do you 0
0 l
mean by a binary valued variable ? 0 0
1 0
4. What do you mean by tautology and 0
1 1
fallacy ? 1
5. What is a logic gate ? Name the three
Comparing the columns X + XY and X find
basic logic gates. b th th
o ' we
e columns are identical; hence verified. '
BY ER NIKH IU SIR
Craptrr 3 · BOOLEAN LOGIC
55
(X,\ • rt Usiug Bc>olem, logic, Vt'rify 11si11g tnitlr lablt' tl,nt ( X t Y)' = X' Y' far t'tldl X, )' ill lO,
,.
n.
Soluti on. As it is a 2-varia ble c>..prcs sion, lrulh lnble will be as follow s
:
-
X
0
y
0
X+V {X + Y)' - X' =.J__ I
Y' _ fr:_
0 1 l I
0 1 1 0 1 0 0
1 0 1 0 0 1 0
1 l l 0 0 (l 0
Comp aring U,e colum ns (X + Y)' and X' Y', bolh the column s arc idenlic
al, hence verified.
EX4\MPL£ 3. • Prtpnrt" n tnblt.' of ro111hi11ntio11s for tf1e/illlowi11g hoolcmi lug,c l'XJ1rl.'5sio11s:
(n) X Y +XY (b) XYZ +X fz (c) XYZ +XY
Soluti on. (n) As X Y + XY is a 2-variable expres sion, ils truth lable is as
X
0
y -r
x r-
v xv ~
follow s:
XY
- XY+X
- Y
0 1 1 1 0 1
0 1 1 0 0 1 \
1 0 0 1 0 0 0
1 1 0 0 0 \ 0 0
(b) Truth table for this 3 variabl e expres sion is as follows :
I
1 1 1 0 0 1 1
0 1 0 1 0 1 I 0 0 0
0
1
1
0
1
0
1
0
0
1
0
1
I 0
0
0
0
0
0
1 0 1 0 1 0 0 0 0
1 1 0 0 0 \ l 1 0 1
1
~- 1
--- --1 -I -o o --
----- 0 o l _o__ 0
~L ~
1 l 0 0
4. How many input combinations can be
the.re in the truth table of a logic system 1 0 0 0
having (N) lnput binaty variables ? --·-
~ 56 - • - · ' ,,11 '1 " ' - ...,. . ,
COMPUTER SCIENCE WITH PYTHON _ XI
EXAM PLC 3.4 Prepare lmlli table for tl1c following boolean expressions :
y z z XY I
"
0 0 0
V
1 1
CV +ZJ X(Y +Z)
1 0 0
X(Y +Z) + XY
0
0 0 1 1 0 1 0 0 0
0 1 0 0 1 1 0 0 0
0 1 1 0 0 0 0 0 0
1 0 0 1 l 1 1 1 l
1 0 1 1 0 1 1 1 1
1 1 0 0 1 1 l 0 1
1 1 1 0 0 0 0 0 0
A 8 C i c (i +C) (B + C) + c AC(i + C) + C]
0 0 0 1 1 1 1 0
0 0 1 1 0 1 1 0
0 1 0 0 1 0 1 0
0 1 1 0 0 1 1 0
1 0 0 1 1 1 1 1
1 0 1 1 0 1 1 1
1 1 0 0 1 0 1 1
1 1 1 0 0 1 1 1
- S SCRIB D ( Search o) Read free for 30 days 0
I"""\
BY ER NIK IL SIR
T able 3.9 Truth Tobie for NOT gate T able 3.10 Alternative Truth Tobie for NOT Gate
X x X x
Low High 0 1
High Low 1 0
3.4.2 OR Gate
The OR Gate has hvo or more input signals but only one output signal. U any of the input
signals is 1 (high), the output signal is 1 (high).
If all inputs are Othen output is also 0. If one or more inputs
are 1, the output is 1.
The OR Gate has two or more
An OR gate can have as many inputs (2 or more inputs) as input signals but only one
desired. No matter how many inputs are there, the action of output signal. If any of the input
OR gate is the same : one or more 1 (high) inputs produce signals Is 1 (high), the output
signal Is 1 {high).
output as 1.
BY ER "!IKHIL SIR
COMPUTER SCIENCE WITH PYTHON _ t
58
y X y z F
' .X
0 0 0
F
0 0 0
l
0
I
1 1 0 0
0
,i 0 1 0 1
1 0
0 1 1 1
I l 1
) 0 0 1
I \ l - l
J 0 1 1
1 l 0 1
The symbol for OR gate is given below : 1 1
1 l
D
A
B F
C
D
(c)
(a)
fr~u c .,,5 (a) Two input OR gate (b) Three input OR gate (c) Four input OR gate.
T able 3.13 Two Input AND Gate r able 3.14 Three Input AND Gate
X y F X y z F
0 0 0 0 0 0 0
0 1 0 0 0 1 0
] 0 0 0 1 0 0
1 1 1 0 1 1 0
II,,,. J .\ l
l 0 0 0
1 0 l 0 II,,•.
1 1 0 0 f ., . r z
1 1 1 1
The symbol for AND is
;=O-• (a)
i~· (c)
figure 3.6 (o) 2•input AND gate (b) 3•input ANO gate (c) 4•input AND gate
BY ER NIKHlfslR
Chapter 3 : BOOLEAN LOGIC 59 ....J
3.5 BASIC POSTULATES OF BOOLEAN LOGIC
Boolean logic algebra, being a system of mathematics, consists offimdame11tal laws that are used
to build a workable, cohesive framework upon which are based the theorems of boolean
algebra. These fundamental laws are known as Basic J!OSl11/ates of boolemt logic nlgebra. TI,ese
postulates s tate basic relations in boolean algebra, that follow :
~ ~~
I ~
0 X R
0 0 0
,
I - - - - - I
0 1 1
as X can have values either O or 1 Both the values of X(O and 1) when ANDed with
(postulate I) both the values ORed with 0 produce the output as 0. Hence proved.
produce the same output as tl1at of X.
Therefore, 0. X = 0 is a fnllaetJ .
Hence proved.
(b)l + X = 1 (d)l. X = X
Truth table for this expression is given Now both the possible values of X (0 and 1) are
below in Table 3.16, where R signifies the to be ANDed with 1. Thus the truth table for it
output. will be as follows :
T able 3.16 Truth Tobie for 1 + X = 1 T able 3.18 Truth Tobie for 1.X =X
~ ~~I
~
1 X
1 0 . - - - - - 1 I
1 l
Again X can have values O or 1. Both the Now observe both the values (0 and 1) when
values (0 and 1) ORed with 1 produce the ANDed with 1 produce the same output as tltal of
output as 1. Hence proved. X. Hence proved. Here properties b and c are
Therefore 1 + X = 1 is a tautology. duals of each other and properties a and d are
duals of each other.
BY ER NIKH1Lf~R
T able 3.19 Truth Table for X + X =X T able 3.20 Truth Table for X .X = X
X X - R X X R
0 0 0 0 0 0
1 l 1 1 1
I 1
I
0.0=0 (ref. postulate Ill)
0 ... 0 = 0 (ref 110s111/ate fl)
and 1.1 = 1 (ref. postulate JIT)
and 1 + 1=1 (ref postulate II)
⇒ X . X = X, as it holds true for both values of
⇒ X + X = X, as it holds true for both X. Hence proved.
values of X. Hence proved.
3. 7 .3 Involution I
This law states that : ( X) = X
To prove this, again we'll prepare truth table which is given below.
(
T able 3.21 Truth Tobie for X= X
In Boolean Algebra, if an
I~ I~I~ I
expression holds true then
its dual is also true and
vice-versa.
First column represents possible values of X, second column represents complement of X (i.e.,
X) and the third column represents complement of X (i.e.,
X) which is same as that of X. Hence
proved.
Th.is law is also called double-i11version rule.
(b) X. X• O
BY ER NIKHIL SIR
COMPUTER SCIENCE WITH PYTHON - XI
62
Proof. {a) X + X = 1 (b) X . X= 0
Truth table for this expression is as follows:
We will prove X + X =1 ""ith the help of
truth table whid1 is given beJo,.,,, :
T able 3.22 Truth Table for X + X = 1 T able 3.23 Truth Tobie for X .X = 0
~ ~
X x X+K
0
1
1
0
1
1
I I x~x I
Here, in the first column possible values of X j as O.1 = 0 (ref 11ost11lnte Ill)
have been taken, second column consists of and 1. o=O (ref. posh,fate 111)
X values (com11lcmt•rzt t1n/,,cs of X), X and X
values are ORed and the output is shown in I •
=> X. X ; 0, as it holds true for both lhe
third column as values of X. Hence proved . Observe here
0 J.] = 1 , (ref. postulate I[) X. X = 0 is dual of X + X =1.
1+ 0 = l (ref. ,,m:tulntc If) Changing ( + ) to ( . ) and 1 to 0, and we get
⇒ X + X = 1, as it holds true for both possible x.x = 0.
values of X.
It is a fnllncy.
Hence proved. It is a fn1tli..,l11:_.."}f.
I X
0
y
0
X+Y
0
Y+X
0
X
0
y
0
X.Y
0
Y.X
0
0 1 l I 0 ) 0 0
1 0 1 1 1 0
• 0 0
l 1 l 1 1 1 1 1
Compare the columns X + Y and Y +X, both Both of the columns X . Y and Y . X are
I of these are identical. Hence proved. identical, hence proved.
3 .I- -,
This law stntcs that : (n) ' ) .., \) · """7 (b) , ) '7 .. (X + Y )(X ~ z,
Pr...l'.lf. (n) Truth fable for X(Y + Z) = XY + XZ is given below
:
T able 3.27 Truth Tobie for X (Y + Z) = XY + XZ
Recall that if a boolean expression is true then its dual is also true.
BY ER NIKHIL SIR
N _~
COMPUTER SCIENCE WITH PYTHO
64
X+ XY
L.H.S. = X(X + Y) = X . X + XY
y XY
X =X .X + XY
0 0 0
0 = X+ XY
0 0
0 1 (X . X = X : lndempolenct Law)
0 1
1 0
1 1 = X(l + Y)
1 1
=X .1
ntical. Hence (using 1 + Y = 1, ,,ropcrties of 0, 1)
Column X an d X + XY are ide
it can be pro ved algebraicall
y as of 0, 1)
pro ved . Also = X (X .1 = X, using properly j
L.H.S. = X + XY = R.H.S
= X( l + )')
Hence pro ved .
Putting 1 + Y =1
(ref JIY<lperlies of 0, 1 ~,eorcm J)
of 0, 1)
I 3
X .1 = X = R.H .S. (ref. properties
Hence pro ved.
Logic Algebra
3.7 .9 Some Ot he r Rules of Boolean
en bel ow :
ere are som e mo re rul es of Boolean algebra wh ich are giv
Th tributive /mv)
X) = X + Y (So me tim es also ref err ed to as the third dis
X - now,
by truth tab les . As yo u are qu ite fam ilia r wi th tru th tables
Titls rul e can easily be pro ved oth er pro ofs of the se rul es are be
ing given
yo u as an exe rci se, the
tru th table pro of is lef t for
he re:
X+Xl✓ =X+ Y
Proof.
L.H.S =X +X Y
(Pu ttin g X = X . J, preperty of
O and 1)
=X .l + XY
(Putting 1 as 1+ Y, ·: 1 + Y =1,
property of Oa11d 1)
= X(] + Y) + XY
=X +X Y+ XY
I = X + Y(X + X)
(X + X =1. complementnrity law
)
=X +Y .1
= X+ Y (Y.1 = Y, property of O and 1)
= RH .S.
Hence pro ved .
BY ER Nl fIL S'R
Chapter 3 : BOOLEAN LOGIC
65 ~
All th~ theorems of Boolean algebra, which we have covered so far, are summarised in the
followmg table :
AB+A +AB=AB.A.AB
---
[Changed + to. and complemented individual expressions]
=AB . A . AB [': AB =AB and A ==A)
=AB.AB.A
= 0.A [AB.AB =OJ
=0 [·: O.A ::O]
BYERN IKHI~
3 9. 1 NOR Gate 1
The Nor Ga-te- h-as_tw
_ o_ o_r.._
rn_or,~
The Nor Gate has two or more input signals but only one
Input signals but only on,
output signal. If all the inputs are 0 (i.e., low), then the output
output sfgnal. If all the Inputs are I
signal is 1 (high). O (/.~., low), then the output I
If either of the two inputs isl (high), the output will be O (low). signal Is 1 (high). I
NOR gate i~ not1,ing but imierted OR gate.
The NOR gate can have as many inputs (2 or more inputs) as desired. No matter how many
inputs are there, the action of NOR gate is the same i.e., All O(/ow) inputs produce output as 1.
Following troth Tables (3.29 and 3.30) ilJustrate NOR action.
T able 3.29 Z~lnput NOR gate T able 3.30 3-lnput NOR gate
X V F X y z F
0 0 l 0 0 0 1
0 1 0 0 0 1 0
1 0 0 0 1 0 0
1 J 0 0 1 1 0
F X ~Y 1 0 0 0
] 0 1 0 F X- Y ~ Z
F 1 1 0 0
1 1 1 0
(s)
(b)
:=1> (c)
F
f~ (d)
figure 3.7 (a) Logical _meaning of NOR gate (b) 2 input NOT gate
(c} 3 mput NOR gate (d) 4 input NOR gate
NANO action is illustra ted in following Truth Tables (3.31 and 3.32).
T able 3.31 2-input NANO gate T able 3.32 3-input NANO gate
X y F X y z F
0 0 1 0 0 0 1
0 1 1 0 0 1 1
1
1
0
1
1
0
~~ 0
0
1
1
0
1
1
1
~ F XY
1 0 0 1
1 0 ] 1
The logical meani ng of NANO gate can
be shown as follow s : 1 1 0 1 F XYl
1 1 1 0
X F
r
The symbo ls of 2, 3, 4 input NANO gates are given below :
Figure 3.8 (o) 2-input NANO gate (b) 3-input NANO gate (c) 4-input NANO gate.
T able 3.33 2-input XOR gate T able 3.34 3-input XOR gate
No. of t's
X y F No. of 1's X y z F
n en/odd
0 0 Even 0 0 0 0
Even 0
1 1 Odd 0 0 1 1
Odd 0
0 1 Odd 0 1 0 1
Odd 1
1 0 Even 0 1 1 0
Even 1
Odd 1 0 0 1
Even 1 0 1 0
Even 1 l 0 0
Odd 1 1 1 1
L
BY ER NIKH IL SI
COMPUTER SCIENCT WITH PYTHON , ~
70
=D
w
- = { )- ~
v- ~
(a) z-input XOR gate (b) 3-input XOR gate (c) 4~input XOR
gate.
f ~;ire ;/'
T able 3.35 2-inp ut XNOR gote T able 3.36 3-inp ut XNOR gote
y F Ho. of 1's X y z F
No. c,f 1's X
1 Even 0 0 0 I
Even 0 0
0 Odd 0 0 l 0
Odd 0 I
0 0 Odd 0 l 0 0
Odd 1
1 l Even 0 l 1 1
Even l
Odd 1 0 0 0
Even 1 0 1 1
Even 1 1 0 1
The XNOR Gate Is logically
Odd J 1 1 0
equivalent to an inverted XOR
i.~., XOR gate followed by a NOT
gate (inventor).
= D - =I>- ~
~ ~
~
4-input XNOR gate.
figure 3.10 (o) 2-input XH0R gate (b) 3-input XN0R gate (c)
F (a, b, c) = A . B + A . C + B. A .C
or F (n, b, c) = (A AND B} OR (A ANO (NOT q }OR ( (NOT B) AND (NOT B) AND q
A
Now these logical operators AND AB
B
can easily be imple mented in
form of logic gales. Thus circuit A
AND
AC F
diagram for above expression C
will be as follows : AB+A"C ♦ BAC
B BAC
AND
A
C
EXAM rLE 3.9 Draw the diagram of digital circuit for tire ftmctio,z :
F(X, Y, Z) = (X + Y). (X + Z) .(Y + Z).
Solution. Above expression can also be written as :
F (X, Y, Z) = (X OR Y) AND ((NOT X) OR .( NOT Z) ) AND {Y OR Z)
x - -"""' X+Y
Y - --1
Thus circuit diagram will be
X x+z AND
F
Y+Z
z - --1
LET Us REVIS E
1. Why are NAND and NOR ga~es called :=i
Universal gates ?
2. Which gates are called Universal gates
~ The decision which results into either YES (TRUE) or NO (FALSE)
and why?
is called a binary decision.
3. State the purpose of reducing the swi-
tching functions to the minimal form. 1, The statements which can be determined to be True or False are
called loyical statements or truth functions.
4. Draw a logic circuit diagram using
HAND or NOR only to implement the •lz Trurh values are TRUE and FALSE or 1 and 0.
Boolean function F (a, b)- a' b' , ab. Truth cable is a table which represents all rhe possible values of
<'(.i
S. What is inverted AND gate called ? logical variables/ sraiements along with all che possible results of
What is inverted OR gate called ? the given combinations of values.
6. When does an XOR gate produce a high 'ti If result of any logical statement or expression is always TRUE or
output ? When does an XUOR gate 1, it is called tautology and if the resulc is always FALSE or 0 ii is
produce a high output ? called fallacy.
bl t:K Nlt\HIL ~ IK
Chopler 3 : BOOLEAN LOGIC
73 /
s=ol\ltc:f Ptobl,Ms
Solution. Statement (1) and (Iv) nre logical statements since these statements result into either true of
false values.
X y X+Y X. (X + Y)
0 0 0 0
0 1 1 0
1 0 1 1
1 1 1 l
From the above table it is obvious that X. (X + Y) = X because both these columns are identical.
3. Give dunls for t1te following :
(1) X + X Y (ir) XY + XY + XY (ii,) (A + 0) .(A.1. A)
(iv) AB+AB (v)ABC+ABC+ABC
Solulmn. Using duality p rinciple, changing (+) to(.) and vice-versa and by replacing O's with l 's and
l's v.rith O's, the duals for the given expressions are as follows:
(1) X . (X + Y) (i1) (X + Y).(X + Y) . (X + Y)
(iii) (A . l) + (A+O+A) (iv)(A+B).(A + B)
{v) (A+B+C).(A+B+C).(A+B+C)
4. Draw logic circuit diagram for thefollowi11g expression : Y = 11l1 + br + cn.
Solu tion.
Be-------t sb
y
be
ca
5. State the distributive Jaws of boo/en11 algebra. How do tlzey differ from tire distributive laws of ordi11nry
algebra ? (Delhi 1991)
X
F
i y
z
w
"''IL.I ·on.
(a) Distributive Law
0 1 I 1 1 1 1 ]
1 0 0 1 1 0 1 ]
1 0 1 I 1 0 1 1
1 1 0 1 I 0 1 l
1 1 ] l 1 l 1 1
,
J
X
0
X x
1 0
1 0 1
r-- y