0% found this document useful (0 votes)
15 views

Unit-3

This document discusses Boolean algebra and its application in designing logic circuits. It introduces key concepts such as Boolean expressions, logic gates, and the mathematical representation of circuits. The unit aims to provide a foundational understanding of symbolic logic techniques necessary for circuit design and simplification using Boolean algebra.

Uploaded by

prashasti2801
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)
15 views

Unit-3

This document discusses Boolean algebra and its application in designing logic circuits. It introduces key concepts such as Boolean expressions, logic gates, and the mathematical representation of circuits. The unit aims to provide a foundational understanding of symbolic logic techniques necessary for circuit design and simplification using Boolean algebra.

Uploaded by

prashasti2801
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/ 27

UNIT 3 BOOLEAN ALGEBRA

AND CIRCUITS
Page No.

3.1 Introduction
Objectives

3.2 Boolean Algebras

3.3 Boolean Exprcssiolls

3.4 Logic Circuits

3.1 INTRODUCTION

I11 the previous two units you hive read about the e1ernenl;ary aspects of
sylnbolic logic. ~ . ~ . ~ h a ~ & o i l ,founder
, t h e bf informat;ion theory, observed a11
analogy bettween tlie functioning of switcllirig circuits and certai~lopc?ral;ions
of logical connectives. In 1938 he gave a technique based 011 this analogy to
express a n d m a n i p u l a t e siinple switching circuil;~algebraically. Later, the
discovery of so~nfr!new solid state devices (called electronic switches or
logic gates) helped t,o modify these algebraic tecliliiques an,d, [;hereby, paved
a way t o solvc numerous problems related t;o digital systems algebraically. Fig. 1: Claude
Shannon, who m a d e
In this unit, wr shall discuss flle symbolic logic tecliniques wliich arc mquired the first major
. for the algebraic uilderstanding of circuits ?nd computer logic. 111 Scc.3.2, we contribution in
shall int,roduc:c you t o B o o l e a n a l g e b r a s with the llclp of ccrtaiil examples npl>lied Boolean
based 011 objecl;s you are already familiar with. You will scc that such algebra in 1938.
algebras are apt Tor describing oporal;ions of logical circuits used in
. computers.

In Sec.3.3, we liave discus'sed '8ooleak expressions. In Scc.3.4, we look a t


I
the linkages tillat they have with logic circuits.
I
:' In Sec.3.5, you will read about how t o express thc overall functioning of a
circuit mathematically in terms of certain suitably defiried functions called ,

I Boolean functions. In this section we shall also consider a simple circuit


1
I
design p r q b l e m to illustrate the applications of the relationship betwccn
I
Boolean function and circuits.
Let us now corisider the objectives of this unit.
0b ject ives
After reading this unit you should be able to
a' define and give examples of Boolean algebras, expressions and functions;
i

: obtain the disjunctive normal f o ~ m(DNF) arid the conjunctive normal form
(CNF) of a Boolean cxpression;
47
Elementary Logic a give mathematical interpretations of the functioniilg of logic gates;

a obtain alld simplify thc Boolean expression representing a circuit;

0 construct' a circuit for a Boolean expressionj

design and simplify some simple circuits using Boolean algebri techniques.'
.. . ,

3.2 BOOLEAN AIIGEBRAS

How do you react to the questions: Is it possible to design an


. . electric/electronic circuit without actually using swit,cl~es(or logic and
wires'? Can acircuit be rddesigned, without defeating its purpose, to get a
simpler circuit wit,h the help of pen and papcr only?
Relax! The answer to both these questions is 'Yes'. Wllat allows us to give
this reply is the concept of Boolean algebras. Beibre we start a forrnal
discussion on these type of algebras, lct us take another look at the objects
treated in Unit 1.
As before, let the lettcrs p, q, r,. . . rlciiot,e slatcincnts (or propositions). We
write S for the set of all propositions. As yon nlay rccall, a tautology 7 (or a
contradictioil F ) is any proposition which is always true (or always ialse,
respectively)( 'by alluse of notsation, we shall let 7 d e n o t e the s e t of all
tautologies a n d 3 d e n o t e t h e s e t of all contradictions. Thus,

You already know fro111 Unit 1 that, given two prop.ositions p and q, both
I A binary operation on p A q a1ld.p V q are again propositions. And so, by the definitiori of a binary
a non-empty set X is a operation, you can see that both A (conj~znctioii)arld V (disjunction) are
function f : X x X -+ X. binary operations on the set S, wherc we arc writing A(p, q) as p A cl and
V(P, q) as P V Cl, 'd p , q E S.
Again. since -- p is also a proposition, the o6ration .- (negaiion) defines a - 1
unary f~mctionN : S 3 S. Thus, thc set ok propositions S, wit11 tliese 1
operations, acquires an algebraic structure. 1
As is clear from Sec.l.3 of Unit 1, under these three operations, the elements f
of S satisijr associative laws, coinmutative laws, distributive laws and 1
complementat ion h w s .
Also, by El9 of Unit 1, you lcnow that p V F = p arid p A 7 = p, for any
1
propositio~lp. These are called the identitb laws.
The set S wkh the three operations and propert,ies listed above is a
particular case of an algebraic structure which we shall now dcfiiie.
1
~ e f i n i t i o n : Bpolean
of a sct X (9
,~ algebra B is an algebrjic structure whicl~consists
)) havi$g two binary operations (dcnoted by V and A ) , onc
11
unary operation (denoted by ') and two specially defined elements 0 and I
(say), which satisfy the followiiig five laws for all x, y, 2; E X. 1
I
B1. Associative Laws: x V (y V,z) = (x V y) V z,
X A (ykA Z) = (x Ay) A z
i
I B2. Commutative Laws: xVy=yVx,
1 xAy=yAx
B3. Distributive Laws: xV (y Az) = ( x V j
48 X A (yVz)= (xAy) V(xAz)
I

i B4. I d e n t i t y Laws: XVO=~, Boolean Algebra and .


I xAI=x Circuits
I
I B5. C o m p l e m e n t a t i o n Laws: x A = 0,
I x v x1= I.
We write this algebraic structure as B = (X, V, A, ', 0,I), or simply B, if the
context makes the meaning of tlie other terms clear. The two operations v
and A are called the join o p e r a t i o n and meet operation, respectively. .
The unary operatio11 ' is called the complementation.
, ,
From our discussion preceding tlwdefinition above, you would agree that the
set S of propositions is a Booleaii algebra, where 7 and F will do the job of
I and 0, respectively. Thus, (S, A, V , N l F , is an example of a' Boolean
algebra.
We give another example of a Boolean algebra below.
Example 1: Let X be a non-empty set, and P ( X ) deiote its power set, i.e.,
p ( X ) is the sct consisting of all tlie subsets of the set X. Show that P(X) is a
Boolean algebra.
Solution: We tala! t,hc usual set-theoretic operalions of intefsection (n),
union (u), i ~ ~ co1ri~>l~i11~1ll;ati01i
id ( C ) in P ( X ) as the tliree required

operations. Lct (/I and X play the roles of 0 and I, rcspectivcly. Thcn, from
MTE-04 you can verify 1,lia.t all the coriditions for (F(X),U , n, ', (I,, X) to be
a Boolean algebra liolrl good.
For instance, the, iclcnt8il,ylaws (B4)~followfrom two set,-theoretic facts,
hamely, 'tlie inl,crsccl,ionof ariy subset with t,he whole set is the set itself1
arid 't,he union of any set with l,hc cmpty set is the set itself'. On the otlier
hand, the coirlplcrneiitatioil laws (135) follow from another set of fact,s from
set theory, narncly, '1-lle int,crsection of ally subsct with it,s complenlent is t,hc
empty set' ant1 Lt,llt!unhy! of any set with its cornplemeilt is the whole set'.
+.* *
\
'
Yct ariobher cxample of a Boolean algebra is based on switkhing circuits.
For this, wc first need lo elaborate on tlic: furictioiling of ordinary switches in
a rnathcmatical way. In fact, wc will present the basic ides wl.iicli helped tlic
American, C.E.Sh;lnnon, to detect tlic coilllcction bet,wcerl the fl1nctionihg\ of
switcl~esant1 Boolc's syin1)olic logic.
You may bc aware of the ft~nclioningof a simple on-off switch which is
cornmonly user1 as nn esseiit,ial component, in thc elec1,ric (or electronic)
letw working systems. A swit,ch is a, clcvicc which allows thc current to flow
only whcn it is placcd in tlic O N position, i.e., when the gap is closed by a
conducting rod. Tlms, tllc O N position'ol' a switch is one state of a switch, Fig.2: OFF-ON posi-
called a closed s t a t e . Thct other state of a switch is the o p e n s t a t e , when tion
it is placed in the O F F position. So, a switch has two stable states.
There is another way to talk about the functioning of a switch. We can
denote a switch by x, and use the values 0 and 1 to depict its two st?tes, i.e.,
to convey that x is o p e n we write x = 0; and to convey that x is closed we
write x = 1 (see Fig.2).
These values which clcnote the state of a switch x we called the
state-values (s.v., in short) of that switch.
I

1 We shall also write x' for a switch which is always in a state opposite to x.
So that
x is o p e n =+ x' is closed and x is closed + x' is open.
Elernrmtary Logic The switch x' is called the invert of the switch' X. For example, the switch
shown in Fig.3 is an invert of the switch a. *

Fig. 3: a' is t h e invert of a,


Table 1: S.V. of x'. Table 1 alongside gives the state value of x' for a given state value of the
m switch x. These values are derived from the definition of x' and our
preceding discussion.
Note that the variable x that denotes a switch can only take on 2 values, 0
and 1. Such a variable (which can only take on two values) is called a
Boolean variable. Thus, if x is a Boolean variable, so is x'.
Now, in order to design a circuit consisting of several switches, there are two
wavs in which two switches can be connected: p a r a l l e l connections and
series connections (see ~ h . 4 ) .

(j) Parallel connection (ii)Series connection

Fig. 4: T w o ways of confiecting switches.


From Fig.4(i) above, you can see that in case of a parallel connection of
switches a and b (say), current will flow from the left to the right extreme if
a t least one of the two switches is closed. Note tliat 'parallel' does'not
mean that both'the switches are in the same state.
.On the other hand, current can flhw in a series conneciion of switc116s only
when b o t h the switches a and b are closed (see Fig.$(ii) ).
Given two switches a and b, we write a a p a rb and a ser b for these lwo
types of connectidns, respectively,'
In view of these definitions and the preceding discussion, you can see that
the state values of the connections a par b and a ser b, for different pairs of ,
state values of swithes a and b, are & given in the tables below.
Table 2: State values of a par b and a ser b.

,1 .
We have now developed a sufficient background to give you the example of a
Boolean algebra which is based on;switching circuits.
2: The set S = 10, l} s a Boolean algebra.
Example
i3
1
Solution: Take sex and p a r in place of A arid V, respectively, and
inversion(') instead of w as the three required operations in the definition of
a Boolean algebra,. Also take 0 for the element 0 a n d 1for the element I in
Lap-----

--
illis definition. Boolean Algebra and
NOW, using Tables 1 and 2, you can check that the five laws B1-B5 hold Circuits
good. Tlrus, (S, p a r , ser, I , 0 , l),is a. Boolean algebra.
** *
A Boolean algebra wliose underlying set has only two elcnlents is very
important in tlie study of circuits. We call such an algebra a two-element
Boolean algebra. Tliroughouk the unit, we denote this algebra by 13. From
I
this Boolean algebra wc can build many more, as in the followirlg example.
/ Example 3: Let B" = B X B X . . x B = {(el,e2,.. . ,en) I cach ei = 0 or I),
for n 2 1, bc the Cartesian product of n copies of B. For ik,jl,E {O,1)
(1 _< 1c 5 n ) , define
I
( I ,. ., , z l. i = 61Ajl,i2 A j z , . . ,ill Aj,,),
1 ( I , , ( j , ,, = (il V j 1 . i ~V j2,. . . ,ill v.jll), and
I ( 1 , i . . , i n = (i;, ih, . . . , ii,) . .
Then B" is a Boolei~nalgebra, for all 11 1. >
Solution: Fil'siJ~observe that lhe c u e n = 1 is Ilie Boolean algebra a. I
I

I
Now, let us wsilc 0 = (O,O,. . . ,0) and I = (1,'1,.. . , I), for the two clcments
of Bn corisisti~lgof 11-tuples of 0's arid l's, respectively. Using the fact that B
is a, Boolean i~lgcbra,yo11 ~ ~ $~'Iieck
1 1 1,Iiat a",with operations as clcfined
I above, is a Boolcaii a,lgcbr,zfor every n >_ 1.
I
***
The Boolean a1gcl)rr~sB", 11 2 1, (called switching algebras) are very
I
useful Soor Ilie study of the hardware and software of digital computers.
We shall rlow si,j~l,e,
wit,hout, proof, sornc otlicr propertics of ~ o o ~ c a n
I algebras, which can hc dcdllc:ed from tlie fivc laws (Bl-135).
1
Theorem 1: Lot B = (S, V, A , ', 0, I) bc a Boolean algebra. ' ~ l l e nthc
following laws hnld V x, y E S.
a) Idernpotenl; laws : x V x = x, x Ax = x.
b) Absorption laws : x V (x A Y) = x, x A (x V y) = x.
I
c) Involution law : .. (x')' = x.
d) De Morgan's laws : (x V y)' = x' A Y', (x A Y)' = x' V Y'.
,
In fact, you ILRVCalready colnc across some of tliese propgrties for the
Boolean algebra S of proposit,iorls in Unit 1. In the following exercise we ask
you to verify thern.

El) a) Verify the identity laws and absorption laws for;the Boolean
algebra (5,A, V, N, 7 , F )of propositions.
.i
b) Verify the absorption laws for the Boolean algebra
(Nx), u, n, c , $1 X)..
In Theorem 1, you may have noticed that for each statement involving V and
A, there is an analogous statement with A (instead of V ) and V (instead of
A ). This is not a coiilcidence, as the followi~lgdefinition and result shows.
Definition : If p is a proposition involving -J, A and V, the dual of p,
denoted by pd, is t,he proposition obtained by replacing each occurrence of A
(and/or V) in p by V (and/or A, respecti$ely) in pd.
For example, x v (x A y) = x is the dual of x A (x V y) = x.
51
tells us that if a stal:elTlent is proved true, then
f+;l~:lt,r!nt,a~-~
Logic Novr, t,llr$f'ollowiag
wc. llavc sim~lltancouslypaved that its dual is trlle-
Theorel* 2 (TIIe principle o f duality):
d
If S' is a theorem i~bollt,a
Uoole;~nalgebra, then so is its dual s .
It is i,ecause of this principle t h a t the statemellts in Tlreorem 1 look so
sirnilar.
Let, 11s now see llow to apply Boolean algebra mett210dsto circuit, design. For
t,l~isporposc we introduce the necessary mathclnntieal t*crluillology
ideas in the follo\ving section.

3.3 BOOLEAN E XPRESSIONS


111Ullit 2, you learnt how a compound statement call be formed by
cond~iningsome propositions p l , pz, . . . , P,, (say) wilh the help of logicill
coilnectivcs A , V and w .
Analogously, while expressing circuits mathematically, wc idcnlify c?ach
circuit in t,erlns of some Boolean variables. Each of tllcse variables reprcscllts
cit,lier a simple switch or an input to some electronic switc:h.
Definition : Let B = (X, V, A ,' , 0, I) hc a ~ o o l e n ~ . a l ~ eA~ Boolean
~ra.
expression in variables xl.,xz,. . . , xk (sa y ), each taltirlg t,hci~viidl.ies in tlle
'Itc!cursive' ~ ~ l c x n s set X, is defillecl recursively as follows:
dcrfining c!lr!ltlur~t,s
of a set i) Each oS tile variables X I , xa, . . . , xk, as well as khc? e1cmcni;s 0 ant1 I of
in tt:r.ms of ~)r.c:vio~~sely t,he Boolean algebra B are Boolean expressions.
c:!(!rr~entsof the
(l~~ti~lc!(l
sr.11;.
ii) 1fX1 and Xz are previously definecl Boolean expressions, t,hc!ii
XI A XP,Xl V x2;&d Xi are also Boolean expressions.
For instance, xl A xk is a Boolean expression because so are xl itnd xi.
Similarly, because XI V xz is a Boolean expi-ession, so is (xl V xz) A (xl A xi).
If X is a Boolean expression in n variables XI, xa, . . . , x,, (say), we write this
as X = X(xl,. . . , x,).
Each variable xi and its complement xi, 1 _< i < lc, is called a literal. For
examplc, in the Boolean expression

tliere me three literals, namely, XI, x ~and


, xi.
In the context of designing a circuit or redesigning a circuit wit11 fewer
electroilic switches, we need to consider techniques for minimising Boolean
expressions. In the process, we shall be using the concepts defined below.
Definition : A Boolearl expression in k variables x l , xa,. . . , xl, is cilled
i) a minterm if it is of the form yl A y~ A . . . A yk;
ii) a maxterm if it is of the form yl v yz v . V yk; -
where each yj is a literal (i.e. it is eit,her an)xior a n xl), for 1 5 i 5 k, and
yi#yjf~ri#j.
Thus, a minterm (or a maxterm) in k variables is a meet (or a join,
respectively) of exactly k distinct variables. For examole.
XI A X; (and x i V xz) is a minterm (a maxterm, respectively) in the two
- -L--->

variables xl and x2.


Definition : A Boolean expression involving k variables is in disjunctive
52 normal form ( DNF, in short) if it is a join of distinct minterms, each one
7-

involving exactly k variables. Boolean Algebra and


( ~ ,Boolean expression in 2 variables
For i l ~ s L a n ~the Circuits

X(xi ,x2) = (xi A xb) V (xi Ax;) V (xi A x2)


is in DNF because it is a join of Lliree minterms, namely, xi A xb, xi A xb,
and xi A x2, where each one of these involves exactly t,wo valiablcs.
Observe tihat each rrii~iterrnin a D N F should involve all t,he k variables i11
the expression X(x1, xz, . . . , XI,),k 2 2. For instance, the Boolean expression
, = (xi A w )V (XI A X; A x : ~ )
X ( X ~~ , 2 xa)
is llot ill DNF I~ecxusex', A x2 is nol; a .minterm of all the three vnria.bles.
However, since we can write
(xi A a) = (xi A x2) A I (by Identity law)
= (x', A x2) A (x:] v x i ) (by Comp1e1nent;al;ionlaw)
= (xi A x2 A xs) V (xi A xz A X ; ) , (by Distribut;ive law)
and so, t,llc. c>xprcssion X(x 1 , x2.x:J) with this cliarlgc for x', A xz is i11 t,he
disjllrlctive 11ormal forin.
Indecd, nsi~igsirliilar. I,ccliriirlucs, ally Boolcan oxprcssion (# 0) (-an 1)c
writtcri in tliyjilnc.l,ivc! norrnal forln. Let, us work out ari exanlplc l o illust tale
this Lechniquc.
E x a m p l e 4: 0 1 1ti1,iili L (1is.j1111t:tiv~
l i ~ r i i ~for111
d for 1 ; l expressio~l
~

Solution: Wc (:ail wrikc


x i ~ x= (xi ~ /\%)A1 (Itlrntity 1a.w)
= (x', A xp) A (xj V xi) (Complenicnl,atio law)
I = (x', A x2 A x : ~V) (x: A x2 A x i ) (Distributive law)
Also,
x1 A x3 = (xl A x:~)A I (by Identity 1a.w)
I = ( x l A xn3)A (mV xb) (by Coi~iplcnicnl,ntion law)
= ( X IA x:j A x2) V (xl A x:] A xk) (by Distributive law)
= ( X I A xz A x : ~ V
) (xl A x i A x:)). (11y co~nlruitwtivity of A )
Hence the reql1irc.d disjuncl,ivc nornial Iorrn of llie giver1 cxprcssion
X(xl, x2, x:~)ill t,hroe varia.blcs is givcn by
(xi A ~2 A xs) V ( x i A x2 A x$) V (xl A ~2 A x : ~ V) ( x A~ X; A x3).
* :I: *
Why do~l't,ybli t,Ey nn exercise now?

E2) Obtain the disjl~nctivc1lornla1form of the Boolean expression


X(xl, x2,x3) = ( x Lv x2)I v (xi A x:3).

The conjunctive norm;tl f o r ~ nis another irnportailt type of expression which


is analogous to t h e concept of DNF.
Definition : A Boolcan expression in k variables is said t o be in
conjunctive n o r m a l f o r m (CNF, i11 short) if it is a nieet of maxterrns,
each of whidl involves all t h e k variables.
For instance, the Boolean expression .

is in CNF because it is the rneet of nlsxterms (xi V x2 V x3), (xi V x i V xs) and
(xi V x2 V x i ) . Note that a l l 3 variables a r e involved i n each m a x t e r m .
53
Elementary Logic Let us consider an example of how to'obtain the CNF of a Boolean
expression. .
E x a m p l e 5: Obtain the CNF of the Boolean expression

X(xl,x2,x3) = (xl A ~ 2 ) ' (xi A ~ 3 ) '

Solution; We have
(xl A x2) = xi V xk (De Morgan's Law)
'
= (xi v x;) v 0 (Identity law)
= (x! v x;) v ( x A~x;) (Complementation law)
= (x; V xi V x3) A (xi V x; V xk) (Distributive law)
Siniilarly, you can check that

' (xi V xi V x;) A (xl V x2 V xi).


(x; A ~ 3 ) =
I

s , required CNF of the expression X(xl,x:!, x3) given here is


~ h ~ l the
- (xi v x; v xs) A (xi v x; v xi) A (xl v x; v xi) A (x, v x2 v x$).
***
Try tlie followilig exercise now.

E3) Obtain tll; CNF of the Boolean expressioil


x(x1, x2, xi) = ((XI,Ax;) V (xi A xi))'.

As we have said earlier, in the ,context of simplifying circuits, we need to


reduce Boolean expressi.ons to'simpler ones. 'Simple' meails that the
expression has fewer connectikes, and all thc literals involvcd are distinct.
We illustrate this technique riow:
Example 6: ' Reduce the following Boolean expressiorls to a simpler form.
' (a) X(xl,x2)= (XI K X ~ ) (XI AX',);
(b) X ( ~ I , ~ Z , X ~ ) = ( X ~ A X Z ) V ( X ~ A , X ; A X S ) V ( X I A X S ) .
Solution: (a) Here ye can write -.
(xi A x2) A (xi A x;) = ((xi A x2) A xi) A xb (Associative law)
= (xi A x 2 ) Ax; (Absorption law)
= xi A (xz A x;) (Associati~relaw)
= xlAO (Complement ation law)
= 0. id en tit,^ law)
Tllus, in its simplified form, the expression given in (a) above is 0,i.e., a
n u l l expression.
(b) We can write '
(xi A xz)V (xi A x; A x3) V (xi A xs)
= [XI A {XZ V (4A x3)] A (xi A x3) (Distributive law)
= [xi A {(x2 V xb) A ( ~V2%))I A (XI A xg) (Distributive law)
=.[XI A {I A (x2 V xa))] A (xl A ~ 3 ) (Complementation law)
= [xi A (x2 V XS)]A (XI A ~ 3 ). (Identity law)
= [(xi A x2) V (xi A x3)] A (XI A x3) (Distributive law)
= [(xi A x2) A ( X I A x3)] V [(XIA x3) A (XI A xs)] (Distributive ljw)
= (XI Ax2 n x 3 ) V (XI Ax3) (Idemp.,St wsoc. .laws)
= xl A [(x2 A ~ 3 V) XQ] (Distributive law)
= xi A xg (Absorption law)
Thus, the simplified form of the expression given in (b) is (xl A x3).

54
***
NOW you should find it easy to solve the following exercise. Boolean Algebra and
Circuits
- -

, ~ 4 )Simplify tlie Boolean expression


X ( x i , x z , x j ) = (XI A xz) V ((XI A xz) A x j ) V (x:!Axj).

With this we conclude this section. In the next Section we sliall give an
important, application of tile coilcepts discussed here.
I

1 3.4 LOGIC CIRCUITS

If you loolc around, yon wollld notice many electxic or electroiiic appliaiices
of daily usc. Sorne of 1;heni need a sirnple switching circuit to control the
auto-stop (sndl as ill ;.I: stereo systeni). Sorr~ewould usc i111 nuto-power oil'
systeni used in trt~usI'ormc?rsto coiltrol vol1;ag.e fluctuations. Each circuit is
usually a conlbinatiorl of on-off switches, wirecl together in sonle specific
configuralioll. Nowadays certain types of electronic blocks (i.e., solid state
devices sucli as t;ransisliors, resistors and capacitors) are Inore in usc. We call
these electronic bloclcs logic' gates, or: simply, gates. Irr Fig. 5 we ha,ve
shown a box wllicli corisists of some electronic switches (or logic gates), wircd
together in a specil'ic rkianner. Each line which is elitering tlie box frorn the
left ~:epr.escntsa n iridepenclcnt power source (iallcd i n p u t ) , where ildl of'
them need iiot supply volt,age t o tlie box a t il given nloment. A single line
coming out of t,lic box givos tlie f i n a l o u t p u t of tliB circuit box. Tlle output
depends on tlle trypc of inpill;.

power
lines
Box

a Fig. 5 : A logic circuit.


This sort of arrangcrric~itof i n p u t p o w e r lines, a circuit b o x aiid o u t p u t
lead is 1)asic to all elecl,ro~iiccircuits. Throughout tlic uriit, any sucli
interconnected asst?nlblage ol' logic gates is referred to as a logic circuit.
As you 1n;L-y lcnow, cornputcr hardwares &redesigned to llaridle only two
levels of voltage, botli as inputs as well as outputs. These two lcvcls, clcrloted
by 0 and I, are called b i t s ( a n acronym for binary digits). Wlicn tlie bits
Table 3: O u t p u t of
are applied to t,hc logic gates by means of o n e or t w o wircs (input leads),
AND-gate.
tlie outplrt, is again
- in the furna of voltages 0 and 1. Roughly speaking, you
may thirilc of a gate l o bc on or off according to whether the output volt,agc
is at levcl 1 or 0, respective1;y.
Three basic types of logic gates are an AND- gate, an O R - g a t e and a
N O T - g a t e . We shall now define them one by one.
Definition : Let the Boolean variables xl and xa represciit any two bits. An
a t e inputs xl arid xz and produces the output,, denoted LY
k ~ ~ - ~receives
xi A xz, as given in Table 3 alongside. The slandard pictorial representation
of an AND-gate is shown in Fig.6 . horn'the first threc rows of Table 3,
you can see that whenever the voltage in any one of the input wires of the
AND-gate is a t levcl 0, t,hcn the output voltage of the gate is also at level 0.
Elementary Logic

Fig. 6: Diagrammatic representation of a n AND-gate


You have already encountered such a situation in Unit 1. In the following
exercise we ask you to draw an analogy between the two situations.

E5) Compare Table 3 with Table 2 .ofunit 1. How would you relatc xl A xz
, with p A q, where p and q denote propositions?
(Hint: Take T for 1 and F for 0 in Table 3 above.)
Table 4: Output of
OR-gate.
Let us now consider another elementary logic gate. , '

Definition : An OR- gate receives inputs xl and xn and prod'uces the


output, denoted by xl V xz,as given in Table 4. The standard pictorial
representation used for the OR-gate is' as shown in Fig.7.

Fig. 7: Diagrammatic representation of a n O R - g a t e


From Table 4 you can see that the situation is thc other way around from
that in Table 3, i.e., the output voltagc of a n OR-ga,t,e is at level 1 whenever
the level of voltage in yven one of the input wires is 1. What is the analogous
sil;uation in t,he context of propositions? The followillg exercise is about this.

EG) Compare Table 4 with Table 1 of Unit 1. How would you relate XI V xz
with p V q, where p and q are propositions?
Table 5: Output of
NOT-gate And now we will discuss m electronic realisation of the invert of a simple
switch about which you read in Sec.3.2.
Definition : A NOT- gate receives bit x as input, and produces at1 output
denoted by x', as given in Ta.ble 5. The standard pictorial reyrescni1;ation of a
NOT-gate is shown in Fig.8 below.

Fig. 8: Diagrammatic representation of a NOT - gate


If you have solved E5 and E6, you would have noticed that Tables 3 and 4
axe the same as the truth tables for the logic connectives A (conjunction)
and V (disjunction). Also Table 3 of Unit 1, after replacing T by 1 and F by
0, gives Table 5. This is why the output tables for the three elementary gates
are called logic t a b l ~ s You
. may find it useful to remember these logic
tables because they are needed very often for computing the logic tables of
logic circuits.
Another important fact that these logic tables will help you prove is given in
the following exercise.
Boolean Algebra and
Circuits
I
algebra, i.e., t h a t the bits 0 alltl 1 for111 a two-element I3001ean algebra.
,
As said before, a logic circuit can be designed using elenlentary gates, wllere
i t,he outpul from an AND- gate, or a n OR-gate, or a, NOT-gate is used as an
1 input to ot,her such gates ill tlie circuilry. The different, levels of voltage in
I
/ these circuit,^, st]arting frorri the input lines, move only i11 t;hc direction of the
arrows as shown in all tlle figures given below. For instance, one
! of tlie three eleinciitary gatcs is shown in Fig.9.
I

I
Fig. 9: A logic c i r c u i t of e l e m e n t a r y gates.
1 Now let 11s try to sea tllc conncctiori bc?tween logic: circuits and'~oo1ei~11
1 expressions. We first consi(2er t110 c?lelilentnry gates. For n give11 1);iir of
; inputs XI, ant1 x2, tlic o11tp11t ill I,he cnsc of C I L ( : ~ of
~ t l i ~ s ega,tes is ill1
-
I , expression of tlic for111 xl, A x:! or X I V ~2 or XI.
Next, let us look at; larger circuits. Is it jlossible to find illi exprcssiori
, associated wil;h i1 logic circuit, using the syrubols A , V and I'? Yes, it is. We
will illustral;~tilie I;ecliilicjuc of fillding il Boolean cxprcssioil for a given logic
circuit with tlie help of s o ~ n ac!xainplcs. But first, notc t;l~n,ttlle output of a
gate in a circiiit niay scrve as a11 iiil)~;tto soii1(?ot;ll(-!rgate in tlle circuit, iW in
Fig. 9. So, t,o gc:t bxprcssioli for a logic cil:cliit 1;lrc process alwilys moves
in the diicctior, of blic? arrows in tlict circuitry. With t,liis i11 mind, let us
corisicler some circuits.
E x a m p l e 7: Fiwl t,hc Doolrail c?xprcssionfor 1,hc logic: circuit given in Fig.9
above.
Solution: 111 Fig.9, tllcrc arc foilr input t,&rmirials. Ld,us call them
I ~ 1 ~ xx:j2 a, n ~ 1x4. S O , X I alld xz are input,s to a,ri OR-gate, wliicli gives
xl V x:! as a n out,put c:xprctssion (scc Pig. 9(a) ).
1

Similarly, tllc ot;her two inputs x:j arid x , ~ are


, inputs to an AND-gate, They
will give xn A xd as a n outp111; expression. Tlris is, in turn,:i~.n input for a
NOT-gate in t;he circuit. So, t;his yields (xs A x4)' as the output expression.
Now, both the expressions x, V x.2 ant1 (xs A x4)' are inputs to the extreme
right AND-ga,tr: in tllc circuit. So, tlley give (xl V xz)A ( x : ~A ~'1)'as t,lie
final output expression, whicli represents the logic circuit.

Fig. 9(a)
***
Elementary Logic You have just seen how to find a Boolean expression for a logic circuit: .For
Inore practice, let us find it for another logic circuit.
Example 8: Find the Boolean expression C for the logic circuit given in
Fig. 10.

Fig. 10
Solution: I-Ierc i,he first output is from an OR-gate, i.e., A is XI V xa. This,
in t ~ x nserves
, as the input to a NOT-gate attached to it from the right.
The resulting bit B is (xl V xz)'. This, and xs, serve as inputs to the extreme
right AND-gate in the cir~uitgiven above. This yields an output expression
(xl V x2)' A xj, which is C, the required expression for the circuit given in
Fig.10.

Why don't you try to'find the Boolean expressions for some more logic
circuits now'?

E8) Find the Boolean expression for the output of the logic ciicuits given
below.

. .

So far,, you have 'seen how to obtain a Bo,olean expression that 'represents ,s
given dircuit. Can you do the eonverse? e hat is, can you construct. a logic
circuit correspdnding to a given Boolean expression? In fact,! this is' done.
when a. circuit designing problem has to be solved. The proQedve is quite
simple. We illustrate it with khe help of some examples.
E x a m p l e 9: Construct. the logic circuit represented by the Boolean
expression (xi A xz) V (xl V x3),where xi (1 5 i 5 3) are assumed to be
inputs to that circuitry.
Solution: Let us first see what-,the portion (xi A xz).of the &en expression
contributes i,o the complete circuit. In this expression the literals x', and xa
are collnected by the connective A (AND). Thus the circuit corresponding to
it is as shown in Fig.ll(a), by the definitionstof NOT-gate and'AND-gate.
Similarly, the gate corresponding to the expression xl V xs is as shown in
Fig. l l ( b ) above. Finally, note that the given expression has two parts,
namely, x i A xz and XI V xs,whi& are connected by the connective V (OR).
So, the two logic circuits given ia Fig.11 , when connected I,by a ; OR-gate,
I
will'give us the circuit shown Fig.12 .

58
Boolean Algebra and
Circuits

/ Fig. 11: Logic circOits f o r t h e expressions xi h xz and x l V xs.

I I
(xlf A x2) V (xl V x3)
I
I
I
II
1
Fig.
x3

Pcircuitry
,
x1 v x3

*for t h e e x p (xi AX^) v (xl v XQ)


This is the required logic circuit which is represented by the given expression.

E x a m p l e 10: Given the expression (xi V (xz A xi)) A (xz V x i ) , rind the
<
corresponding circuit, where xi (1 i 5 4) are assumed to be inputs to t h e
1 circuitry.

1
1
Solution: We first consider the ciraiits reprcse'ntibg the expressions xz A xi
and x2 V x i . They are as shown in Fig.13(a).

(a) (b) (c)


. Fig.13: C o n s t r u c t i o n of a logic circuitry.
' Also you know that the literals x i and xi are oul,puts of the NOT-gate. So,
'
these can b e represented by logic gates as sliown in Fig.l3(b). Then the .

g
circui for the part x i V (x2 A xQ) of the given expression is as shown in
Fig.1 (c). You already k~iowhow to construct a logic circuit for the
exprepsion y2 V x i .
~ , two expressions (xi V (x2 A xh)) and (x2 V xi) being connected by
~ i n a l jthe
the cbnnective A (AND), give the required circuit for the given expression
as shbwn in Fig. 14.

Fig. 14: C i r c u i t r y for t h e expression (x? V (xz A x$)) A (xz V xi). I


***
Why don't you try t o solve some exercises now?
59
I
I
Elementary Logic
E9) Find the l o g i ~circuit correspo~idingto the expression XI,./\ (x2 V xi).
E10) Construct the logic circuit and obtain the logic table for the
expression XI V (xiA XQ).

So far we have established a onc-to-onc correspondence between logic circuits


and Boolean expressions. You may wonder about the utility of this. The
mathematical view of a circuit, can help us understand the overall
functioning of the circuit. To understand how, consider the circuit given in
Fig.10 earlier. You may think of the inputs bits xl, xz, and x3 as three
variables, each one of which is known to have two values only, na,mely, 0 or 1,
depending upon the level of voltage these inputs have at any moment of
time. Then the idea is to evaluate the expression (xlV xz)' A xa, which
corresponds to khis circuit, for different values of the 3-t~lple( ~ ~ , x a , x : ~ ) .
How does this evaluation help us to understand the functioning of the
circuit? To see this, consider a situation in which the settings of X I , xz and
x3 at a cer1;ain stage of the process are xl = x3 = 0 and xz = 1. Thcn we
know that XI V xz = 0 V 1 = 1 (see the second row of Table 3 given clarlier).
Further, using the logic table of a ~ 0 ~ - ~ awet get e ; (xlV x2)' = 1' = 0.
Finally, from Table 3, we get (XI v x a ) ' . ~xs = 0 A l = 0. Thus, the expression
(xl V xz)' A xg has value 0 for the set of values (0,1,O) of input bit,s
(xl, x2 ,x:j). Thus, if x l .a n d XQ a r e closed, while xz is open, t h e circuit
remains closed.
Using similar arguments, you can very easily calculate the othcr values of the
expression (xl V xz)' A XQ in the set
<
{ 0 , 1 ) ~= {(x1,x2,x3) ( x i = 0 or I, 1 i s 3)
of values of input bits. We have recorded them in Table 6.
Observe that the row entries in the first three columns of Table 6 represent
t,he different values which the input bits (xl, xz, xs) may take. Each entry in
the last column of the table gives the output of the circuit represented by the
expression (xl V x2)' A xg for the corresponding set of values of (xl, XZ,x3).
For example, if (xl,x2, x3) is (0,1,0), the11 the lcvel of voltage in the output
lead is at a level 0 (see the third row of Table 6).
You should verify that the values in the other rows are correct.
i
Table 6: Logic table for the expression V xz)' A xs.
Xl x2 x3 x1 v x2 (xl V x2)" (XI )r/ x2)'A XQ
0 0 0 0 1 . 0
Table 6 is the logic 0 0 1 0 1 1
table for the circuit 0 1 0 1 0 0
given in Fig.10. 1 0 on. 1 0 b
0 1 1 1 0 0
1 1 0 1 0 0
1 .o 1 1 0 0
1 1 ' 1 1 0 0
I

Why don't you try an exercise now?

E l 1) Compute the log32 table for the circuit given ifi E8(b) above.

-
You have seen how the logic table of an expression representing a circuit
. provides a functional relationship between the state (or level) of Goltage in --7

the input terminals and that in the output lead of that logic circuitry. This 1
leads us the coricept 01Boolean functions, which we will now discuss. Boolean Algcbra and
Circuits

3.5 BOOLEAN FUNCTIONS

In thc last section you studicd that an output expression is not merely a
cievicc for representing an interconnection of gates. I t also defiiies output,
valucs as a function of input bits. Tliis provides information about tlie
overall functioning of the corresponding logic circuil. So, this func1,ion gives
us a relation between t h e i n p u t s t o t h e circuit and its final o u t p u t . .
This is what helps us to understand control over tlie fuiictioriing of logic .
circuits from a mathema,t;ical point of view. To explain what, this means, let
us reformulate the logic tables iri terms of functions of the input bits.
Let us first consider the Boolean expression
X(x1,,332) = x1 A x:,
where xl arid x2 t,alte values in B = (0, I). You know that d l the values of
this expressio~i,for different pairs of values of the variables xl arid x2, cui be
calculated by using properties of tlie Boolean algebra B. For example,
OA~'=OAO=O * X ( 0 , l ) =0.
Similarly, you can calculate the other values of X(x1, x2) = xl A xk over B.
In this way 'we have obtained a function f : a2-t 13, defined as follows:
f(el, ez) = X(el, en)= el A e;, where .el, e2 E {0,1}.
So f is obtained by replacing xi with ei in the expressioli X(xl, x2). For
example, when el = 1, e2 = 0, we get f(1,O) = 1 A 0' = 1.
More generally, each Boolean expression X(xl , x;!, . . . , xk) in k variables,
where each variable can take values from the two-element Boolean algebra B,
defines a function f : B'' + B : f(el,. . . , ek) = X(el,. . . , ek).
Any such function is called a Boolean function.
T1.ms, each Boolean expressioii over B = {O,1) gives rise to a Boolean
function. In particular, corresponding to each circuit, we get a Boolean
function. Therefore, the logic table of a circuit is just another way of
representing the Boolean function correspondi~igto it.
For example, the logic table of an AND-gate can be obtained using the
function A : B2 t Z? : A(el, ez) = el A e2.
To make matters more clear, let us work out an example.
Example 11: Let f : B2 3 B denote the function which'is defined by the
Boolean expression X(xl.,x2)= xi Ax;. Write the values uf f in tabular f&m.
Solution: E is defined by f (el, ez) = ei A e; for el, e2 E {O,l}. Using Tables 3,
4 and 5, we have
f(0,O) = O 1 A O ' = 1 A 1 = 1, f ( 0 , l ) = 0' A 1' = 1 A 0 = 0,
f(1,O) = 1 ' A O ' = O A 1 = 0, f ( 1 , l ) = 1' A 1' = O A O = 0.
We write this information in Table 7.
Table 7: Boolean function for the expression x i A xb.
Elementary
.. Logic Why don't you try an exercise now?
-
E121) Find all the values of the Boolean function f : a2-+ B defined by the
Booiean expression (xl A xz) V (xlA xi).

Let us now consider the Boolean function g : B~ -+L?, defined by the


expression X(xl, xz) = (xl V x2)'. .
Then g(ei,ez)= (el V ez)', el,ea E B.
So, tbe different values that g will take are
g(0,O) = (0 v 0)' = oi= 1, g(0,l) = (0 v 1)' = 1' = 0,
g(1,O) -- (1 v 0)' =. 1' = 0, g ( l , J ) , = (I v 1)' = 1' = 0.
In tabular form, the values of g can be predented as in Table 8.
Table 8: Boolean function of the expression (xl V xz)'.

By comparing Tatjles 7 and 8, you can see that f (el, e2)= g(el, ez ), for all
(el, e2) E 23'. So f and g are the same function.
What you hihe just seen is that two (seemingly) different Boolean
expressiods c a n have t h e same Boolean function specifying t h e m .
Note that if we replace the input bits by propositions in the two expressions
involved, tllen we get logically equivalent statements. This may give you
some idea of how the two Boolean expressions arc related. We give a formal
definitiok below.
i

, Definition : Let X = X(xl,,x2,. . . , xk)and Y = Y(xl ,xz,. . . , xk) be two


- Boolean expressions in the k variables XI,. . . , xk. We say X is equivalent
I ; I
t o Y over the Boolean algebra B, and write X z Y ,if both the expressions
X and Y define the same Boolean functidn oyer 23, i.e.;
I
X(el, e2,.. . , ek)= Y(el, e2,. . . , ek),for all e; E {O,l).

So, the cxpressions to which f and g (given by Tables 7 and 8) correspond


are equivalent.
Wlly don't you try an exercise now?
I

I
El3 ) Show that Boolean e~pressions
a
I X= (xl A xz) V (xl A xi) and Y = XL A (x2 V xi)

are equivalent over the two-element Boolean algebra B = {0,1).

So far you have seen that given a circuit, we can define a Boolean function
corresponding to it. You also know that given a Boolean expression over 13,
there is a circuit corresponding to it. Now, you may ask:
Given a Boolean function f : an'+ B,is it always possible to get a Boolean
expression which will specify f over B? The answer is 'yes', i.e., for every .
function f : Bn -+ 23 (n 2 2) there is a Boolean expression (in n variables)
whose Boolean function is f itself.
In fact, the disjunctive (and conjunctive) normal forms described in Sec.3.3 Boolean Algebra a ~ l d
are precisely the expressions which will come in handy here.
Circuits
I
TO help you understand the underlying procedure, consider the following 1
examples.
Example 12: Let f : B2 i -B be a function whicll is defined by
f(0,O) = 1, f ( l , 0) = 0, f ( 0 , l ) = 1, f ( 1 , l ) = 1.
~ i n dthe Boolean expression (in DNF) specifying the function f.
solution: The procedure involved for the construction of a Boolean *

cx~ression(in DNF) which will specify the given function f is given in the
following three steps.
Step-I: Collect all the pairs of values vi = (eil,ei2) for which f (eil,cia) = 1,
, w11cl.e (eil, ei2) E B2 b' i. In this case these arc
vj = (0,0), v z = ( 0 , 1 ) andv3 =(1,1).
9

Step-11: Write a rniriterrn Ini = yil A yi2 for each pair vi of these values,
namely, (0,0), (0,l) and ( I l l ) ,where, for 1 <_ i 5 3, 1 <_ j 5 2,
Xj, i f e ; j = l , .

xi, if eij = 0.
Now, beca,use vl = (0,O) i.e. ell = 0 and el:! = 0, so, we have
1111 = y11 A y12 = xi A x;,
bx the definition of yll and yli given above.
Similarly, you can see that'
m2 = x i Ax2 a n d m3 =,XI AX^.
Step-111: The join of the three m i n t e r m s ml , m2 and rns gives the expres-
sion of the type
X(xl, x2)= ml V mz V ms = (xi A'X;) V (xi A xz) V (XI A x2),
wllicli is,the requifed Boolean expression (in DNF) whose Boolean
fuunction is the same as Ihe given function f (see the exercise given
bclow) .

You can comklete Examplo 12, by doi~igthe following exercise.

) the previous example, show that X(e1,ez) = f(e1, ez), Ve1,ez E U.


~ 1 4 In

In Exarnple 12, you saw how to obtain an expression (in DNF) for a given
function f : 82-+ U. In the next example, you will see how to obtain the
expressiorl in CNF.
Example 13: Let 'g : B~ 3 U be a function which is defined by
g(0,O) = 0, g(1,O) = 1, g(0,l) = 0, dl,1) = 1.
Find the Boolean expression in CNF w h i a specifies the function g.
Solution: The procedure t o obtain a Boolean expression in CNF specifying
the function g is given i n the following three steps. .
Step-I: Collect a11 pair of values V; = (eir, ei2) such that g(vi) = 0,
where (eil, qz) E B2 V i. Here two such pairs are given by
7
v l = (0,O) and v2 (0,l).
Step-11: Write a maxterm Mi = Y i l V y;2 for each pair vi = (eil, ei2) of these
i;wo, where, for 1 _< i , j 5 2, 63

8
Elementary Logic

Now, because vl = (0,O) i.e. ell = 0 and el2 = 0, we have


MI = Y H V ~ 1=
2 V xi,
using the definition of yll and yl2 give11 above.
Si~nilarly,Mz= xi V x2.
Step-111: Finally) the meet of these two rnaxteri~sMI and M2 give the
expression
X(xl, xa)= M1 A Mz= (x; v xi) A (x; V x2);
which is the required Boolean expression in CNF specifying the
function g .(Verify this!)

The following theorems are simple generalisations of the procedures .


illustrated in the previous two examples. (We shall not provc thern here.)
T h e o r e m 3: Let; f : Bn + B (n 2 1) be a function and
vj = (eil,eiz,. . . , ei,,)(1 5 i 5 k) be those elements of the Boolean algebra B1'
for which f (vi) = 1. For each such vi, set Ini = yil A . . . A yill, where

yii = { xi,xj, if eij = 1,


if eij = 0 , f o r j = I, ... , n .
Then X(xl ,xz,. . . , x,)' = inl V mz V - V ml, is a Boolean expression (in
DNF)whose Boolean function is the same as the function f.
Tlleorem 4: Let g : 8" -+ B be a function and
Vi = (eil, eiz, . . . ,eir1),(1 5 i 5 lc) be those elements of the Boolean algebra,
Bn for which f(vi) = 0. FOSeach such vi, set Mi = yil V . V yiIl, where
y- = { ~ j , i f e i j = l , for ,j = 1,.. . , n,
x,!,if eij=O.
Then X(xl, x2, . . . , x,) = MI A Mz A . . . A Mk is a 13001ean expression (in
CNF) whose Booleall function is the same as tlre function g.
Remark: To get a Boolea11 expression for a Boolean function h (say), we
should first see how niany vi's tllerc are at which 1l(vi)= 0, arid for how
many vi's h(vi) = 1. If the number of values for which the function h
is 0 is less than the number of values at which h is 1, t h e n we shall
choose t o obtain the expression in CNF, and not in DNF. This will
give us a shorter Boolean expression, and hence, a simpler circuit. For similar
reasons, we will prefer DNF if the nulnbcr of values at which 11 is 0 is more.
Why don't you apply Theorems 3 and 4 now?

E l 5 ) Find the Boolean expressions, in DNF or in'CNF (keeping in mind the


remark made above), for thc functions defined in tabular form below.
Boolean functions tell us about the functioni~igof the correspondi~~g circuit,.
Therefore, circuits represented by two equivalent expressions should
essentially do the same job. We use this fact while redesigning a circuit to
create a simpler one. In fact, in suc11 a simplification process of a circuil, we
write an expression for the circuit and then evaluate the same (over
two-element Boolean algebra. B ) to get the Boolca~ifunction. Next, we
proceed to get a n equivalent, simpler expression. Finally, the process
terminates with the construclion of the circuit for this simpler expression.
Note that, a s t h e t w o expressions a r e equivalent, t h e circuit
represented b y t h e simpler expression will d o exactly t h e s a m e j o b
as t h e circuit represented b y t h e original expression.
Let us illustrate this process by an exa~npleill some detail.
E x a m p l e 14: Design a logic circliit- capable of operating a central iight
bulb in a hall by three switches xl,x2, x3 (say) placed at the three entrances
to that hall.
So1ution:Let us consider the procedure stepwise.
S t e p 1: T o o b t a i n t h e functioil corresponding t o t h e unspecified
circuit.
To start with, we may assume that, the bulb is off when all the switches are
off. Mathernatically, this derrlands a situation where xl = xz = xa = 0
iinplies f (0, 0,O) = 0, where f is the function which depicts the functional
utility of the circuit to be designed.
Let us now see how to obtain the other values off. Note that every change in
the state of a switch should alternately put the light bulb on or olf. Using
this fact repeatedly, we obtain the other values of the function f.
Now, if we assign the value (1,0,0) to (xl,x2,x3),it brings a ~inglechange in
the state of the switch xl only. So, the liglit bulk must bc on. This car1 bc
written mathematically in the form f(l,O, 0) = 1. Hcre t,he value 1 of f
stands for the on state of the light bulb.
Then, wc must havc f (l,1,0) = 0, because %hereis yet another chlzngc,,now
in the Atate 01switch x2.
You can verify that the other values of f(xl,x2, x3) are given as in Tal~le9.
Table 9: Function of a circuitry for a three-point functional bulb.

S t e p 2: T o obdain a Boolean expression which will specify t h e


function f, I?irstly, note that' the number of 1:s in the last column of Table
9 are fewer than the number of 0's. So we shall obtain the expression in DNF
(instead of CNF). '
By following the sbepwise procedure of' Example 12, and using Theorem 3,
you can see that the required Boolean expression is given by
X ( X ~ , X ~=
, X(XI X ;X Z A X ~ ) V (AX^
~ )A X ; A X ~ ) V ( A X ; Ax3)v(x1A X ~ A X ~ ) .
Elementary Logic At this stage we can directly jump into the construction. of the circuit for
this expression (using methods discussed in Sec.3:3). But why not try to get
a simpler circuit?
S t e p 3 : TO simplify t h e ex p ression' X(xl,x2,x3)given above. Firstly,
observe that
(xl A X; A x3)V (xl A xz A x3) = XI A [(xh A xg) V (& AX^)]
= XI A [(xk V x2) A xg]
= XI A (1 Ax3)
= X1 A X 3 ,
-
by using distributive, complementation and identity laws (in that order).
Similarly, you can see that
XL
(xi A A ~ 3 V) (XI A xg) = (x; V xl)A xg.
We thus have obtained a simpler (and equivalent) expression, namely,
X ( X ~ , X ~ ,= ) A xz A xi) V [(xb V XI) A x3] ,
X J(xi
whose Boolean function is same as the function f. (Verify this!)
S t e p 4: To design a circuit for the expression obtained in S t e p 3.
Now, the logic circuit corresponding to the simpler (and equivalent)
expression obtained in Step 3 is as shown in Fig.15.

Fig. 15: A circuit. for t h e expression (xi A xa A xi) V ((x', V x l ) . A xs).


So, in 4 steps we have designed a 3-switch circuit for the hall:
* +* I

We can't Claim that the circuit designed in the example dbove is-the simplest
circuit. How to get that ,is a different story and is beyond the scope of the .-
present, course.
Why don't.you try an exercise now?
I

El6 ) Design a l$ic circuit t& operate a light bulb by two swiiches, xl and xz
,-
(say), ". I

-.
We have now coine',io the end of our discussion on applications df logic. Let ,
us briefly recapitjZ$e what. we' have discussed- here.

3.6 SUMMARY
In this h i t ' we have ;onsidered the'following points.
1. The definitio'n .and examples of a Boolean algebra. In particular, we
have discussed the two-element Boo1e;zn algebra 23 = {,O, I), and the
switching algebras Bn, n 2 2.
+.
The definition and examples of a ~ o o l e a nexpression.
.2.
3. How to' write a Boolean expression in disjunctive normal form (DNF)' or
in conjurlctive normal form (CNF). ' BooIean AIgebra and
Circuits
The three elementary logic gates, namely, AND-gate, OR-gate and
NOT-gate; and the arialogy between their functioning and operations of
logical connectives.
The method of construction of a logic circuit corresponding to a given
Boo1ea.n expression, and vice-versa.
How to obtain the logic table of a Boolean expression, and its utility in
the understanding of the overall functioning of a circuit.
7. The method of simplifying a Boolean expression.
8. Thc method of construction of a Boolean function f : Bn -+ B, '
corresponding to a Boolean expression, and the coilccpt of equivalent
J
Boolean expressions.
9. T h e method of obtaining a Boolean expression (in C N F or DNF) for a
>
given function f : Bn + 13,n 2.
10. Examples of the use of Boolean algebra techniques for constructing a
logic circuit which can function in a specified manner.

El) a) In El9 of Unitl, you have already verified the Identity laws. Let
us proceed to show that the propositions p V (p A q) and p are
logically ecluivalent. It suffices to show that the truth tables of
both these propositions are the same. This follows horn the first
and last, columils of the following table. -

Similarly, you can see that the propositions p A ( p V q) and p are


equivalent propositions. This establishes the absorption laws for
the Boolean algebra (S,A , v,' , 7 ,F ). '
b) Let A and B be two subsets of the set X. Since A n B C A,
( A n B ) UA = A. Similarly, as A 5 AUB, we have ( A U B ) n ' =~A.
Thus, both the forms of the absorption laws hold good for the
Boolean algebra ( P ( X ) ,U, n, C , X, ). a

Observe that
(xl V x2)' = x i Ax; (De Morgan's' Laws)
= ;(xi A x;) A I ( ~ d e n t ' iLaw)
t~
= (xi A x;) A (x3 V-xi) (Complementation Law)
= (xi A x; A x3) V (xi A xk A xi) (Distributive Law)
Similarly, you can see that
X ~ A X , =(x~Ax~)A(x~vx~)=(x',Ax~Ax~)V(X~AX~AX~)
= (xi A x2 A x3) V (xi A X; A x3).
Thus, the DNF of the Boolean expression X(xl, xz, xs) is given by
IJt 1 ,:a t.1 . $ I 6 s - .> b,:i
.\ b f , 11,~1,
,
(3

((XI x',) V (xi \; ~4))' = (xl A xb)' A (xi V xi)'


= (xi V (xh)') A ((xi)' A (x!~)')
= (xi Vxz) A (xLAx3)
Now
(xi v x2j = (x: v x2) v 0
= (xi V x2) V (x3A xi)
= (xiv x 2 v x S ) A (xi v x 2 V X ~ ) .
Similarly, it can bc seen that
(xl V x3)= (XIV x:! V x3) A (xl V xi V x3). Thus, the CNF of the
given Boolean expression is .
(xi Vx2 VXQ)A (xi Vx2 Vxi) A (xl Vx2 Vx3) A (xi V X V~ X ~ ) .
E4) We can write
X ( X I , X Z , X=
~) ( ( x ~ A x ~ ) v ( ( x ~ A x ~ ) A x ~ ) ) V ( X ~ A X ~ )
= (xi A xz) V (x2 A ~ 3 ) (by Absorption law)
= xz A (XI V x3) (by Distributive law)
This is the simplest form of the given expression.
E5) Take the propositions p and q in place of the bits xl and xa,
respectively. Then, when 1 and 0 are replaced by T and F in Tab3e 3
here, we get the truth table for the proposition p A. q (see Table 2 of
Unit 1).
This establishes the analogy between the functioiiiqg of the AND-gate
and the conjunction operation on the set of propositions.
E6) Take the proposibionsp and q in place of the bits xl and xz,
respectively. Then, when 1 and 0 are replaced by T and F in Tahle 4
here, we get the truth table.for the proposition p V q (see Table 1 of
Unit 1).
his *establishesthe analogy between the functioning of the OR-gate
and the disjunction operation on the set of propositions.
. E7) Firstly, observe that the information abouf' the outputs af the three
elementary gates, for different values of inputs, can also be written as
follows:
0 A 0 = 0 A 1 =1 A 0 = 0, 1 A 1 = 1; (see Table 3)
0 V 0 = 0, 0 V 1 = 1 V 0-= 1v 1 = 1; a i d (see Table 4)
0' = 1, 1' = 0. (see Table 5)
Clearly, then both the operations A and V are the binary operations on
I
B and ' : B'+ 8 i s a unary operation. Also, we,mily take 0 for 0 and 1
for I in the definition of a Boolean algebra.
i
Now, by- looking at 'the logic tables of the three elementary gates, you
can see that all the five laws B1-B5 are satisfied. Thus, B is a Boolean
algebra.
E8) a) Here xl and xk ixe inputs to an OQ-gate, and so, we take xl V xz
as input 'to the NOT-gate next in the chain which, in turn, yields
(xl V xz)' as the required output eGpression for the circuit given in
(a). ,
, b) Here XI and xz are the inputs to an AND-gate. So, t,he expression
xl A xa serves as an input to the NOT-gate, being next in the

68
a
chain. This gives the expression (xl A x2 ' which serves as one
input to t8hc;,extremeright AND-gate. lso, since x$ is another
input to this AND-gate (coming out of a NOT-gate), w e get the
I expression (xl A xz)' A x',as the final output exp~cssionwhich Boolean Algebra and
I represents the circuit given in (b). Circtzits

I E9) You lcnow that the circuit representing expressions x l and xt V xh are
as shown in Fig. 16 (a) and {b) below.

(a) (b)
Fig. 16
1 Thus, the expression xi A (xz V xi), being connected by the symbol A,
I gives the circuit corresponding to it as given in Fig.17 below.
I
I

Fig. 17: A logic circuit for t h e expression xi A (xzV x$)


E10) You can eilsily see, by followi~igthe qrgurnent,~given in EY, that tlie
circuit represented by the expression XI V (xLA xs) is as given in Fig. 18,

Fig. 18
The logic table of this expression is as givek below,

E l l ) Since the output expressiori representing the circuit given in E8(b) is ,


fourid to be (xlA xz)' A x i , the logic table for this circuit, is as given
below.
Elementary Logic E12) Because the expression (xlA x2) V (xlA xi) involves three variables, the
corresponding Boolean function, f (say) is a three variable function, i.e.
f : B3 -+ L3. It is defined by
f(el,e2, e3) = (el A e2) V (el A c$), el, e.2 and es E B.
*
Now, you can verify that the values of:f in t a b d a r form are as given in
the following table.

-el ez es.elAea e$ elAe/3 f(el,ez,eg)=


(el A e2) V (el A e$)
0 0 0 0 1 0 0
0 0 1 0 0 0 0
0 1 0 0 1 0 0 .
1 0 0 0 1 1 1
0 1 1 0 0 ' 0 0
1 1 0 1 1 1 .I
1 0 '1 0 0 0 0
1 1 1 1 0 0 1 >

E13) To.show that the Boolean expressions X and Y are equivalent over the
two-element Boolean algebra B = {U, I), it sufficis to show that>the *
Boolean functions f and g (say) corresponding to the expressions X and
Y, respectively, are the same. As you can see, the function f for 'the
expression X is calculafed in El2 above.
Similarly, you can sewthat. the Boolean function g for the expresiibn.y
in tabGsr form is as given below.

Comparing the last,colurnns of this table and. ihe one given in El2
above, you can see that
, f (el,ez, e3) = g(el,e2,e3) V el, e2, ei E I? = {0,1). Thus, X and Y are
equivalent.
, E14) firstly, let us evaluate the given expression X(xl, xz,xs) over the
two-element Boolean algebra 13 = {0,1) as follows:
X(0,O) = (o'Ao')v(O'AO) V ( O A O )
= (l~l)V(lA0)V (OAO)
= l V O V O = l=f(O,O);
x(1,O) = (1' A 0') V (I'A 0) V (1h 0)
= ( 0 ~ 1V(OA0)
) V(1AO)
= ovovo=o=f(1,0);.
'X(0,l) '= (O'.All)V (0'Al) V(OA1)
I
= (1~o)v(l~l)v(oAl)
70
Boolean Algebra and
Circuits

= ovov1= l=f(l,l).
It thus follows tliat X(el, e2) = f(e1, e2) b' el, e2 E B = (0,l).
E15) a) Observe from the given table that, among the two values 0 and 1
of the function f (xl, x2, x3), the value 1 occurs the least number of
I times. Therefore, by the remark made after Example 13, we would
I prefer to obtain the Boolean expression in DNF.
! To get this we will use Theorem 3 and the stepwise procedure
adopted in Example 12. firstly observe that

I ~1 = (ell,el2,el~= J ( 1 , l , 1),v2 = (e217e22,e23)= (1,010) and v3 =


(e31r e32'1 e33) = (010,0),
are the three triplets of values vj for which f(vi)= 1, 1 j i .< 3.
I
I
i
Then, the three minterms ml, m2 and m3 (say) corresponding to
these three values vl, v2 and vg, respectively, are given by

mi = yil A Y12 A Yi3


= XI A x2 A x3; (because ell = el2 = el3 = 1)
m2 =' Y21 A Y22 A Y23
= xi A xb A xi; (because e2l = 1 and e22.= 1323 = 0)
m3 = Y31 A ' ~ 3 2A Y33
= xi A X; A x i . (because e3l = e32 = e33, = 0)

Finally, the required .Boolean expression in DNF is given by

b) By the given table, among the two values 0 a n d , l of the function


g(xl,x2,x3), the value 0 has the least number of appearances. So
'we-wquld prefer to obtain the corresponding Boolean expression in
CNF.
To get Chat we will-use Theorem B afid the siepwlse procedure
adopted in Example 13. firstly, observe that
VI = (ey,el2,e1s) = (1,O,l),vz = (e2lje22je23) = (0,1,1) and v3 =
(e31,e32,e33) = (0,lrO)r
) 0, 1 j i 3.
are the three triplets of values vi for which g ( ~ i= <
Then, the three maxterms M1, M2 and M3 (say) corresponding to
these three values vl, vp.and v3, respectively, are gjven by

= x l V xb V,xg; (because ell = el3 = 1 and el2 = 0)

M2 = YZl V Y22 V Y23


. = xi V x2 V x3; (because e2l = 0 and ea2 = e23 = 1)
M3 = Y31 V Y32 V Y33 I

= x i V xz VX;. (because e3l = e33 = 0 and eg2 = 1)

Finally, the required Boolean expression (in ,CNF) is given by


71
Elementary Logic
= MI
X(XI,X~,X~). AM2 AM3
.= (xlvx;vxg)~(x~v~~vx3)~(x:vx~v
ElG) Let g deriote the function w,hich depicts the functional utility of the
circuit to be designed. We may assume that the light bulb is off when
both the switches xl and xa are off, i.e., we write g(0,O) = 0.
Now, by arguments used while calculating the entries of Table 9, you
can easily see that all the values of the funct,ion g are as given below:
g(0,O) = 0, g(0,l) = 1, g(1,O) = 1, g ( 1 , l ) = 0.
Thus, proceeding as in the previous exercise, it can be seen that the
Boolean expression (in DNF), whicli yields g as its Boolean funct;ion, is
given by'the expression
X(x1, x2) = (xiA'xZ) v (XI /\ xk), . .
w
because g(0,l) = 1 and g(1,O) = 1.
Finally, the logic circuit corresponding to this Boolean expression is as
shown in Fig. 19.

Fig. 19
REGIONWISE LTST O F STL'DY CENTRES FOR RSc. PRoCXaMME

%"To. Cmtm Code Centre M d m a

1. KYD- REGION(Andfirn PI7adc.h)


I 0102 V R C d l e g ~Netlo*-524 W I. h d h n P r d d
2 0103 I;BN College. Kolllap* V ~ j q a w d - 5 2 0001, Andbra P h h
3 01 11 Amora's Dgrcs CoUcge, Hyderabad-500 020,
Andhn l'rdah
2. GLTAkLiTl REGIO.Y(Aslnq A ~ & a l P r a d d 4 Sikkim)
4 040 1 Guwilbati Umvrmry. Guwnhai~-781014, h l a m
5 W!fl B j h n r a Mahav~dyalayaBcagagaon-7g3 180. G u m t h U
6 0408 Hendique Gnh Collegc, Guwahah-781 1W.h m m .
7 0109(P) Govr. Science Collqe. lorhat-785 010, A u a m
8 MI 1 Bajali Collcgc, P&ala. P M a P 0.Barpas D~sfnd-781 325.
,barn
9 0116iD) Debrnj R w Collegr. r m l a g h P 0 .Golaghat-785 621. h a m
10 0119 Lakhimpur GI& CoIl- &Im& P . 0 , North La&m$r-787 03 1. h m
II 240 l S i k h m GWL CoIIcgq Tadmg Gmgtok-737 Ic Skkh
3. PXTNA REGION (Bihar)
I2 OSOl Van?yya hhh;nidyalay. P m r Unnrcni F. PIuvSOC W5. EUmr
( P m a Science Collegc. Pan& Fllhar)
13 02C4 B KS.D~harUnivusityLibrxy. L l m d I ~ r M IN! 2 B i i u r iLS Ci?ilcg<
S f d q u r , nihar).
I4 0505 h l m n r i CoUegc(T.b[ Bhsgnlplr Univcr~ityj.Bl~agalpur-81 :!007, D l h u
15 0508 Purrna Collcgq Durnca-U4 301, Blh.r
IG 05m Ru!cnlfrs CuUegc. C.hhnpt*Ml 301. Blhar
17 0515R Balika Vidyapocth LakIusm-811 31 1, IYhnr.
18 0221 Sindri College. P.O. Sindri-828 112,Dhanb~dIUbar.
19 0522 C bi College. Kitaghsf, Darbhangq B i b r .
2) 05 W B~harNntimal Call+. P d W MY. B l b r
21 0525 h m a Collcgc. Chibus* P.O.Chuban-833 201. D m . Wcsl

-
-3.7

23 .
U28D
0529
Snghbhrrm. Dlbrr
St. Cillumhm C a l l w , P 0 College Slorr, H m h a g h - 8 2 5 30 I
h u g r a h Naraynn Coll~xe,Bonn8 Road Pltnr-8lW Ol3
4. DELHI RECION(1) (South m d W e d R e g l w . G u r f ~ r o Fmrhbbmd
~ -MIXIathun)
34 071)7 MCRC. Jamla hfillta Ialama J m a Nagar, 3 c w Deihi-\ I 9 0 2 5
25 071 1 G,+ Collcg, S i n Fon Rood. Yew Ikrm-l I0 019
26 0715 Acharya N n m d r a D w Collcgc. Mkajl. N e w Dclhl-l 10 019
5. DELHI REGION(?) (North utd Exrt R q l o n Including .Uceruf .Uodln.gar and Ghmrlabmd DM* o f Utbr Prndnh)
27 0728 Ahasknrnchnryn College of Applied S c ~ c n c a Vccr . Savarkar C o r n p l e ~b a a
NmDelhi-llOOl2
28 073 X a l ~ n dCollega,
~ Emt Pattl S a p , i i t w Delhl- I It) ir>X
29 17-13 1.ajpa Rsi (P.G.)(:ollcgc, Shhabod-21>1On), Vtlrr Prndcrh
6. -U-nfFllARADKEGIQN (Gujoral, 1)nlnan R: Diu, Dndrn Q h'n@~rH;ivcli)
30 W01. L.D. Ark! Collcge. Navningpura, h . . a i a b s d - 3 8 0 IXV, G u j x n t
31 0901 Gcncra! Education Buildlng hLS Cnl:.tniv. \'adod.ua-IW 002. Cujarat
32 @IN JD Thacktr Commerct Collcge.Rhuj.371)001 ,Guja:3L (LaIan Cnllcye.
T311uj, <;uji~rnt).
33 @lo!) Kew F'roglrssivc Ii~luc:~tior~ Tnls!, hlch;.;1n.1.3S.IEM>?, G u j ~ ! r ~ l
>1 0322 (K ) Sl~rceGnthi ViJyJoyn,Ploi Xo.910, GUJC E s t n t c , , \ n k I ~ ~ h w ~ , G u j n r ~ L
35 @I2Xj;lj NdIi<lrlalh ; t i ~ ~ ~filr
l eCl.may~.n:tnldnd Id~rrnatic'nTcct,nsluloy)C!I.LII'I)
C/o Farag A d . J.ine.~tt~ Prrss, Rajku1.5
36 290 1 Cit>\t Arls Collcgc, I>unm and L)lu (T.T )-396 2 I O
7. KAKN:\I. REGIOS ( I l 2 r p n 3 and 1'unJ:111)
'17 IUOI hlukanndl.~lNali~~nrlCollcye, Y m u n s N a y ~ r s l I S01 1, Elutynna
1005 Cl~holuR m Collegc of Educdon, R o h ~ k - l 1 4 0 0 1 Haryxna ,
(All I n d ~ aJhl H e m s EVIcmorial College. Rohlak, Haryanaj.
39 I 00s GmT. Collcgc(Girh Wing).Scctor-14, R ~ l w a yR o d Ramnl.132 001.
Ilaq~nn
41i 1 OW G ~ TP.G Collzgc, FIiwar-I3 001, b ~ x n r .
41 Ill!? h f a h n d a Notional Collcg~-,Sh,&~b3d, Kumlrihctra. Har)'ana
42 1913 Government P.G. College. J~nd-I36102, klnrymn
43 2101 DAV. Collcgc. Jnl~u~dh.u-I.l-l608. PuoJnb
8.51D311A REGIO?i(IUnlact~al W m h and Chnrdifprh)
44 1101 Govemmcnl Buys Collcge, Sanjauli S M a - 171 (Y)6,
Hlmschnl Pndesh.
45 IIM Gmmrmcnr Collcgq Dharamshala-I 76 21 5, Htmnchd P n b b
46 ! 1 i3 Gm?. P G College. 0 1 l u p r . I 74 0131. Hlmacbxl P n d c s h
47 I l i5 GmT. Degree Collcgt, Rrcong P o q Emnow Dut,I-IimKhd P r d d
9. J..~Uliv REGIOS(J.%I;)
48 1101 C a i v d t y of &-I Dcpr.rurun of bfanagcrnsn %ti.
Jammu T~wi.180001, .I& K.
( G a n b Xfmorial Science Collqt, Jammu Tan> J&K).
49 1206 GOM.Deem: College, Kslhuq J & K
50 120: Gat.&gee CoUcgc, Rajowi J P I i
51 11CS GoM.Degree CoUcp, P w n & .I-.
52 122P) Gmdh bLmonal Cotlegc, Clmp h p n , B d l b . Jammu-18 1 123, J&K
18 B-CWX.LORE R E G I O . Y ( K X ~ ~ N La~d <;O)
53 0802 Dbcmw College a f h B Science, P . 0 Brrr So.= Pan*,
G.8103 001
-54 !j03 J S.S. CoUcgc, Dhatwad-SBOWS, linrmhh
55 1533 Gmt. Sci~~ccCoUcgq ?jnrp&~a&a Road, B@ub';/jn W1, K m h h
11. C-i R Z C I O . S ( K ~.sd ~ ~ b d r e c p )
-56 1101 Imrinneof- i n GoK. ViLrBLh.ln ~ ~ 033. ~ 9 5
h ' d CL'nivmj.C d l q e . -raq Ym l s i
57 1l i ! j J 9 . T . bkm, C d h t . 6 7 3 018, Krrdr
5s 1A X
CaLhlicztcCoIlqe, P l t t a n m l b 4 8 9 MS. Ktrr)..
.i..i 14:s Shri N H I P ~ W I
Cdlcge, b r r d h l (r~7
,, , 12:: St A!b..? Cdlzgc, ErnakU.*m&.1 013, $:en h

You might also like