Combinational Logic-1: SJB Institute of Technology
Combinational Logic-1: SJB Institute of Technology
MODULE 1
ELECTRONICS AND
COMMINICATIONS
ENGINEERING
dr ravi kumar a v
SJB
I N S T I T U T E O F T E C H N O LO G Y
CHAPTER 1
Principles of Combination Logic
Definition of combinational logic, canonical forms, Generation of switching equations from truth tables, Karnaugh maps-3,4,5 variables, Incompletely specified
functions( Don’t care terms) Simplifying Max term equations, Quine-McCluskey minimization technique, Quine- McCluskey using don’t care terms, Reduced
prime implicants Tables.
1
SECTION 1
Combinational logic
2
. Combinational Circuits
Logic circuit can be classified into two types. Combinational circuit, which
consists of logic gates whose outputs at any time are determined by combining
the values of the applied inputs using logic operations, and sequential circuits,
which will be studied later.
In combinational circuits, the output at any time is a direct function of the
applied external inputs. In other words,
Z = F(X)
3
• Number of gates used.
1. Example
Design a combinational circuit which has 3-bit input number
and a single output (F). The output signal F is specified as
follows:
• F = 0 otherwise.
4
• The inputs to the circuit provide the bit combination belonging to
the first code, while the outputs constitute the corresponding
combination belonging to the second code Interactive 1.1 combinational logic circuit
Figure
shows the general structure of a code converter, containing the
inputs, the code converter circuit, and the outputs. Consider, for
example, a binary BCD to Excess-3 code converter
5
SECTION 2
6
1 !Consider a system of 3 input signals (variables) x, y, & z.
6 !Accordingly, the minterm is referred to as m0.
• !A minterm = 0 at all input combinations except one where the
minterm = 1.
7 !Ingeneral, minterms are designated mi, where i corresponds
the input combination at which this minterm is equal to 1.
MaxTerms
7
• !With 3-input variables, the system under consideration has a total • For n-input variables, the number of Maxterms = the total number
of 8 Maxterms, namely:
of possible input combinations = 2n.
In general,
8
OR-ing of the indicated minterms. Thus, F = ∑(2, 4, 5, 7) = (m2 +
m4 + m5 + m7)
• ThisislogicalsinceF=1,onlyatinputcombinationsi=2,4,5and7
• TheresultingexpressioniscommonlyreferredtoastheSUMofminterm
sand is typically expressed as F = ∑(2, 4, 5, 7), where ∑ indicates
9
Conclusions: Since the system has 4 input variables (a, b, c & d)---> The number
of minterms and Maxterms = 24= 16
• Any function can be expressed both as a sum of minterms (∑
mi) and as a product of maxterms. The product of maxterms
expression (∏ Mj) expression of F contains all maxterms Mj F (a, b, c, d) = ∑(0, 1, 2, 4, 5, 7)
(∀ j ≠ i) that do not appear in the sum of minterms expression
of F.
10
• A minterm is a special case of a product term where all input • The first level consists of a number of AND gates which equals
variables appear in the product term either in the true or the number of product terms in the expression. Each AND gate
complement form.
implements one of the product terms in the expression.
• The SOP and POS forms are Standard forms for representing
Boolean functions.
11
12
SECTION 3
K-Map
13
The map provides the same information contained in a Truth Table
but in a different format.
The objectives of this lesson are to learn:
1. How to build a 2, 3, or 4 variables K-map.
2. How to obtain a minimized SOP function using K-maps.
For example, the top left square corresponds to input combination
Code Distance: AB=00. In other words, this square represents minterm m0.
14
is true.
F=m2 +m3 =AB’+AB=A(B’+B)=A
Step 3: Form as big group of adjacent 1-squares as possible. There
are some rules for this which you will learn with bigger maps. To understand how combining squares simplifies Boolean functions,
the basic property possessed by the adjacent squares must be
Step 4: Find the common literals for each group and write the recognized.
simplified expression in SOP.
In the above example, the two 1-squares are adjacent with the same
Example: value for variable A (A=1) but different values for variable B (one
square has B=0, while the other has B=1).
Consider the given truth table of two variable function. Obtain the
simplified function using K-map. This reduction is possible since both squares are adjacent and the net
expression is that of the common variable (A).
Generally, this is true for any 2 codes of Hamming distance 1
(adjacent). For an n- variable K-map, let the codes of two adjacent
squares (distance of 1) have the same value for all variables except
the ith variable. Thus,
15
F = ∑ (1, 2, 3)
In this example:
F=m1 +m2 +m3 =m1 +m2 +(m3 +m3) F=(m1 +m3)+(m2 +m3)=A+B
Examples of non-adjacent squares are shown below:
Rule: A 1-square can be member of more than one group.
If we exchange the places of A and B, then minterm positions will
also change. Thus,
m1 and m2 will be exchanged as well.
Three-Variable K-Maps:
There are eight minterms for a Boolean function with three-variables.
Hence, a three- variable map consists of 8 squares.
In an n-variable map each square is adjacent to “n” other squares,
e.g., in a 2-variable map each square is adjacent to two other squares
as shown below:
16
Likewise, all entries of the first column correspond to input variable In the figure of 3-variable map, m0 is adjacent to m2 and m4 is
B = 0, C = 0, all entries of the second column correspond to input adjacent to m6 because the minterms differ by only one variable. This
variable B = 0, C = 1, all entries of the third column correspond to can be verified algebraically:
input variable B = 1, C = 1, while entries of the fourth column m0 +m2=A’B’C’+A’BC’=A’C’(B’+B)=A’C’
correspond to B=1, C = 0. m4 +m6=AB’C’+ABC’=AC’(B’+B)=AC’
To maintain adjacent columns physically adjacent on the map, the
column coordinates do not follow the binary count sequence. This
choice yields unit distance between codes of one column to the next
(00 – 01—11 – 10), like Grey Code.
There are cases where two squares in the map are considered to be Four-Variable K-Maps:
adjacent even though they do not physically touch each other.
17
There are 16 minterms for a Boolean function with four-variables. Lesson Objectives:
Hence, four- variable map consists of 16 squares.
In this lesson you will learn:
1. The difference between prime implicants and essential prime
implicants.
2. How to get a minimized POS function using a K-map.
3. How to minimize a combinational circuit that is not completely
specified (has don't care conditions).
4. How to make a 5 and 6 variable K-map given a truth table or a
SOP representation.
Notes:
Definitions/Notations:
1. Each square is adjacent to 4 other squares.
A product term of a function is said to be an implicant.
2. One square is represented by a minterm (a product of all A Prime Implicant (PI) is a product term obtained by combining the
4-literals). maximum
3. Combining 2 squares drops 1-literal. possible number of adjacent 1-squares in the map.
If a minterm is covered only by one prime implicant then this prime
4. Combining 4 squares drops 2-literals. implicant is said
Rule: The combination of squares that can be chosen during the Examples: (see authorware version)
simplification process in the n-variable map are as follows:
A group of 2n squares produces a function that always equal to logic
POS Simplification:
1.
Until now we have derived simplified Boolean functions from the
A group of 2n-1 squares represents a product term of one literal. maps in SOP form. Procedure for deriving simplified Boolean
functions POS is slightly different. Instead of making groups of 1’s,
A group of 2n-2 squares represents a product term of two literals and make the groups of 0’s.
so on. One square represents a minterm of n literals.
Since the simplified expression obtained by making group of 1’s of
K-Map 2 the function (say F) is always in SOP form. Then the simplified
18
function obtained by making group of 0’s of the function will be the There are 32 minterms for a Boolean function with five-variables.
complement of the function (i.e., F’) in SOP form. Hence, Five- variable map consists of 32 squares.
Applying DeMorgan’s theorem to F’ (in SOP) will give F in POS It consists of 2 four-variable maps. Variable A distinguishes between
form. the two maps, as indicated on the top of the diagram. The left-hand
four-variable map represents the 16 squares where A=0, and the other
four-variable map represents the squares where A=1.
Don’t Care Conditions: Minterms 0 through 15 belong to the four-variable map with A=0 and
minterms 16 through 31 belong to the four-variable map with A=1.
In some cases, the function is not specified for certain combinations
of input variables as 1 or 0.
There are two cases in which it occurs:
1. The input combination never occurs.
2. The input combination occurs but we do not care what the outputs
are in response to these inputs.
In both cases, the outputs are called as unspecified and the functions
having them are called as incompletely specified functions. Each four-variable map retains the previously defined adjacency
when taken separately. In addition, each square in the A=0 map is
In most applications, we simply do not care what value is assumed adjacent to the corresponding square in the A=1 map. For example,
by the function for unspecified minterms. minterm 4 is adjacent to minterm 20 and minterm 15 to 31.
Unspecified minterms of a function are called as don’t care The best way to visualize this new rule for adjacent squares is to
conditions. They provide further simplification of the function, and consider the two half maps as being one on top of the other. Any two
they are denoted by X’s to distinguish them from 1’s and 0’s. squares that fall one over the other are considered adjacent.
In choosing adjacent squares to simplify the function in a map, the
Six-Variable K-Maps:
don’t care minterms can be assumed either 1 or 0, depending on
which combination gives the simplest expression. There are 64 minterms for a Boolean function with six-variables.
Hence, Six-variable map consists of 64 squares.
A don’t care minterm need not be chosen at all if it does not
contribute to produce a larger implicant. By following the procedure used for the five-variable map, it is
possible to construct a six-variable map with 4 four-variable maps to
Five-Variable K-Maps: obtain the required 64 squares.
19
Movie 1.1 k map simplification
A. F= Sum m(1,3,4,7)
B. F= Sum m(1,3,5,6)
C. F= Sum m(3,4,5,6)
D. F= Prd M(1,3,4,7)
E. F= Prd M(1,3,5,6)
Check Answer
20
SECTION 4
21
have their dashes in the same relative positions and if they differ in exactly one bit
position. wxyz
8. The process terminates when no new list is formed .
9. All terms without check marks are prime implicants.
(0, 2, 8, 10) __ 0 __ 0
(0, 4, 8,12 ) __ __ 0 0(index 0)
Example: Find all the prime implicants of the function (8,10,12,14) 1__ __ 0 (index 1)
0 wxyz 0000 0
2 wxyz 0010 1 PETRICK’S METHOD OF DETERMINING IRREDUNDANT EXPRESSIONS
3 wxyz 0011 2 FIND THE PRIME IMPLICANTS AND IRREDUNDANT EXPRESSION
4 wxyz 0100 1
8 wxyz 1000 1 F(W,X,Y,Z)= áîM(0,1,2,5,7,8,9,10,13,15)
10 wxyz 1010 2 A=X Y , B= X Z C= Y Z D= X Z
12 wxyz 1100 2
13 wxyz 1101 3 P = (A+B)(A+C) (B)(C+D)(D)(A+B)(A+C)(B)(C+D)(D)
14 wxyz 1110 3
P = (A +C)(BD) = ABD +BCD
F1(W,X,Y,Z)= ABD =X Y +X Z +X Z
F2(W,X,Y,Z) = BCD = X Z + Y Z +X Z
Step 2: List the minterm in increasing order of their index.
No. wxyz index
DECIMAL METHOD FOR OBTAINING PRIME IMPLICANTS
0 0000 Index 0
2 0010 The prime implicants can be obtained for decimal number represented minterms.In this
4 0100 Index 1 procedure binary number are not used to find out prime implicants
8 1000
3 0011 f(w, x,y,z) =áîm(0,5,6,7,9,10,13,14,15)
10 1010 Index 2 fsop= xy +xz+xyz+wyz+w x y z
12 1100
13 1101 MAP ENTERED VARIABLE(MEV)
14 1110 Index 3
It is graphical approach using k-map to have a variable of order n. Where in we are using
a K-map of n-1 variable while map is entered with ouput function and variable.
Wxyz index f(w,x,y.z) = áîm(2,3,4,5,13,15) +dc(8,9,10,11)
Ans.fsop= w z +x y + w x y
22
Interactive 1.2 k map
• karnaugh mapping is the best manual technique for boolean equation simplification,
yet when the map sizes exceed five or six variable unwidely.
• the technique called “map entered variables “ ( mevs ) increases the effective size
of a karnaugh maps, allowing a smaller map to handle a greater no. of variables
• the map dimension and the no. of problem variables are related by 2n = m, where
n = no.of problem variable, m = no. of squares in k-maps. mev k-maps permit a cell
to contain a single (x) or a complete switching expression, in addition to the 1s, 0s
and don’t care terms.
23
Basic gate
The output depends not only the input but also present state.