Boolean Algebra and Logic Circuits
Boolean Algebra and Logic Circuits
I.logic Circuits
Understand and define the functions of : not , and ,or ,nand , nor xor ,xnor
including the binary output produced from all the possible binary input ,
construct the truth table for each of the logic gates above .
Construct a logic circuit from either :
-a problem statement
- a logic expression
-a truth table
INPUT TABLE: A B
for 2 inputs
0 0
0 1
1 0
1 1
For logic gates the number of inputs can be more than 2
For three input we have those possible combinations (2 to the power of 3=8)
A B C
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
A B C D
0 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 0 0 0
1 0 0 1
1 0 1 0
1 0 1 1
1 1 0 0
1 1 0 1
1 1 1 0
1 1 1 1
INPUT OUTPUT
I F
0 1
1 0
2) AND Gate
F=A.B
A B F
0 0 0
0 1 0
1 0 0
1 1 1
3) NAND Gate
F= ‘(A.B)
INPUT1 INPUT2 OUTPUT
A B F
0 0 1
0 1 1
1 0 1
1 1 0
4) OR Gate
F= A+B
A B F
0 0 0
0 1 1
1 0 1
1 1 1
5) NOR Gate
F= ‘(A+B)
A B F
0 0 1
0 1 0
1 0 0
1 1 0
6) XOR Gate
F=A ⊕B
A B F
0 0 0
0 1 1
1 0 1
1 1 0
7) XNOR Gate
A B F
0 0 1
0 1 0
1 0 0
1 1 1
Example 1 :
Produce a truth table from the logic circuit below:
There are three inputs to this logic circuit therefore there are 8 possible binary values
which can be considered as inputs , to show step-wise how the TT is produced the
logic circuit is split up into three parts and intermediate values as shown as P Q and R
Circuit 1 Circuit 2 Circuit 3
A B C as inputs PQ as outputs PQ as in / R as O RC as in / X as O
0 0 0 0 1 1 1
0 0 1 0 0 0 1
0 1 0 0 0 0 0
0 1 1 0 0 0 1
1 0 0 0 1 1 1
1 0 1 0 0 0 1
1 1 0 1 0 1 1
1 1 1 1 0 1 0
Example 2 :
A safety system uses three inputs to a logic circuit . An alarm X sound if input A is
activated and input B is deactivated or if input B is activated and input C is
deactivated
Produce the logic circuit and the TT to show the conditions which cause the output X
to be 1 .
The first thing to do is to write the logic statement representing the scenario in this
example ,to do this it is necessary to recall that ON =1 and OFF =0
-A is ON AND B is OFF
-B is ON AND C is OFF
The two parts are connected by an OR gate
This statement can be written as follows :X= (A.’B)+(B.’C )
Truth tables :
A B C A.’B B.’C X
0 0 0 0 0 0
0 0 1 0 0 0
0 1 0 0 1 1
0 1 1 0 0 0
1 0 0 1 0 1
1 0 1 1 0 1
1 1 0 0 1 1
1 1 1 0 0 0
II. Boolean Algebra
1) The Properties of Boolean Algebra:
The Boolean Algebra uses sets of rules for analyzing digital gates and circuits
which are known as Laws or properties of Boolean Algebra. These laws or
properties help to simplify complex Boolean expressions by reducing the number
of logic gates required for a given operation.
A. Annulment law
A.0 = 0
A+1=1
B. Identity law
In this law variable remains unchanged it is ORed with ‘0’ or ANDed with ‘1’, i.e:
A.1 = A
A+0=A
C.Idempotent law
A.A = A
D.Complement law
A + A’ = 1
A.A’ = 0
A variable with two negations, its symbol gets canceled out and original variable is
obtained, i.e.,
((A)’)’=A
F.Commutative law
A+B=B+A
A.B = B.A
G.Associative law
The order of operation does not matter if the priority of variables are the same like ‘*’
and ‘/’, i.e:
A+(B+C) = (A+B)+C
A.(B.C) = (A.B).C
H.Distributive law
A.(B+C) = (A.B)+(A.C)
(A+B)(A+C) = A + BC
I.Absorption law
X.(X+Y)=X
X+XY=X
(A.B)’ = A’ + B’
(A+B)’ = A’.B’
Q.Consensus theorem
AB + A’C + BC = AB + A’C
2)Canonical form of an expression :
An expanded form of Boolean expression, where each term contains all Boolean
variables in their true or complemented form, is also known as the canonical form
of the expression. As an illustration, f(A.B,C) =A’.B’.C’+A’.B’.C+A.B.C is a
Boolean function of three variables expressed in canonical form. This function
after simplification reduces to A’.B’+ A.B.C and loses its canonical form.
Different terms are obtained by taking the sum of the corresponding literals. Here
'0' and '1' respectively mean the un-complemented and complemented variables,
unlike sum-of products expressions where '0' and '1' respectively mean
complemented and uncomplemented variables.Since each term in the case of the
product-of-sums expression is going to be the sum of literals,this implies that it is
going to be implemented using an OR operation. Now, an OR gate produces a logic
'0' only when all its inputs are in the logic '0' state, which means that the first term
corresponding to the second row of the truth table will be A+B+C. The
product-of-sums Boolean expression for this truth table is given by transforming
the given product-of-sums expression into an equivalent sum-of-products
expression is a straightforward process. Multiplying out the given equivalent
sum-of-products expression is a straightforward process. Multiplying out the given
expression and carrying out the obvious simplification provides the equivalent
sum-of-products expression:
F(x,y)=(x'+y).(x+y')
Sum of Products expression :
A given sum-of-products expression can be transformed into an equivalent
product-of sums expression by (a) taking the dual of the given expression, (b)
multiplying out different terms to get the sum-of products form, (c) removing
redundancy and (d) taking a dual to get the equivalent product-of-sums expression.
As an illustration, let us find the equivalent product of sums expression of the
sum-of products expression
(A.B)+(A'.B')=A.A’+A.B’+B.A’+B.B’=0+A.B’+B.A’+0 = A.B’+B.A’
A B C F
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
3)Karnaugh Map :
Karnaugh maps reduce logic functions more quickly and easily compared to
Boolean algebra. By reduce we mean simplify, reducing the number of gates and
inputs. We like to simplify logic to a lowest cost form to save costs by elimination
of components. We define lowest cost as being the lowest number of gates with the
lowest number of inputs per gate. A Karnaugh map is a graphical representation of
the logic system. It can be drawn directly from either minterm (sum-of-products)
or maxterm (product-of-sums) Boolean expressions. Drawing a Karnaugh map
from the truth table involves an additional step of writing the minterm or maxterm
expression depending upon whether it is desired to have a minimized sum-of
products or a minimized product-of-sums expression.
Construction of a Karnaugh Map:
An n-variable Karnaugh map has 2n squares, and each possible input is allotted a
square. In the case of a minterm Karnaugh map, ‘1’ is placed in all those squares
for which the output is ‘1’ and ‘0’ is placed in all those squares for which the
output is ‘0’. 0s are omitted for simplicity. An ‘X‘ is placed in squares
corresponding to ‘don‘t care conditions. In the case of a maxterm Karnaugh map, a
‘0’ is placed in all those squares for which the output is ‘0’, and a ‘1’ is placed for
input entries corresponding to a ‘1’ output. 1s are omitted for simplicity, and an ‘X‘
is placed in squares corresponding to ‘don’t care’ conditions. The choice of terms
identifying different rows and columns of a Karnaugh map is not unique for a
given number of variables. The only condition to be satisfied is that the designation
of adjacent rows and adjacent columns should be the same except for one of the
literals being complemented. Also, the extreme rows and extreme columns are
considered adjacent. Some of the possible designation styles for two, three and
four variable minterm Karnaugh maps are shown in the figure below. The style of
row identification need not be the same as that of column identification as long as
it meets the basic requirement with respect to adjacent terms. It is, however,
accepted practice to adopt a uniform style of row and column identification. Also,
the style shown in the figure below is more commonly used. A similar discussion
applies for maxterms Karnaugh maps. Having drawn the Karnaugh map, the next
step is to form groups of 1s as per the following guidelines: