Combinational Logic Gate
Combinational Logic Gate
1
5/24/2024
Now we have to construct a truth table that generates the proper output In summary, the process of converting a verbal problem statement into a
responses based on input variables. Because of three input variables, the truth table involves the following steps:
input combinations will be 23 = 8. Each connect/disconnect control signal Determine the input variables and output variables that are involved.
is generated based on the values of the computer operation status signals Assign mnemonic or letter or number symbols to each variable.
and the requirement for two computers to be available. Determine the size of the truth table; how many input combinations exist:
For instance, if C1 = C2 = C3 = 0, then all C1 C2 C3 O1 O2 O3 W1 W2 𝟐𝒙 = 𝒚
three computers are operational; which Where x = number of input variables and y = number of combinations.
0 0 0 0 1 1 0 0 Construct a truth table containing all of the input variable combinations.
two are brought on-line is the designer’s
choice. In this example, computers 2 and 0 0 1 1 1 0 0 0 By careful reading of the problem statement determine the combinations
3 are connected. 0 1 0 1 0 1 0 0 of input variables that cause a given output to be true.
The 2nd case, when C1 = C2 = 0 and C3 = 1, 0 1 1 1 0 0 1 0 Sequential Logic Circuits
computer 3 has failed, so computers 1
1 0 0 0 1 1 0 0 Circuits in which the outputs at any instant of time is dependent upon its
and 2 are switched on-line. The truth
1 0 1 0 1 0 1 0 inputs present at that instant of time as well as on the past history of the
table 4.2 illustrates all of the output
system are called sequential logic circuits. This means that the outputs of
values for each input combination. 1 1 0 0 0 1 1 0 the sequential logic circuits are function of present as well as past value of
A separate equation must be written for 1 1 1 0 0 0 0 1 inputs. Therefore, these circuits are needed elements to store past
each output variable. information i.e. past value of inputs. These elements are known as memory.
Table 4.2 Truth table for example 4.1
2
5/24/2024
Canonical Forms
m-notation
all of the available input variables either in complemented or uncomplemen-
ted form. The switching equations expressed in canonical form are not In the case of a minterm, a symbol 0 is assigned to complemented variable
simplified. Two formats generally exist for expressing switching equations and 1 is assigned to uncomplemented variable to obtain a binary represe-
or functions in a canonical form: ntation of that minterm. The corresponding decimal number, 𝒅 is found
and the minterm is denoted by the symbol 𝒎𝒅 . For example, the minterm
(a) Disjunctive Canonical Form or Minterm Canonical Form or Canonical 𝒙 𝒚𝒛 has binary number 011 and its corresponding decimal number is 3.
Sum of Minterm form or Standard Sum of Product Form. Thus this minterm is denoted by 𝒎𝟑 . This type of notation for the minterm
(b) Conjunctive Canonical Form or Maxterm Canonical Form or Canonical is known as m-notation. Using m-notation, the following Boolean function
Product of Maxterm Form or Standard Product of Sum Form. or switching function can be written as
Now we need to define minterm and maxterm before discussing these two
𝒇 𝒙, 𝒚, 𝒛 = 𝒙𝒚 𝒛 + 𝒙 𝒚 𝒛 + 𝒙𝒚𝒛
formats:
= 𝒎𝟓 + 𝒎𝟏 + 𝒎𝟕
Minterm or Standard Product Term
= ∑ 𝒎 𝟏, 𝟓, 𝟕 .
A minterm is a special case of product (AND) term. A minterm is a product
term consisting of all the available input variables either in complemented Therefore, the switching function becomes through m-notation
or uncomplemented form. For a switching function of 𝒏 input variables, 𝒇 𝒙, 𝒚, 𝒛 = ∑ 𝒎 𝟏, 𝟓, 𝟕 .
there are 𝟐𝒏 distinct minterms. For example, the minterms for a three varia-
ble switching function 𝒙, 𝒚, and 𝒛 are: 𝒙 𝒚 𝒛 , 𝒙 𝒚 𝒛, 𝒙 𝒚𝒛 , 𝒙 𝒚𝒛, 𝒙𝒚 𝒛 , 𝒙𝒚 𝒛,
𝒙𝒚𝒛 , and 𝒙𝒚𝒛.
3
5/24/2024
(b) Conjunctive Canonical Form or Maxterm Canonical Form or Canonical Identify the missing variable(s) in each product (AND) term.
Product of Sum Form or Standard product of Sum Form
Product (AND) the term(s) formed by ORing (logical adding) the missing
A switching function expressed in product of sum (P of S) form with each variable(s) and its complement with the original product (AND) term.
sum term containing every variable, either complemented or uncomple-
mented, is known as conjunctive canonical function or maxterm canonical Explanation: Let consider a three variable switching function/expression
function or canonical product of sum function or standard product of sum with variables 𝒙, 𝒚, and 𝒛. Now if there is a term 𝒙𝒚, where 𝒛 variable is
function. Such sum term is also known as maxterm or standard sum term. missing, then we form the term 𝒛 + 𝒛 and product (AND) it with the
The following expression (4.5) shows a switching function in conjunctive original term 𝒙𝒚. Therefore we get, 𝒙𝒚 𝒛 + 𝒛 . As we know, 𝒛 + 𝒛 = 𝟏, the
canonical form or maxterm canonical form or canonical product of sum original product (AND) term value is not changed.
form or standard product of sum form. Expand the term by application of distributive property,
𝒇 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 = 𝒙𝟏 + 𝒙𝟐 +𝒙𝟑 𝒙𝟏 +𝒙𝟐 +𝒙𝟑 𝒙𝟏 + 𝒙𝟐 + 𝒙𝟑 ⋯ ⋯ ⋯ (𝟒. 𝟓) 𝒙𝒚𝒛 + 𝒙𝒚𝒛 .
Conversion of Disjunctive Normal Function into Disjunctive Canonical Conversion of Conjunctive Normal Function into Conjunctive Canonical
Function or Minterm Canonical Function or Standard Sum of Product. Function or Maxterm Canonical Function or Standard Product of Sum
To convert sum of product (S of P) form or disjunctive normal form of a To convert product of sum (P of S) form or conjunctive normal form of a
switching function into standard sum of product form or disjunctive switching function into standard product of sum form or conjunctive
canonical form or minterm canonical form of the switching function using canonical form or maxterm canonical form of the switching function
Boolean algebra, we do the following: using Boolean algebra, we do the following:
4
5/24/2024
Identify the missing variable(s) in each sum (OR) term. Deriving Disjunctive Canonical Expression or Minterm Canonical Expression
or Standard Sum of Product Term from Truth Table directly.
Sum (OR) the term(s) formed by ANDing (logical multiplying) the
missing variable(s) and its complement with the original sum (OR) term. Select the minterms or standard product terms corresponding to the
rows in the truth table where the output functions are 1.
Explanation: Let consider a three variable switching function/expression In the case of minterm, use complemented input variable for the value
with variables 𝒙, 𝒚, and 𝒛. Now if there is a term 𝒙 + 𝒚 , where 𝒛 variable is
of 0 and uncomplemented input variable for the value of 1.
missing, then we form the term 𝒛𝒛 and sum (OR) it with the original term
𝒙 + 𝒚 . Therefore we get, 𝒙 + 𝒚 + 𝐳𝒛 As we know, 𝐳𝒛 = 𝟎, the original Sum (OR) the all such minterms or standard product terms to obtain
sum (OR) term value is not changed. disjunctive canonical expression or Minterm canonical expression or
standard sum of product form of the switching expression.
Expand the term by application of distributive property,
Deriving Conjunctive Canonical Expression or Maxterm Canonical Expression
𝒙+𝒚+𝒛 𝒙+𝒚+𝒛 . or Standard Product of Sum Term from Truth Table directly
Select the maxterms or standard sum terms corresponding to the
Example 4.3 Find the standard product of sum for the following function:
rows in the truth table where the output functions are 0.
𝒇 = 𝒙𝟏 𝒙𝟐 𝒙𝟑 + 𝒙𝟏 𝒙𝟑 𝒙𝟒 + 𝒙𝟏 𝒙𝟐 𝒙𝟒 In the case of maxterm, use complemented input variable for the
value of 1 and uncomplemented input variable for the value of 0.
Example 4.4 Find the standard sum of product for the following function:
Product (AND) the all such maxterms or standard sum terms to obtain
𝒇 = 𝒙𝟏 + 𝒙𝟑 + 𝒙𝟐 𝒙𝟒 conjunctive canonical expression or Maxterm canonical expression
or standard product of sum form of the switching expression.
From the truth table 4.3, we can write the Table 4.3
switching equation in terms of minterms Shannon’s Theorem
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒇 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑
or standard sum of product terms using Every Boolean function 𝒇 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 , ⋯ ⋯ , 𝒙𝒋 , ⋯ ⋯ , 𝒙𝒏 of 𝒏 variables can be
the above steps and hence its m-notation 0 0 0 0
expressed in any one of the following forms:
as given below: 0 0 1 1
𝒇 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 = 𝒙𝟏 𝒙𝟐 𝒙𝟑 + 𝒙𝟏 𝒙𝟐 𝒙𝟑 + 𝒙𝟏 𝒙𝟐 𝒙𝟑 + (a) 𝒇 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 , ⋯ ⋯ , 𝒙𝒋 , ⋯ ⋯ , 𝒙𝒏 = 𝒙𝒋 𝒇 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 , ⋯ ⋯ , 𝟏, ⋯ ⋯ , 𝒙𝒏 +
0 1 0 1
𝒙𝒋 𝒇 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 , ⋯ ⋯ , 𝟎, ⋯ ⋯ , 𝒙𝒏 ……
𝒙𝟏 𝒙𝟐 𝒙𝟑 + 𝒙𝟏 𝒙𝟐 𝒙𝟑 0 1 1 0 ……..(4.6)
In m-notation, it becomes 1 0 0 1 (b) 𝒇 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 , ⋯ ⋯ , 𝒙𝒋 , ⋯ ⋯ , 𝒙𝒏 = 𝒙𝒋 + 𝒇 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 , ⋯ ⋯ , 𝟏, ⋯ ⋯ , 𝒙𝒏
𝒇 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 = ∑ 𝒎 𝟏, 𝟐, 𝟒, 𝟔, 𝟕 . 1 0 1 0 𝒙𝒋 + 𝒇 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 , ⋯ ⋯ , 𝟎, ⋯ ⋯ , 𝒙𝒏 …
Similarly, we can write the switching equation 1 1 0 1 ....….(4.7)
in terms of maxterms or standard product of
1 1 1 1 for 𝒋 = 𝟏, 𝟐, 𝟑, ⋯ ⋯ , 𝒏
sum terms using the above steps and hence
its M-notation as given below: Where 1 and 0 in eqns. (4.6) and (4.7) are in the jth position, i.e. replacing 𝒙𝒋
𝒇 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 = 𝒙𝟏 + 𝒙𝟐 + 𝒙𝟑 𝒙𝟏 + 𝒙𝟐 + 𝒙𝟑 𝒙𝟏 + 𝒙𝟐 + 𝒙𝟑 in the switching function
𝒇 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 , ⋯ ⋯ , 𝒙𝒋 , ⋯ ⋯ , 𝒙𝒏
In M-notation, it becomes
𝒇 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 = ∏ 𝑴 𝟎, 𝟑, 𝟓 .
5
5/24/2024
Proof: = 𝒙𝟏 𝒙𝟐 𝒇 𝟏, 𝟏, ⋯ , 𝒙𝒏 + 𝒙𝟐 𝒇 𝟏, 𝟎, ⋯ , 𝒙𝒏
Example 4.5 Find the standard sum (disjunctive canonical) and standard Minimization
(conjunctive canonical) forms for the switching function given by the truth
The design is not unique and it is possible to get many circuits performing
table 4.4.
the same functions. Now it is the task of the designer to select an optimum
Solution: Using the expansion given by eqn. (4.8), circuit configuration.
we get As is usual in any engineering design, the number of components used in
Table 4.4
𝒇 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 = 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒇 𝟏, 𝟏, 𝟏 + 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒇 𝟏, 𝟏, 𝟎 + resulting optimum circuit configuration should be minimum to ensure
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒇 𝟏, 𝟎, 𝟏 + 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒇 𝟏, 𝟎, 𝟎 + 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒇 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 minimum cost, minimum space requirement, maximum speed of operation,
easy availability of components, low power requirements, ease of intercon-
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒇 𝟎, 𝟏, 𝟏 + 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒇 𝟎, 𝟏, 𝟎 + 0 0 0 0 necting the components, easy to design, etc. There can be two different
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒇 𝟎, 𝟎, 𝟏 + 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒇 𝟎, 𝟏, 𝟎 + 0 0 1 1 approaches to the design of combinational logic circuits:
= 𝒙𝟏 𝒙𝟐 𝒙𝟑 + 𝒙𝟏 𝒙𝟐 𝒙𝟑 + 𝒙𝟏 𝒙𝟐 𝒙𝟑 + 𝒙𝟏 𝒙𝟐 𝒙𝟑 + 𝒙𝟏 𝒙𝟐 𝒙𝟑 0 1 0 1 One of these is the traditional method, wherein the given Boolean
Similarly, using the expansion given by eqn. (4.9), 0 1 1 0 expression or the logic expression or the truth table is simplified or
we get minimized by using standard methods and the simplified or minimized
1 0 0 1
expression is realized using the gates.
𝒇 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 = 𝒙𝟏 + 𝒙𝟐 + 𝒙𝟑 + 𝒇 𝟏, 𝟏, ⋯ , 𝟏 ⋯⋯ 1 0 1 0
The other method normally does not require any simplification or
⋯ 𝒙𝟏 + 𝒙𝟐 + 𝒙𝟑 + 𝒇 𝟎, 𝟎, 𝟎 1 1 0 1 minimization of the logic expression or the truth table, instead the
= 𝒙𝟏 + 𝒙𝟐 + 𝒙𝟑 𝒙𝟏 + 𝒙𝟐 + 𝒙𝟑 𝒙𝟏 + 𝒙𝟐 + 𝒙𝟑 1 1 1 1 complex logic functions available in medium scale integrated (MSI)
circuits can be directly used. Computer-aided design (CAD) tools are
6
5/24/2024
used for the design using programmable logic devices ( PLDs) and field- Map Method
programmable gate arrays (FPGAs).
simplifying switching functions or expressions. The Karnaugh map or Veitch
The following standard methods can be used to simplify or minimize the diagram is a matrix of squares. Each square represents a minterm or
Boolean functions: maxterm from a switching/Boolean expressions and arranges in such
fashion so as to provide adjacent places for minterms or maxterms that
1. Boolean algebraic method differ in only one variable which is primed in one term and unprimed in the
2. Map method (known as Karnaugh map technique) other. As a result, the following Boolean identity can easily be applied to
3. Quine-McCluskey or tabular method simplify the Boolean/switching expression.
4. Variable entered mapping (VEM) technique
𝒙. 𝒇 + 𝒙 . 𝒇 = 𝒇. 𝒙 + 𝒙′ = 𝒇
The Boolean algebraic method have already been discussed for the
simplification of Boolean functions/expressions but it is not convenient That is, if the two terms (either minterms or maxterms) which are identical
if the expressions are long and many variables are involved. The other except for only one variable which is in the true form in the one term but in
methods which are much better than Boolean algebraic method will be the complemented form in the other, then both the terms when combined
discussed here one by one. can be replaced by their common factor.
If a given switching/Boolean expression contains a minterm, then a 1 is
Map Method entered into the square that represents that minterm. A maxterm is
The map method, first proposed by E. W. Veitch and slightly modified represented by a 0. The two terms which are same except in one variable
by M. Karnaugh, is also known as the “Veitch diagram/representation” appear as adjacent 1’s (for minterms) or 0’s (for maxterms) in the Karnaugh
or the “Karnaugh map”. It is a very useful tool in representing and map (K-map).
Karnaugh map or Veitch diagram may also be regarded as the pictorial repre- 𝑨𝑩
sentation of the truth table for the switching/Boolean function and a 1 or 0 is 𝑪𝑫 00 01 11 10
written inside the square/cell depending upon whether the function is having 0 4 12 8
the value 1 or 0 for that particular minterm and vice versa for maxterm. 00
Figure 4.3 shows the K-maps for two, three and four variables. For a Boolean 1 5 13 9
01
or switching function of 𝒏 variables, the K-map is made of 𝟐𝒏 squares/cells.
Each square/cell corresponds to one of the combinations of 𝒏 variables 3 7 15 11
11
switching or Boolean function, since there are 𝟐𝒏 combinations of 𝒏
variables. In K-map, each square/cell is designated by a decimal number 2 6 14 10
which is written on the right hand upper corner of the cell/square. The 10
decimal number corresponds to the minterm/maxterm number of the term. (c)
𝑨 𝑨𝑩 Fig. 4.3 Karnaugh maps (a) Two variables (b) Three variables (c) Four
0 1 𝑪 00 01 11 10 variables
𝑩
0 2 0 2 6 4
0 0
Gray code is used for the identification of square/cells in the K-map because
1 3 1 3 7 5 it ensures that only one variable changes between each pair of adjacent cells
1 1
or squares.
(a) (b)
7
5/24/2024
Figure 4.4 shows the minterm/maxterm corresponding to each cell and the 𝑨𝑩
minterm/maxterm is written inside the cell for clear understanding. 𝑪 00 01 11 10
0 2 6 4
𝑨 𝑨 0 𝑨+𝑩+𝑪 𝑨+𝑩 +𝑪 𝑨 +𝑩 +𝑪 𝑨 +𝑩+𝑪
𝑩 0 1 𝑩 0 1
0 2 0 2 1 3 7 5
1 𝑨 + 𝑩 + 𝑪′ 𝑨 + 𝑩 + 𝑪′ 𝑨 + 𝑩 + 𝑪′ 𝑨 + 𝑩 + 𝑪′
0 𝑨𝑩 𝑨𝑩 0 𝑨+𝑩 𝑨 +𝑩
1 3 1 3 𝑨𝑩
1 𝑨𝑩 𝑨𝑩 1 𝑨 + 𝑩′ 𝑨 + 𝑩′ 𝑪𝑫 00 01 11 10
0 4 12 8
00 𝑨𝑩𝑪𝑫 𝑨 𝑩𝑪 𝑫 𝑨𝑩𝑪 𝑫 𝑨𝑩 𝑪 𝑫
𝑨𝑩 1 5 13 9
00 01 11 10 01 𝑨 𝑩 𝑪 𝑫 𝑨 𝑩𝑪 𝑫 𝑨𝑩𝑪 𝑫 𝑨𝑩 𝑪 𝑫
𝑪
0 2 6 4
0 3 7 15 11
𝑨𝑩𝑪 𝑨 𝑩𝑪 𝑨𝑩𝑪 𝑨𝑩 𝑪 11 𝑨 𝑩 𝑪𝑫 𝑨 𝑩𝑪𝑫 𝑨𝑩𝑪𝑫 𝑨𝑩 𝑪𝑫
1 3 7 5 2 6 14 10
1 𝑨𝑩C 𝑨 𝑩𝑪 𝑨𝑩𝑪 𝑨𝑩 𝑪 10 𝑨 𝑩 𝑪𝑫 𝑨 𝑩𝑪𝑫 𝑨𝑩𝑪𝑫 𝑨𝑩 𝑪𝑫
8
5/24/2024
In this case, 𝑨 = 𝟎 for first gray codes of 2-bit binary combinations 3-bit Gray Codes i.e. Gray codes of 3-bit binary
and 𝑨 = 𝟏 for next gray codes of 2-bit binary combinations as combinations are used here.
immediate before slide. Here combinations of BC stands for 2-bit
𝑨𝑩𝑪
binary combinations.
𝑫𝑬 000 001 011 010 110 111 101 100
𝑨𝑩𝑪 0 12 8 24 20 16
4 28
00
𝑫𝑬 000 001 011 010 100 101 111 110
0 4 12 8 16 20 28 24 1 5 13 9 25 29 21 17
00 01
1 5 13 9 17 21 29 25 11 3 7 15 11 27 31 23 19
01
3 7 15 11 19 23 31 27 10 2 6 14 10 26 30 22 18
11
10 2 6 14 10 20 22 30 26
All representations of K-maps for five variables ensures that only one
variable changes between each pair of adjacent cells or squares.
or
3 11 27 19 35 43 59 51
3 11 27 19 35 43 59 51 011
11
2 10 26 18 34 42 58 50
2 10 26 18 34 42 58 50 010
10
4 12 28 20 36 44 60 52
4 12 28 20 36 44 60 52 100
00
5 13 29 21 37 45 61 53
5 13 29 21 37 45 61 53 101
01
𝑫=𝟏
7 15 31 23 39 47 63 55
7 15 31 23 39 47 63 55 111
11
6 14 30 22 38 45 62 54
6 14 30 22 38 45 62 54 110
10
9
5/24/2024
10
5/24/2024
11
5/24/2024
To summarize: For example, consider a switching problem described by the truth-table given
in table 4.6. The function can be written as
Looping an octet of adjacent 1s in a K-map eliminates the three variables
that appear in both complemented and uncomplemented form. 𝒇 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 = 𝒎 𝟎, 𝟒, 𝟕 + 𝒅. 𝒄. 𝟐, 𝟔 .
Incompletely Specified Boolean/Switching Functions Where 𝒅. 𝒄. indicates don’t care states. The K-map is shown in Figure 4.7.
In case of switching/Boolean functions so far described, the value for the Table 4.6
function is specified for all 𝟐𝒏 possible input combinations of 𝒏 variables. 𝒙𝟏 𝒙𝟐
𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒇 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑
Sometimes however for some input combinations, the output of switching 𝒙𝟑 00 01 11 10
0 0 0 1
function hence switching circuit may mot be specified. It means that the
0 1 d d 1
outputs for those particular combinations are immaterial, as far as the ope- 0 0 1 0
ration of the switching function/circuit is concerned. This is also possible 0 1 0 𝒅
when certain input combinations can never occur due to some constraints 1 0 0 1 0
0 1 1 0
and, therefore, we do not care about the state of the output for these input
Fig. 4.7 K-map corresponding to the table 4.6
combinations. Such situations are indicated on the truth-table or K-map by 1 0 0 1
writing ‘𝒅’ or ‘𝒙’ as the functional value, rather than ‘0’ or ‘1’. Thus, these 1 0 1 0 For the purpose of simplification, ‘𝒅’ can be
conditions/situations are referred as don’t care states/conditions and the
1 1 0 𝒅 taken either as 1 or 0 so that the resultant
switching functions which include don’t care states are said to be income-
1 1 1 1 switching function is minimized.
pletely specified switching/Boolean functions.
𝒇𝟑 𝑨, 𝑩, 𝑪 = 𝒎 𝟎, 𝟏, 𝟑, 𝟓, 𝟕 .
12