Module 1
COMBINATIONAL LOGIC
Definition of Combinational Logic
• A combinational circuit is the digital logic circuit in which the output
depends on the combination of inputs at that point of time with total
disregard to the past state of the inputs.
• In a combinational circuit, the output variables are at all times dependent on
the combination of input variables.
• Combinational logic deals with techniques of “combining” basic gates
into circuits that perform some desired functions.
Ex. Adder, Subtractor, Encoder, Decoder
General logic design sequence
The first task is to define the problem to be solved.
The problem is then "rewritten" in the form of a truth table.
From the truth table, the Boolean equation can be written and simplified and the
logic circuit is obtained.
The logic circuit is then realized using any one of the three-main digital
integrated circuit families: transistor- transistor logic (TTL), emitter coupled
logic (ECL), or complementary metal-oxide silicon (CMOS).
Steps for converting a verbal problem
statement to a truth table
1. Determine the input variables and output variables that are involved.
2. Assign mnemonic/letter symbols to each variable.
3. Determine the size of the truth table; how many input combinations
exist:
2x= y
where x = number of input variables and y = number of combinations.
4. Construct a truth table containing all of the input variable combinations.
5. By careful reading of the problem statement determine the combinations of
inputs that cause a given output to be true. For the remaining conditions
output will be false.
Example 1
A combinational logic circuit with three input variables that will produce a logic 1 output when
more than one input variables are logic 1. Derive the truth table.
Solution: Given problem specifies that there are three input variables and one output variable. We
assign A, B and C letter symbols to three input variables and assign Y letter symbol to one output
variable. The relationship between input variables and output variable can be tabulated as shown in
truth table. The truth table specifies the output state (either O or 1) for all possible combinations of
input variables A B C Y
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
Example 2
Two motors M2 and M1 are controlled by three sensors s3, s2, s1. One motor M2 is to run anytime all
three sensors are on. The other motor is to run, whenever sensors s2 or s1 but not both are on and s3 is off.
For all sensor combination, where M1 is on, M2 is to be off except when all the three sensors are off and
then both motors must remain off, construct the truth table and write the Boolean output equation.
Solution:
No. of input variables: 3; No. of output variables: 0
S3 S2 S1 M1 M2
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 0
1 0 0 0 0
1 0 1 0 0
1 1 0 0 0
1 1 1 0 1
Practice Problems
1. A single output variable Z is to be true when the input variable a and b are true
and when b is false but a and c are true.
2. An output is to be true when the value of the input is in the range decimal 3 to 5.
3. An automobile system is to be designed that will sound an alarm under certain
conditions.
• If the seat belt is not fastened and the engine is running.
• If the lights are left on when the key is not in the ignition.
• If the key is in the ignition, the engine is not running and drivers door is
opened.
Determine the number of inputs and outputs, assign names to the variables and
construct a truth table that describes the system.
Deriving Switching Equations
Literal: Boolean Variable X, A, Y, X`
Product Term: Logical AND product of multiple literals X, XY,
XY`
Sum Term: Logical OR of multiple literals X, X+Y, Y+X`
Sum of Products: X + XY + XY`
Product of Sums: X.(X+Y) (Y+X`)
Boolean expressions
Through our exercises in simplifying Boolean expressions, we
see that there are numerous ways of stating the same Boolean
expression. These “synonymous” forms are logically
equivalent. Logically equivalent expressions have identical
truth tables.
In order to eliminate as much confusion as possible, designers
express Boolean functions in standardized or canonical form.
Boolean expressions
There are two forms for Boolean expressions: sum-of-products and
product-of-sums.
Recall the Boolean product is the AND operation and the Boolean sum
is the OR operation.
In the sum-of-products form, ANDed variables are ORed together.
For example:
In the product-of-sums form, ORed variables are ANDed together:
For example:
Sum of Product Form
A SOP is a group of product terms ORed together. Each product term
consists of one or more literals. Some examples of this form are:
1. ABC +A
SOP is also known as disjunctive normal form.
Product of Sum Form
A POS is any group of sum terms ANDed together. Some examples of
this form are:
1. 𝐴(𝐵 + 𝐴 ) ( 𝐵 + 𝐶 )
2. ( 𝑃 + 𝑄 ) ( 𝑅 +S)
POS from is also known as conjunctive normal form.
Standard SOP and POS Forms
Consider the expression 𝐴 𝐵 + 𝐴 𝐵 𝐶 ҧ the first product term do not
contain literal
C. i.e all the individual terms do not involve all literals. If each term in SOP
form contains all the literals then the SOP form is known as standard or
canonical SOP form.
Each individual term in POS is called as maxterm.
Converting Expressions in Standard SOP or
POS Form
II. Steps to
I. Steps to Convert SOP to
Convert
Standard SOP
Identify the missing variable(s)
Identify the missing variable(s) in each POSin each OR
term.
AND term. to Standard
OR the missing term(s) and its complement
AND the missing term and its complement
POS
with the original OR term,
with the original AND term,
x + y' +zz'
xy (z + z').
Because zz' = 0, the original OR term value is
Because (z + z') = 1, the original AND term
not changed.
value is not changed.
Expand the term by application of distributive
Expand the term by application of the
property, (x + y' + z) (x + y' + z').
property of distribution, xyz + xyz'.
Practice Problems
1. G= f(w,x,y,z) = w`x + yz`
2. T= f(a,b,c,d) = (a + b`+ c)(a`+ d)
3. X=ab`+bc
4. T=pq`+ps
5. P=(w`+x)(y+z`)
6. U=r`+st +sr +s`t
7. R=L+M`L
Minterm and Maxterm
Lower case m is used to denotes a “minterm” and uppercase M is used to
denote “maxterm”.
For minterm 1 represents normal form, 0 represents complemented form
For maxterm 0 represents normal form, 1 represents complemented form
Generation of Switching Equations From
Truth Tables
Example 1: Write the algebraic form for the following Boolean Expression.
F (a, b, c) = ∑m (1,2,4,5)
F(a,b,c) = πM (0,3,5)
Solution:
1. F (a, b, c) = ∑m (1,2,4,5)
= m1 + m2+ m4 + m5
=a`b`c + a`bc` + ab`c` + ab`c
2. F(a,b,c) = πM (0,3,5)
=M0.M3.M5
=(a + b + c) (a + b` + c`) (a` + b + c`)
Example 1
Construct the truth table for the following Boolean Expression
F (a, b, c) = ∑m (0,1,2,5,6,7)
F(a,b,c,d) = πM (0,1,5,6,7,11,12,14,15)
1. F (a, b, c) = ∑m (0,1,2,5,6,7) 2. F(a,b,c,d) = πM (0,1,5,6,7,11,12,14,15)
a b c d f
a b c f 0 0 0 0 0
0 0 0 1 0
0 0 0 1
0 0 1 0 1
0 0 1 1
0 0 1 1 1
0 1 0 1 0 1 0 0 1
0 1 1 0 0 1 0 1 0
1 0 0 0 0 1 1 0 0
0 1 1 1 0
1 0 1 1
1 0 0 0 1
1 1 0 0
1 0 0 1 1
1 1 1 1 1 0 1 0 1
1 0 1 1 0
1 1 0 0 0
1 1 0 1 1
1 1 1 0 0
1 1 1 1 0
Example 2
Write the canonical minterm and maxterm expressions for the following table. M
is the output variable. a, b, m, s are the input variables
a b m s M
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 0
0 1 1 0 0
0 1 1 1 1
1 0 0 0 0
1 0 0 1 0
1 0 1 0 0
1 0 1 1 1
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 1
The minterm expression for the output variable, M, is ∑(7, 11,
15)
The maxterm expression for the output variable, M, is
Example 3
Express the following SOP equations in a minterm list (shorthand
decimal notation) form:
KARNAUGH MAP (K-Map)
KARNAUGH MAP (K-Map)
The Karnaugh map is a matrix of
squares. Each square represents a
minterm or maxterm from a Boolean
equation.
The Karnaugh map identifies all of
the cases for a given set of input
variables where groups of minterms
may contain redundant variables of
the form of x + x' = 1.
When these groups are identified, the
redundant variables can be eliminated,
resulting in a simplified output
function (abc + abc' = ab).
If a given switching equation contains
a minterm, then a 1 is entered into the
square that represents that term. A
Representation of truth table on K-map
Representing Standard SOP on K-Map
Example 1: Plot Boolean expression Y = A BC’+ A BC+ A’B’C on
the Karnaugh map
Example 2:
Representing Standard POS on K-Map
Grouping Cells for Simplification
Illegal Grouping
Generalized procedure to simplify Boolean expressions
• Plot the K-map and place ls in those cells corresponding to the ls in the truth table or
sum of product expression. Place 0s in other cells.
• Check the K-map for adjacent ls and encircle those 1s which are not adjacent to
any other l s. These are called isolated ls.
• Check for those ls which are adjacent to only one other 1 and encircle such
pairs.
• Check for quads and octets of adjacent ls even if it contains some
• ls that have already been encircled. While doing this make sure that there are
minimum number of groups.
• Combine any pairs necessary to include any l s that have not yet been grouped.
• Form the simplified expression by summing product terms of all the groups.
Example 1
Example 2
Step 1: Fig. (a) shows the K-map for four
variables and it is plotted according to the
given expression.
Step 2: Cell 2 is the only cell containing a 1
that is not adjacent to any other 1. It is
referred to separately as group 1.
Step 3: 1 in the cell 9 is adjacent only to 1 in
the cell 13. This pair is combined and
referred to as group 2.
Step 4: There is no octet, but there is quad
cells 4, 5, 12 and 13 form a quad. This quad
is combined and referred to as group 3.
Step 5 : All l s have already grouped.
Step 6: Each group generates a term in the
expression for Y. In group 1 variable is not
eliminated. In group 2 variable B is
eliminated and in group 3 variables A and
D are eliminated and we get,
Y = A`B`CD` + AC`D + BC`
Rules for Simplifying logic function using K-map
Group should not include any cell containing a zero.
2. The number of cells in a group must be a power of 2, such as 1, 2, 4, 8 or 16.
3. Group may be horizontal, vertical but not diagonal.
4. Cell containing 1 must be included in at least one group.
5. Groups may overlap.
6. Each group should be as large as possible to get maximum simplification.
7.Groups may be wrapped around the map. The leftmost cell in a row may be grouped with the
rightmost cell and the top cell in a column may be grouped with the bottom cell.
8. A cell may be grouped more than once. The only condition is that every group must
have at least one cell that does not belong to any other group. Otherwise, redundant terms will
result.
9.We need not group all don't care cells, only those that actually contribute to a maximum
simplification.
10. All above rules are stated considering the SOP simplification. In case of POS
simplification all rules are same except O (zero) takes place of 1 (one).
Example 3
Example 4
Example 5
Example 6
Essential Prime Implicants
After grouping the cells, the sum terms which appear in the K-map are called
prime implicant groups. It is observed that some cells may appear in only one
prime implicant group; while other cells may appear in more than one prime
implicant group.
ln the K-map shown above, cells 1, 4, 9 and 10 appear in only one prime
implicant group. These cells are called essential cells and corresponding prime
implicants are called essential prime implicants.
Note: In the following examples placing of MSB and LSB variables is
different
Example 8 Example 9
Incompletely Specified Functions (Don't Care Terms)
When an output value is known for every possible combination of input
variables, the function is said to be completely specified. However, when an
output value is not known for every combination of input variables, usually
because all combinations cannot occur, the function is said to be
incompletely specified.
This means that the truth table does not generate an output value
for every possible combination of input variables. The minterms or
maxterms that are not used as part of the output function are called don't care
terms.
Find the reduced SOP form of the following function.
f (A, B, C, D) = ∑ (1, 3, 7, 11, 15) + ∑ d (0, 2, 4).
Reduce the following function using Karnaugh map technique.
f (A, B, C, D) = ∑ (5, 6, 7, 12, 13) + ∑ d (4, 9, 14, 15)
f (A, B, C, D) = B
Using K-map find the minimized expression for the
following function and implement it using basic gates
f (A, B, C, D) = ∑ (2, 4, 8, 11, 15) +∑ d(l, 10, 12,
13).
Five variable K-map
Different versions of Five variable K-map
Stacked numbering version of five-variable K-map (note
the change in MSB & LSB)
Alternative stack numbering version of the five-variable
K-map
Mirror Image version
Example 1
Simplify the Boolean function.
f (A, B, C, D, E) = ∑ (0, 2, 4, 6, 9, 11, 13, 15,
17, 21, 25, 27, 29, 31)
f (A, B, C, D, E) =A′B′E′+AD′E+BE
Example 2
Simplify the Boolean function.
f (A, B, C, D, E) = ∑ (0, 5, 6, 8, 9, ,10, 11,
16,
20, 24, 25, 26, 27, 29, 31)
Limitations of K-Map method
The map method of simplification is convenient as long as the number of
variables does not exceed five or six. As the number of variables increases
it is difficult to make judgements about which combinations form the
minimum expression.
In case of complex problem with 7, 8, or even 10 variables it is almost an
impossible task to simplify expression by the mapping method. Another
important point is that the K-map simplification is manual technique and
simplification process is heavily depends on the human abilities.
To meet this need, W. V. Quine and E. J. McCluskey developed an exact
tabular method to simplify the Boolean expression. This method is called
the Quine-McCluskey, or Tabular method.
Quine-McCluskey Minimization Technique or Tabular Method.
Quine-McCluskey Minimization Technique or Tabular Method.
D = f(a, b, c, d) =- ∑(0, 1, 2, 3, 6, 7, 8, 9, 14,
15)
Step 1: Arrange all of the minterms, in a list of
increasing order, so that groups of, terms
contain the same number of l’s.
Group 0 contains no ls equal to 0; group
1 contains only those minterms that have
a single 1 { 1, 2, 8}; group 2 contains
minterms with two ls {3, 6, 9}; group 3
contains minterms with three ls {7, 14};
and group 4 contains minterms with four
ls {15}.
Step 2: Create a new table showing the
minterms in group n that matched with
those from group n + 1 such that they
differ in only one position. This is the
equivalent to x + x' = 1; that is, ab' + ab =
a.
Eliminated variable bit positions are
indicated by the dash (-). This
corresponds to
a′b′c′d' + a'b'c'd = a′b'c′(d + d') = a′b′c′-
As each minterm from a group, combines with a
minterm in the next higher group it is checked ( ),
indicating that it is now part of a larger group. If a
minterm did not combine with another, then no check
would be made. If a term does not simplify, it is a
prime implicant.
Step 3: All of the adjacent minterm groups are
compared to see if groups of four can be made. The
criteria for forming groups of four are as follows:
The dashes in the groups of two must be in the same
bit position and only one variable change (0 in one
group and 1 in the other) is allowed.
A comparison is made of each minterm in group n
with each minterm in group n + 1. Those that meet the
criteria are combined in a larger group.
Step 4: Repeat the process outlined in step 3. In this case both dashes (-) must be in
the same bit position with only one other variable allowed to change. The creation
of a new table further groups the sets of minterms. This same process is repeated
until no further combination of minterm groups is possible.
Step 5: All nonchecked minterm groups are now considered to be prime implicants.
Step 6: All of the prime implicants are formed into a prime-implicant table as
shown
The prime implicant table lists each of the minterms contained in the original
switching equation across the top of the table. Each prime implicant is listed
vertically in two forms, PI terms and the decimal list of minterms that make up the
PI.
Step 7: Evaluate the prime implicants by circling those minterms that are contained in only one
prime implicant (only one x in a column).
Note that minterms {8, 9, 14, 15} meet this condition. Circled minterms represent
essential prime implicants (EPI). Minterms {0, 1, 8, 9} and {6, 7, 14, 15} are essential
prime implicants. Minterms { 2, 3} are contained in two prime implicants, {0, 1, 2, 3} and
{2,
3, 6, 7}. We need one or the other of these prime implicants to cover minterms in the
equation
but not both. This implies that two equally simplified results are possible. We can take our
pick:
D = b' c' + bc + a'b′
or
Quine-McClusky Using Don't Care Terms
Consider the following problem: ·
S = f(w. x, y, z) = ∑ (1, 3, 13, 15) + ∑ d (8, 9, 10, 11)
Step 1: Construct a list of minterms and don't care terms classified
according to the number of ls. Indicate the don't care terms by using a *
symbol. Don't care terms are never included as prime implicants by
themselves.
Step 2: Compare terms in group n, including don't care terms, with terms
in group n + 1, looking for a single variable change. Treat don't care
terms as a 1 in finding prime implicants.
Step 3: Repeat step 2. creating an additional table indicating groups of
four minterm/don't care term groups. Repeat step 3 until no further
grouping can occur.
Step 4: Construct a prime implicant chart and determine essential
prime implicants. Treat any don't care terms not part of a group
containing a minterms as 0s. They do not need to be covered.
Each is a candidate for becoming an EPI. However. set {8*, 9*, 10*, 11 *}
contains only don't care terms and is, therefore, not a PI.
The resulting simplified equations is
S = x'z + wz
Reduced Prime Implicant Tables
Consider an example
F (x1, x2, x3, x4 ,x5 ) = ∑ (1,3,4,5,6,7,l0,11
12,13,14,15,18,19,20,21,23,25,26,27)
the prime-implicant table for above example is
Example 1: F (A, B, C, D) = ∑ (0, 2, 3, 6, 7,
8, 10, 12, 13).
Example 2: F (A, B, C, D) = ∑ (2, 4,5, 9, 12,13)
Example 3: Y (A,B,C,D) = ∑ (1, 2, 3, 5, 9, 12,14, 15) + ∑d (4, 8, 11).
Example 4: f (A,B,C,D)= ∑ ( 0, 1, 9, 15, 24,29, 30) + d (8, 11,
31)