Boolean
Boolean
values. The truth values are depicted by logical constants TRUE and FALSE or 1
and 0 respectively. 1 means TRUE and 0 means FALSE. The variables which can
store these truth values are called logical variables or binary valued variables as
these can store one of the two values 1 or 0 (TRUE or FALSE).
The decision which results into either YES (TRUE or 1) or NO (FALSE or 0)
is called a Binary Decision.
Also, if an equation describing logical circuitry has several variables, it is
still understood that each of the variables can assume only the values 0 and 1. For
instance, in the equation A + B = C , each of the variables A , B and C may have
only the values 0 or 1.
LOGICAL OPERATIONS
There are some specific operations that can be applied on truth functions.
Before learning about these operations, you must know about compound logical
functions and logical operations.
NOT Operator
This operator operates on single variable and operation performed by NOT
operator is called complementation and the symbol we use for it is (bar). Thus
X means complement of X and YZ means complement of YZ. As we know, the
variables used in Boolean equations have a unique characteristic that they may
assume only one of two possible values 0 and 1, where 0 denotes FALSE and 1
denotes TRUE value. Thus the complement operation can be defined quite simply.
0=1 or NOT (FALSE) = TRUE and
1=0 or NOT (TRUE) = FALSE and
The truth table for the NOT operator is
X X Several other symbols like ‘~’ are also used for the
0 1 complementation symbol. If ~ is used then ~X is read as ‘negation
of X’ and if symbol ’ is used then X’ is read as complement of X.
1 0
OR operator
A second important operator in Boolean algebra is OR operator which
denotes operation called logical addition and the symbol we use for it is +. The
+ symbol, therefore, does not mean arithmetic addition, but is a logical addition
or logical OR symbol. Thus, X + Y can be read as X OR Y. For OR operation,
the possible input and output combinations are as follows :
0+0=1
0+1=1
1+0=1
1+1=1
The truth table of OR operator is given below:
X Y X+Y Note that when any one or both X and Y is 1, X + Y is 1.
0 0 0
0 1 1 and both X and Y is 0, X+Y is 0
1 0 1
1 1 1
Table 1.4 : Truth Table for OR operator
To avoid ambiguity, there are other symbols e.g., and have been
recommended as replacements for the + sign. Computer people still use the + sign,
however, which was the symbol originally proposed by Boole.
Venn diagram for X + Y is given below where the shaded area depicts X + Y.
AND Operator
AND operator performs another important operation of Boolean Algebra
called logical multiplication and the symbol for AND operation is ‘.’ (dot). Thus
X.Y will be read as X AND Y. The rules for AND operation are :
0.0 = 0
0.1 = 0
1.0 = 0
1.1 = 1
Boolean Algebra
Table 1.10 : Truth Table for AND operator FIGURE 1.3 : Venn Diagram for (X.Y)
Note that only when both X and Y are 1’s, X.Y has the result 1. If any one
of X and Y is 0, XY result 0. Venn diagram for X.Y is given in the figure above where
the shaded area depicts X.Y
Evaluation of Boolean Expressions Using Truth Table
Logical variables are combined by means of logical operators AND, OR
and NOT to form a Boolean expression. For example, X+Y.Z+Z is a Boolean
expression.
It is often convenient to shorten X.Y.Z to XYZ and using this convention,
above expression can be written as X+YZ+Z
To study a Boolean expression, it is very useful to construct a table of values
for the variables and then to evaluate the expression for each of the possible
combinations of variables in turn. Consider the expression X+YZ. Here three
variables X, Y, Z are forming the expression. Each variable can assume the value
0 or 1. The possible combinations of values may be arranged in ascending order
as in Table 1.11
One more column is now added to list the values of YZ (Table 1.13)
X Y Z Y.Z YZ
0 0 0 0 1
0 0 1 0 1
0 1 0 0 1 Note that YZ contains complemented values of YZ.
0 1 1 1 0
1 0 0 0 1
1 0 1 0 1
1 1 0 0 1
1 1 1 1 0
Now values of X are ORed (logical addition) to the values of YZ and the
resultant values are contained in the last column (Table 1.14).
X Y Z Y.Z YZ X+YZ
0 0 0 0 1 1 Now observe the expression X+YZ, after
0 0 1 0 1 1 ANDing Y and Z, the result has been
0 1 0 0 1 1 complemented and then ORed with X. Here
0 1 1 1 0 0 the result is 0 only when both the columns
1 0 0 0 1 1 X and YZ have 0, otherwise if there is 1 in
1 0 1 0 1 1 any of the two columns X and YZ , the result
1 1 0 0 1 1 is 1.
1 1 1 1 0 1
Example 1.13: In the Boolean algebra, verify using truth table that X+XY = X for
each X, Y in 0 and 1.
As the expression X+XY=X is a two variable expression, so we require
four possible combinations of values of X, Y. Truth Table will be as follows:
X Y XY X+XY
0 0 0 0
0 1 0 0
1 0 0 1
1 1 1 1
Comparing the columns X+XY and X, we find, contents of both the columns
are identical, hence verified.
Example: In the Boolean Algebra, verify using truth table that
X+Y = X . Y in 0 and 1.
Solution: As it is a 2-variable expression, truth table will be as follows:
X Y X+Y X+Y X Y X.Y
0 0 0 1 1 1 1
0 1 1 0 1 0 0
1 0 1 0 0 1 0
1 1 1 0 0 0 0
Comparing the columns X+Y and X . Y both the columns are identical, hence
verified.
Example: Prepare a table of combinations for the following Boolean algebra
expressions:
(a) X Y + X Y (b) XY Z + X Y Z (c) X Y Z + X Y
Boolean Algebra
X Y X Y XY XY XY+XY
0 0 1 1 1 0 1
0 1 1 0 0 1 1
1 0 0 1 0 0 0
1 1 0 0 0 0 0
X Y Z X Y Z XYZ X YZ XYZ+XYZ
0 0 0 1 1 1 0 0 0
0 0 1 1 1 0 0 1 1
0 1 0 1 0 1 0 0 0
0 1 1 1 0 0 0 0 0
1 0 0 0 1 1 0 0 0
1 0 1 0 1 0 0 0 0
1 1 0 0 0 1 1 0 1
1 1 1 0 0 0 0 0 0
X Y Z X Y Z XYZ XY XYZ+XY
0 0 0 1 1 1 0 0 0
0 0 1 1 1 0 0 0 0
0 1 0 1 0 1 1 0 1
0 1 1 1 0 0 0 0 0
1 0 0 0 1 1 0 1 1
1 0 1 0 1 0 0 1 1
1 1 0 0 0 1 0 0 0
1 1 1 0 0 0 0 0 0
Table 1.15 Truth Table for NOT gate Table 1.16 Alternative truth table for NOT gate
A low input or 0 produces high output or 1 and vice versa. The symbol for inverter
is given in adjacent Fig. 1.4.
X X
Fig. 1.4. Not gate symbol
Boolean Algebra
NOT Gate is a gate or an electronic circuit that accepts only one input and
produces one output signal. The output state is always the complement of
the input state.
OR Gate
The OR Gate has two or more input signals, but only one output signal. This
gate gives the logical addition of the inputs. If any of the input signals or both is 1
(high), the output signal is 1 (high). The output will be low if all the inputs are low.
An OR gate can have as many inputs as desired. No matter how many
inputs are there, the action of OR gate is the same.
The OR gate has two or more input signals, but only one output signal. The
out will be the logical addition of the inputs.
Following tables show OR action
X Y F X Y Z F
0 0 0 0 0 0 0
0 1 1 0 0 1 1
1 0 1 0 1 0 1
1 1 1 0 1 1 1
1 0 0 1
Table : F=X+Y
1 0 1 1
1 1 0 1
1 1 1 1
Table : F=X+Y+Z
The symbol for OR gate is given below:
A A F A F
F B B
B C C
D
a) 2 input OR gate b) 3 input OR gate c) 4 input OR
gate Figure 1.5
AND gate
The AND Gate can have two or more than two input signals and produce
an output signal. When all the inputs are 1 or high only then the output is 1,
otherwise output is 0 only.
If any one or all the inputs is 0, the output is 0. To obtain output as 1, all
inputs must be 1.
An AND gate can have as many inputs as desired.
The AND Gate has two or more input signals, but only one output signal.
The out will be the logical multiplication of the inputs.
Boolean Algebra
The fundamental laws of the Boolean algebra are called as the postulates
of Boolean algebra
0+1=1 0
OR 1
1
1 1
1+0=1 OR
0
1 1
1+1=1 OR
1
Boolean Algebra
0.0 = 0
0.1 = 0
1.0 = 0
1.1 = 1
IV Complement Rules
0=1 0 1
1=0 1 0
PRINCIPLE OF DUALITY
This is a very important principle used in Boolean algebra. This states
that starting with a Boolean relation another Boolean relation can be derived by
i. Changing each OR sign (+) to an AND sign (.)
ii. Changing each AND sign (.) to an OR sign (+)
iii. Changing each 0 by 1 and each 1 by 0.
The derived relation using duality principle is called dual of original
expression.
For instance, we take postulates of OR relation, which states that
(a) 0+0=0 (b) 0 + 1 = 1 (c) 1 + 0 = 1 (d) 1 + 1 = 1
Now working according to above guidelines, '+' is changed to '.' 0's are replaced by
1’s and 1’s are replaced by 0’s, these equations become
(i) 1.1=1 (ii) 1.0=0 (iii) 0.1=0 (iv) 0.0=0
These are nothing but postulate III related to AND relations. We’ll be applying
this duality principle in the theorems of Boolean algebra.
Boolean Algebra
Properties of 0 and 1
a) 0+X=X 0 X (gate representation of (a))
OR
X
1
b) 1+X=1 OR 1 (gate representation of (b))
X
0
c) 0.X=0 AND 0 (gate representation of (c))
X
1
d) 1.X=X AND X (gate representation of (d))
X
Proof a) 0+x = x
If x = 0, then LHS =0+x
=0+0
=0 { By OR relation }
=x
= RHS
If x = 1, then LHS =0+x
=0+1
=1 { By OR relation }
=x
= RHS
Boolean Algebra
(a) 1+x=1
Proof: If x = 0, LHS =1+x
=1+0
=1 { By OR relation }
If x = 1, LHS =1+x (
=1+1
=1 { By OR relation }
Thus, for every value of x, 1 + x = 1 always.
Truth table for above expression is given below in Table 1.21, where R signifies
the output or result.
1 x 1+x
1 0 1
1 1 1
If x = 1, LHS = 0.x
= 0.1
=0 { By AND relation }
= RHS
Thus, for every value of x, 0.x = 0 always.
(d) 1.X = X
Proof: If x = 0, LHS = 1.x
= 1.0
=0 { By AND relation }
=x
=RHS
If x = 1, LHS = 1.x
= 1.1
=1 { By AND relation }
=y
=RHS
Thus, for every value of x, 1.x = x always.
1 X 1.X
1 0 0
1 1 1
X
a) X + X = X OR X (gate representation for (a))
X
X
AND X
b) X . X = X X (gate representation for (b))
Proof :
(a) X+X=X
If x = 0, consider LHS = x + x
=0+0
=0 { By OR relation }
=x
=RHS
If x = 1, consider LHS = x + x
=1+1
=1 { By OR relation }
=x
=RHS
Thus, for every value of x, x + x = x always.
To prove this law, we will make truth table for above expression. As X is to
be OR ed with itself only, we will prepare truth table with the two possible
valuesof X (0 and 1).
Boolean Algebra
X X X+X
0 0 0
1 1 1
Table 1.25 Truth Table for x + x = x
(b) X.X = X
Here X if ANDed with itself.
Proof: If x = 0, consider LHS = x.x
= 0.0
=0 { By AND relation }
=x
=RHS
If x = 1, LHS = x.x
= 1.1
=1 { By AND relation }
=x
=RHS
Thus, for every value of x, x + x = x always.
x x x.x
0 0 0
1 1 1
Table 1.26 Truth Table for X.X = X
Involution
This law states that the complement of a variable is complemented again,
we get the same variable.
X
(X) = X ie., X X=X
X X X
0 1 0
1 0 1
Complementarity Laws
Here, we will combine a variable with its complement.
i. These laws states that
a) X + X = 1 X (gate representation of (a))
X OR X+X=1
b) X.X = 0
X
X AND X.X=0
Proof: If x = 0, LHS = x + x
=0+1 (x = 1)
=1 { By OR relation }
= RHS
If x = 1, LHS = x + x
=1+0
=1 { By OR relation }
= RHS
Thus, for every value of x, x + x = 1 always.
We will prove x + x=1 with the help of truth table which is given below :
Boolean Algebra
X X X+X
0 1 1
1 0 1
The equations X.X = 0 as it holds true for both the values of X. Hence
proved. Observe that X.X=0. It is a fallacy. It is the dual of X+X=1.
Commutative Law
These laws state that a) x + y = y + x and b) x . y = y .x
X
X
OR
R
=
Y
OR
R
AND R = Y AND
R
Y X Y X
If x = 0 then LHS = x + y
=0+y
=y
RHS = y + x
=y+0
=y
Therefore, for x = 0, x+y=y+x
If x = 1 then LHS = x + y
=1+y
=1
RHS = y + x
=y+1
=1
Therefore, for x = 1, x + y = y + x. Hence the proof.
X Y X+Y Y+X
0 0 0 0
0 1 1 1
1 0 1 1
1 1 1 1
Compare the columns X + Y and Y +X, both of these are identical. Hence also
proved by truth table.
(b) Truth Table for X . Y = Y . X is given below:
Proof: If x = 0 then LHS = x . y
=0.y
=0
RHS = y . x
=y.0
=0
Therefore, for x = 0, x+y=y+x
If x = 1 then LHS = x . y
Boolean Algebra
=1.y
=y
Therefore, for x = 1, x + y = y + x. Hence the proof.
X Y X.Y Y.X
0 0 0 0
0 1 0 0
1 0 0 0
1 1 1 1
a) X+(Y+Z) = (X+Y)+Z
Proof: If X = 0 the LHS = X + (Y + Z)
= 0 + (Y+ Z)
= Y+Z
RHS = (X+Y)+Z
= (0+Y)+Z
= Y+Z
Therefore for X=0, X+(Y+Z) = (X+Y)+Z
If X=1, then LHS =X+(Y+Z) RHS = (X+Y)+Z
=1+(Y+Z) =1+(Y+Z)
=1 =1+Z
Therefore X=1, X+(Y+Z) = (X+Y)+Z =1
Boolean Algebra
Compare the columns X+(Y+Z) and (X+Y)+Z, both of these are identical.
Hence proved. Note : Give proof with table for rule (b). Since rule (b) is a dual of
rule (a), hence it is also proved.
Distributive Law
This law states that
(a) X (Y + Z) = XY+XZ X X+Y
Y
X R OR R
Y AND =
OR X
Z Y+Z X+Z
Z
Both the columns X(Y+Z) and XY+XZ are identical, hence proved.
Note : Since rule (b) is dual of rule (a), hence it is also proved
(b) X + YZ = (X+Y) (X+Z)
Proof: RHS = (X+Y) (X+Z)
= XX + XZ +XY + YZ
= X+XZ+XY+YZ (XX=X)
= X(1 + Z + Y) + YZ
= X + YZ (1 + z + y = 1)
= LHS Hence the proof
Truth table for X+YZ = (X+Y)(X+Z) is given below
Absorption Law
According to this law
c) X+XY=X b) X(X+Y)=X
X X
X
XY OR X+Y AND
AND OR
Y Y
Logic diagram (a) Logic diagram (b)
Proof: a) X+XY = X
LHS = x + xy
= x(1 + y)
= x.1 (1+Y=1)
= x (X.1=X)
= RHS
Boolean Algebra
X Y X+Y X(X+Y)
0 0 0 0
0 1 1 0
1 0 1 1
1 1 1 1
Proof : LHS = X + XY
= (x+x)(x+y) { x+x= 1}
= 1.(x+y)
= x+y
= RHS
All the theorems of Boolean algebra, which we have been covered so far, are
summarized in the following table:
Table 1.35 Boolean algebra rules
1 0+X=X Properties of 0
2 0.X = 0
3 1+X=1 Properties of 1
4 1.X = X
5 X+X=X Indempotence law
6 X.X=X
7 X =X Involution
8 X+X=1 Complementarity law
9 X. X = 0
10 X+Y=Y+X Commutative law
11 X . Y = Y. X
12 X + (Y + Z) = (X+Y)+Z Associative law
13 X(YZ) = (XY) Z
14 X (Y+Z) = XY+XZ Distributive law
15 X+YZ=(X+Y) (X+Z)
16 X+XY=X Absorption law
17 X . (X+Y) = X
18 X+XY=X+Y
De Morgan’s theorems
One of the most powerful identities used in Boolean algebra is De Morgan’s
theorem. Augustus De Morgan had paved the way to Boolean algebra by
discovering these two important theorems. This section introduces these two
theorems of De Morgan.
De Morgan’s First Theorem
It states that X+Y = XY
X X
X R
= R
Y
Y Y
Boolean Algebra
X X
X X.Y R
= R
Y Y
Y
Proof: Again to prove this theorem, we will make use of complementarity law i.e.,
X + X = 1 and X.X = 0
If XY’s complement is X + Y then it must be true that
(a) X Y + (X + Y) =1 and (b) X Y (X + Y) = 0
Boolean Algebra
L.H.S. = XY + (X + Y)
= (X + Y) + XY
= (X + Y + X) . (X + Y + Y)
= (X + X + Y) . (X + Y + Y)
= (1 + Y) . (X + 1) (ref. X + X = 1)
= 1.1 (ref. 1 + X = 1)
= 1 = R.H.S.
Now, the second part. i.e., XY . (X + Y) = 0
L.H.S. = XY. (X + Y) (ref. X(Y+Z)=XY+XZ)
= XYX + XYY
= XXY + XYY
= 0.Y + X.0 (ref. X . X = 0)
= 0+0
=0
= RHS
XY.(X + Y) = 0 and XY(X + Y) = 1
Thus, X.Y = X+Y Hence the theorem.
Maxterms
A maxterm is a sum of all the literals (with or without the bar) within the
logic system.
Trying to be logical about logic, if there is something called minterm, there
surely must be one called maxterm and there is.
If the value of a variable is 1, then its complement is added otherwise the
variable is added as it is.
Example: If the values of variables are X=0, Y=1 and Z=1 then its Maxterm will
be X + Y + Z(Y and Z are 1’s, so their complements are taken; X= 0, so it is taken
as it is).
Similarly if the given values are X=1, Y=0, Z =0 and W=1 then its Maxterm is
X + Y + Z + W.
Maxterms can also be written as M (Capital M) with a subscript which is
decimal equivalent of given input combination e.g., above mentioned Maxterm
X+Y+Z+W whose input combination is 1001 can be written as M 9 as decimal
equivalent of 1001 is 9.
2.5.2 Canonical Expression
Canonical expression can be represented in following two forms:
(i) Sum-of-Products (SOP)
(ii) Product-of-sums (POS)
Sum-of-Products (SOP)
A logical expression is derived from two sets of known values:
Various possible input values
The desired output values for each of the input combinations.
Let us consider a specific problem.
A logical network has two inputs X and Y and an output Z. The relationship
between inputs and outputs is to be as follows:
(i) When X=0 and Y=0 then Z=1
(ii) When X =0 and Y=1 then Z=0
(iii) When X =1 and Y=0, then Z=1
Boolean Algebra
Here, we have added one more column to the table consisting list of product
terms or minterms. Adding all the terms for which the output is 1. i.e., Z=1 we get
following expression:
XY + XY + XY = Z
Now see, it is an expression containing only minterms. This type of expression
is called minterm canonical form of Boolean expression or canonical sum-of-
products form of expression.
X Y Z F Product Terms/
Minterms
0 0 0 0 XYZ
0 0 1 1 XYZ
0 1 0 1 XYZ
0 1 1 0 XYZ
1 0 0 1 XYZ
1 0 1 0 XYZ
1 1 0 0 XYZ
1 1 1 1 XYZ
Solution: Add a new column containing Maxterms. Now the table is as follow:
X Y Z F Maxterms
0 0 0 1 X+Y+Z
0 0 1 0 X+Y+Z
0 1 0 1 X+Y+Z
0 1 1 0 X+Y+Z
1 0 0 1 X+Y+Z
1 0 1 0 X+Y+Z
1 1 0 1 X+Y+Z
1 1 1 1 X+Y+Z
Boolean Algebra
Now by multiplying maxterms for the output 0’s, we get the desired product
of sums expression which is (X + Y + Z) (X + Y + Z) (X + Y + Z)
Short hand = M4, M5, M0, M4, M1, M5, M5, M7, M1, M5 = M(0, 4, 5, 7)
Rule 5: Removing all the duplicate terms, we get
(X + Y + Z) (X + Y + Z) (X + Y + Z) (X + Y + Z) (X + Y + Z)
This is the desired canonical product of sums form of expression.
Shorthand maxterm notation
Shorthand notation of the above given canonical product of sums expression is
F= (0,1,4,5,7) or F = M(0,1,4,5,7)
This specifies that output F is product 0th, 1st, 4th and 7th Maxterms
i.e., F = M0.M1.M5.M5.M7
Here, M0 means Maxterm for Binary equivalent of 0 i.e., 000 ie., X=0, Y=0, Z=0
And, Maxterm will be (X+Y+Z) (Complemented variable is 1 and uncomplemented
variable is 0)
Similarly, M1 Means 0 0 1 X+Y+ Z
AS F = M0 .M1 .M4. M5 .M7
and M0 = 000 X+Y+Z
M1 = 001 X+Y+Z
M4 =100 X+Y+Z
M5 = 101 X+Y+Z
M7 = 111 X+Y+Z
F = (X + Y + Z) (X + Y + Z) (X + Y + Z) (X + Y + Z) (X + Y + Z)
Example 1.28: Convert the following function into canonical product of sums
form: F(X, Y, Z) = M(0, 2, 4, 5)
Note: To convert an expression from shorthand SOP form to shorthand POS
form, just create truth table from given expression. From the created truth table,
derive other form of expression. For example, from truth table, you can convert
an expression F(X, Y,Z)= (0,1,3,5) to M(2,4,6,7)
Solution: F (X, Y, Z) = M(0, 2,4,5) = M0 . M2 .M4 .M5
M0 = 000 X + Y + Z
M2 = 010 X+ Y +Z
M4 = 100 X+ Y +Z
M5 = 101 X+Y+Z
F = (X + Y + Z) (X + Y + Z) (X + Y + Z) (X + Y + Z)
Boolean Algebra
= X + X + XY + Y
= X + XY + Y {X + X = X as X + X = X}
= (X + X) (X + Y) + Y (Putting X + X = 1
=X+Y+Y {Y + Y = 1}
=X+1 {Putting Y + Y = 1)
=1 {putting X + 1 = 1 as 1 + X =1}
Boolean Algebra
Example: Reduce X Y Z + X Y Z + X Y Z + X Y Z
Solution. X Y Z + X Y Z + X Y Z + X Y Z = X (Y Z + Y Z) + X ( Y Z + Y Z)
= (X + X) (YZ + YZ)
= Z(Y+Y)
=Z
(0)X XY XY (0)X
0 1 0 1
(1)X XY XY (1)X
2 3 2 3
(a) (a)
Observe carefully above given K-map. See the binary numbers at the top
of K-map. These do not follow binary progression, instead they differ by only one
place when moving from left to right : 00, 01, 11, 10. It is done so that only one
variable changes from complemented to un complemented form or vice versa.
The terms are A B . A B, AB, A B
This binary code 00, 01, 11, 10 is called Gray code. Gray Code is the
binary code in which each successive number differs only in one place. That is
why box numbering scheme follows above order only.
How to Map in K-Map?
We’ll take an example of 2 variable map to be illustrated, with the following
truth table for mapping (Table 1.38)
Table
A B F
0 0 0
0 1 0
1 0 1
1 1 1
Canonical S-O-P expression for this table is F=AB + AB or F = (2,3).
To map this function first we’ll draw an empty 2-variable K-map as shown in Fig.
1.8(a)
Boolean Algebra
(00)WX 1 0 0 0 (00)WX 1 0 0 0
0 1 3 2 0 1 3 2
(01)WX 1 0 0 0 (01)WX 1 0 1 1
4 5 7 6 4 5 7 6
(11)WX 0 0 1 1 (11)WX 1 0 1 1
12 13 15 14 12 13 15 14
(10)WX 0 0 0 0 (10)WX 1 0 0 0
8 9 11 10 8 9 11 10
0 0 0 0
(00) WX
0 1 3 2
(01) WX 0 0 0 0
4 5 7 6
(11)WX 1 1 1 1
12 13 15 14
(10) WX 1 1 1 1
8 9 11 10
While moving horizontally in the octet two variables Y and Z are removed
and moving vertically one variable x is removed. Thus eliminating X, Y and Z, the
reduced expression for the octet is W only.
Octet Reduction Rule
Remove the three variables which change their states. An octet removes 3-
variables. But after marking pairs, quads and octets, there are certain other things
to be taken care of before arriving at the final expression. These are map rolling,
overlapping groups and redundant groups.
Map Rolling
Map Rolling means roll the map i.e., consider the map as if its left edges are
touching the right edges and top edges are touching the bottom edges. This is a
special property of Karnaugh maps that its opposite edges squares and corner
squares are considered contiguous (Just as the world map is treated contiguous
at its opposite ends). As in opposite edges squares and in corner squares only one
variable changes its state from complemented to uncomplemented state or vice
versa. Therefore, while making the pairs, quads and octets, map must be rolled.
Following pairs, quads and octets are marking after rolling the map.
Boolean Algebra
1 1 1
(00)AB (00)AB
0 1 3 2 0 1 3 2
(01)AB 1 1 (01)AB 1 1
4 5 7 6 4 5 7 6
(11)AB (11)AB 1 1
12 13 15 14 12 13 15 14
(10)AB (10)AB
1 1
8 9 1 11 10 8 9 11 10
ABD+BCD BD+BD
Overlapping Groups
Overlapping means same 1 can be encircled more than once. For example,
if the following K-map is given:
(00) AB
0 1 3 2
(01) AB 1 1 1
4 5 7 6
(11) AB
1 1
12 13 15 14
(10) AB 1
8 9 11 10
Observe that 1 for m7 has been encircled twice. Once for Pair-1(m5+m7)
and again for Quad (m7+m6+m15+m14). Also 1 for m14 has been encircled twice.
For the Quad and for Pair-2 (m14+m10).
Here, reduced expression for Pair-1 is ABD
Reduced expression for Quad is BC
Reduced expression for Pair-2 is ACD
Thus final reduced expression for this map is ABD + BC + ACD
Boolean Algebra
Thus reduced expression for entire K-map is sum of all reduced expressions
in the very K-map.
But before writing the final expression we must take care of redundant
Groups.
Redundant Groups
Reduntant group is a group whose all 1’s are overlapped by other groups
(i.e., pairs, quads, octets). Here is an example, given below.
(00) AB (00)AB
0 1 3 2 0 1 3 2
(01) AB 1 1 (01)AB 1 1
4 5 7 6 4 5 7 6
(11) AB 1 1 (11)AB 1 1
12 13 15 14 12 13 15 14
(10) AB (10)AB
8 9 11 10 8 9 11 10
Fig. 1.14(a) has a redundant group. There are three pairs : Pair-1 (m4+m5),
Pair-2 (m5+m13), Pair-3 (m13+m15). But Pair-2 is a redundant group as its all 1’s
are marked by other groups.
With this reduntant group, the reduced expression will be ABC+BD+ABD.
For a simpler expression, Redundant Groups must be removed. After removing
the redundant group, we get the K-map shown in fig. 1.14 (b).
The reduced expression, for K-map in fig. 1.14 (b), will be
ABC + ABD
Which is much simpler expression .
Thus removal of redundant group leads to much simpler expression.
3. Map the given function by entering 1’s for the outputs as 1 in the
corresponding squares.
4. Enter 0’s in all left out empty squares.
5. Encircle adjacent 1’s in form of octets, quads and pairs. Do not forget to
roll the map and overlap.
6. Remove redundant groups, if any.
7. Write the reduced expressions for all the groups and OR (+) them.
Example 1.33 Reduce F (a, b, c, d) = m (0,2,7,8,10,15) using Karnaugh map.
Solution: Given F (a, b, c, d) = m (0,2,7,8,10,15)
= m0 + m2 + m7 + m8 + m10 + m15
m0 = 0000 = A B C D m2 = 0010 = A B C D
m7 = 0111 = A B C D m8 = 1000 = A B C D
m10 = 1010 = A B C D m15 = 1111 = A B C D
Truth table for the given Mapping the given function in a K-map
function is as follows : we get
A B C D F
0 0 0 0 1
0 0 0 1 (00)CD (01)CD (11)CD (10)CD
0 0 1 0 1
(00)AB 1 0 0 1
0 0 1 1
0 1 3 2
0 1 0 0
(01) 0 1 0 1 AB 0 0 1 0
0 1 1 0 4 5 7 6
0 1 1 1 1
(11) AB
1 0 0 0 1 0 0 1 0
1 0 0 1 12 13 15 14
(10)
1 0 1 0 1 AB
1 0 1 1 1 0 1 1
8 9 11 10
1 1 0 0
1 1 0 1
1 1 1 0
1 1 1 1 1
In the above K-map two groups have been marked, one Pair and One Quad.
Pair is m7 + m15
Boolean Algebra
(11)AB 1 1 1 1
12 13 15 14
(10)AB
0 1 1 1
8 9 11 10
Reduced expression for pair-1 (m7 + m15) is BCD, as ABCD (m7) changes to
ABCD (m15) eliminating A.
Reduced expression for Quad-1 (m12 + m13 + m14) is AB, as while moving
across the Quad, C and D both are removed because both are changing their
states from complemented to uncomplemented or vice-versa.
Reduced expression for Quad 2 (m13 + m15+m9 +m11) is AD, as moving
horizontally, C is removed and moving vertically, B is removed.
Reduced expression of Quad-3 (m15 + m11 +m14 + m10) is AC as horizontal
movement removes D and vertical movement removes B.
Thus, Pair-1 = BCD, Quad-1 = AB, Quad-2 = AD, Quad-3 = AC
Hence final reduced expression will be BCD+AB+AD+AC.
Example: Obtain a simplified expression for a Boolean function F (X, Y,
A) the Karnaugh map for which is given below:
Boolean Algebra
[1] [1]
[0]
0 1 3 2
(c)
12 13 15
14 0
(10)WX 1 0 0
Boolean Algebra
(0) 1 1
(1) 1 1
(d)
Solution: Completing the given K- map, we get one group which is a Quad has
been marked.
Quad reduces two variables.
Moving horizontally, Z is removed as it (00)YZ (01)YZ (11)YZ (10)YZ
changes from Z to Z and moving
(0)X 0 0 1 1
vertically, X is removed as it changes 0 1 3 2
from X to X. Thus only one variable Y
(1)X 0 0 1 1
is left. Hence Reduced S-O-P 4 5 7 6
expression is Y. Thus F=Y assuming F
is the given function.
(0) X (0) X (X + Y) (X + Y)
0 1 0 1
(1) X (1) X (X + Y) (X + Y)
2 3 2 3
(a) (b)
4 5 7 6 4 5 7 6
(c) (d)
[10] W+X W + X + Y + Z W + X + Y + Z W + X + Y + Z W + X + Y + Z
8 9 11 10
(f)
4 varible K–Map representing Minterms
Figure: 2,3,4 variable K-Maps of POS expression.
Boolean Algebra
(0) 0 0 0 1
(1) 0 1 1 1
Solution: To reach at POS expression, we’ll have to encircle all possible groups
of adjacent 0’s encircling we get the following K-map.
Boolean Algebra
[0]A 0 0 0
0 1 3 2
[1]A
0 0 0
4 5 7 6
Pair1: M0 . M1;
Pair 2: M0 .M4;
Pair 3: M1 . M3;
But there is one redundant group also i.e., Pair-1 (it’s all 0’s are encircled
by other groups). Thus removing this redundant pair-1, we have only two groups
now.
Reduced POS expression for Pair-2 is (B+C), as while moving across pair-2,
A changes its state from A to A, thus A is removed.
Reduced POS expression for Pair 3 is (A+C), as while moving across Pair 3
B changes to B, hence eliminated.
Final POS expression will be (B+C).(A+C)
Example: Find the minimum POS expression of
Y(A, B, C, D) = (0, 1, 3, 5, 6, 7 10, 14, 15).
Solution: As the given function is 4 variable function, we’ll draw 4 variable K-
Map and then put 0’s for the given Maxterms. i.e., in the squares whose numbers
are 0, 1, 3, 5, 6, 7, 10, 14, 15 as each square number represents its Maxterm.
So, K-map will be
(00)C+D (01)C+D (11)C+D (10)C+D
(00)A+B 0 0 0 1
0 1 3 2
(01)A+B 1 0 0 0
4 5 7 6
(11)A+B 1 1 0 0
12 13 15 14
(10)A+B 1 1 1 0
8 9 11 10
Boolean Algebra
LOGIC GATES
Introduction
After Shannon applied Boolean algebra in telephone switching circuits,
engineers realized that Boolean algebra could be applied to computer electronics
as well.
In the computers, these Boolean operations are performed by logic gates.
An Inverter is a gate with only one input signal and one output
signal; the output state is always the opposite of the input state.
X X
X X
X X
0 1
Low High
1 0
High Low
A low input i.e., 0 produces high output i.e., 1 and vice versa. NOT operation
is symbolized as or i.e., NOT X is written as X1 or X.
OR Gate
The OR gate has two or more input signals but only one output signal. If
one or more input signals are 1 (high), the output signal is 1 (high).
An OR gate can have as many inputs as desired. No matter how many
inputs are there, the action of OR gate is the same.
The OR gate has two or more input signals but only one output
signal. If any of the input signals is 1 (high), the output signal is 1
(high).
A A A
F B F B F
B C
C D
The AND Gate can have two or more input signals and produce one
output signal. When all the inputs are high then the output is
high. Otherwise, the output is low.
X Y F=X.Y
0 0 0
0 1 0
1 0 0
1 1 1
Table 3.5: 2- input AND gate
X Y Z F=X.Y.Z
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
A A
A
F B F B
B F
C
C D
The NOR gate has two or more input signals but only one output
signal. If all the inputs are 0 (low), then the output signal is 1
(high).
X Y F = X+Y
0 0 1
0 1 0
1 0 0
1 1 0
Table 3.7: 2-input NOR gate
X Y Z F=X+Y+Z
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 0
(a)
The NAND Gate has two or more input signals but only one output
signal. If all of the inputs are 1 (high), then the output produced is
0 (low).
NAND action is illustrated in following Truth Tables (2.9 and 2.10)
X Y F = XY
X Y Z F = XYZ
0 0 1
0 0 0 1
0 1 1
0 0 1 1
1 0 1
0 1 0 1
1 1 0 0 1 1 1
1 0 0 1
Table 3.9: Truth table of 2-input NAND gate 1 0 1 1
1 1 0 1
1 1 1 0
Table 3.10 Truth table of 3-input NAND gate
In Boolean algebra, sign stands for XOR operation. Thus, A XOR B can
be written as AB.
Following Truth Tables (2.11 and 2.12) illustrates XOR operation.
No. of 1’s X Y Z F
Even 0 0 0 0
Odd 0 0 1 1
Odd 0 1 0 1
Even 0 1 1 0
Odd 1 0 0 1
Even 1 0 1 0
Even 1 1 0 0
Odd 1 1 1 1
No. of 1’s X Y Z F
Even 0 0 0 1
Odd 0 0 1 0
Odd 0 1 0 0
Even 0 1 1 1
Odd 1 0 0 0
Even 1 0 1 1
Even 1 1 0 1
Odd 1 1 1 0
Circuit diagrams
Boolean algebra is useless unless it can be translated into hardware, in
the form of gates. This translation of Boolean algebra in the gates’ form is known
as logic circuits. A logic circuit can be represented diagrammatically using the
traditional symbols of gates. Let us see how this is done, in the following
examples.
Example 2.1: Design a circuit to realize the following:
F(A, B, C) = AB + AC + BAC
Solution: The given Boolean expression can also be written as follows
F(A, B, C) = A . B + A . C + B . A . C
or F(A, B, C) = (A AND B) OR (A AND (NOT C)) OR ((NOT B) AND (NOT A) AND C)
Now these logical operators can easily be implemented in form of logic
gates. Thus circuit diagram for above expression will be as follows:
A AB
B
A AC F
C
AB+AC+BAC
B BAC
A
C
Example 2.2 Draw the diagram of digital circuit for the function:
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)
Thus circuit diagram will be
Logic gates
X X+Y
Y
X X+Z F
Z
(X+Y).(X+Z).(Y+Z)
Y Y+Z
Z
Universal gate is a gate using which all the basic gates can be
designed. NAND and NOR gates are called as the universal gates.
NAND–to-NOT logic
Not Operation
X X
NOT X = X NAND X
= X.X {De Morgan's Second Theorem}
=X+X {De Morgan's Second Theorem}
=X
NAND–to-AND logic
AND and OR operations from NAND gates are shown below:
Logic gates
AND operation
X X.Y X.Y
Y
X+Y
Y
Y.Y
X X
Y Y
Z Z
=
Z XYZ+ZX XYZ+ZX
Z
X X
Example: Draw the diagram of a digital circuit for the function F(X, Y,
Z) = YZ + XZ using NAND gates only.
Solution : F(X, Y, Z) = YZ + XZ can be written as
= (Y NAND Z) NAND (X NAND Z)
Thus logic circuit diagram is
Y
Z Y.Z
X.Z YZ+ZX
X
Z
Example 2.4: Draw the diagram of digital circuit:
F (A, B, C) = AB + BC + CD using NAND-to-NAND logic.
Solution: F(A, B, C) = AB + BC + CD
= (A NAND B) NAND (B NAND C) NAND (C NAND D)
Logic gates
Thus logic circuit is
A A.B
B
B B.C
C AB+BC+CD
C C.D
D
A
B
C
ABC+CB
C
B
NOR-to-NOT logic
NOT, AND and OR operations can be implemented in NOR-to-NOR form
as shown on below.
A A
NOT X = X NOR X
= X+X
= X.X
=X
Logic gates
NOR to OR Operation
A + B = (A NOR B) NOR (A NOR B)
A A+B
A+B
B
A
A
A.B
B
B
A A.B
B
B B.C
C AB+BC+CD
C C.D
D