0% found this document useful (0 votes)
29 views19 pages

Chapter 3 Min

This document discusses simplifying Boolean expressions and designing combinational logic circuits. It begins by giving an example of an unsimplified Boolean expression that requires 5 gates to implement. The expression is then simplified using De Morgan's theorems, reducing it to an expression that only requires 2 gates. In general, simplifying expressions first makes the resulting circuit cheaper, more reliable, and lower power. The document then discusses two methods for simplifying expressions: algebraic simplification using Boolean algebra theorems, and using a Karnaugh map which represents the truth table graphically. It provides examples of simplifying expressions using both methods.

Uploaded by

Cybertron Badee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views19 pages

Chapter 3 Min

This document discusses simplifying Boolean expressions and designing combinational logic circuits. It begins by giving an example of an unsimplified Boolean expression that requires 5 gates to implement. The expression is then simplified using De Morgan's theorems, reducing it to an expression that only requires 2 gates. In general, simplifying expressions first makes the resulting circuit cheaper, more reliable, and lower power. The document then discusses two methods for simplifying expressions: algebraic simplification using Boolean algebra theorems, and using a Karnaugh map which represents the truth table graphically. It provides examples of simplifying expressions using both methods.

Uploaded by

Cybertron Badee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Chapter 3

SIMPLIFICATION OF BOOLEAN
EXPRESSIONS AND COMBINATIONAL
LOGIC CIRCUIT DESIGN

3.1 Simplification of Boolean Expressions

Introduction

Suppose you wanted to implement the Boolean function:


 
x = AB A + BC
We can implement this directly as shown on Figure 3.1.

B x
PSfrag replacements
C

Figure 3.1: Circuit for the unsimplified expression

This implementation requires a total of five gates.


Suppose now we decided to simplify the expression before implementing it. We first
use De Morgan’s theorems to get:
 
x = AB A · BC

28

page 32 of 101
29


= AB A(B + C)

= AB AB + AC
= ABAB + ABAC
= ABC
This canPSfrag
be implemented using only two gates, as shown on Figure 3.2.
replacements
A
B x
C

Figure 3.2: Circuit for the simplified expression

Generally, it is necessary to reduce Boolean expressions before implementing them


as it makes the final circuit:

i) cheaper - less gates used, needs a smaller circuit board.

ii) more reliable as there are fewer interconnections.

iii) have a lower power consumption.

There are two methods of simplifying logic expressions:

i) Algebraic Simplification - Uses theorems of Boolean Algebra.

ii) The Karnaugh map method - Graphical.

3.1.1 Algebraic Simplification

To use this method, you need to know the theorems of Boolean algebra very well -
you will need a lot of practice to improve your skills. There are generally two steps
when using this method:

i) Put the expression in Sum of Products form (not Standard Sum of Products
form). This may require the use of De Morgan’s theorem or the distributive
rules.

ii) Check for common factors and factor out whenever possible. Factoring usually
results in the elimination of some of the terms.

page 33 of 101
30

Example
Simplify algebraically:
ABC + AB C̄ + AB̄C
The expression is already in sum of products form, so we shall just factor out the
expression:

ABC + AB C̄ + AB̄C = AB C + C̄ + AB̄C

= AB + AB̄C = A B + B̄C
= A (B + C) = AB + AC
Example
Simplify algebraically:  
x = ABC + AB ĀC̄
This expression is not in sum of products form, so we shall first apply De Morgan’s
Theorems to get:
 
x = ABC + A + B A + C

= ABC + A + B (A + C)
= ABC + AC + AB + BC
Now the expression is in sum of products form, so we can proceed with the simplifi-
cation:

x = C A + AB + AB + BC

= C A + B + AB + BC
= AC + BC + BC + AB

= AC + B + B C + AB
= AC + C + AB
= C + AB
Example
A student may register for course X only if he satisfies the following conditions:

(1) Has completed at least 20 courses AND is an engineering student AND of good
conduct, OR

(2) Has completed at least 20 courses AND is an engineering student AND has
departmental approval, OR

(3) Has completed fewer than 20 courses AND is an engineering student AND not
of good conduct, OR

(4) Is of good conduct AND has departmental approval, OR

page 34 of 101
31

(5) Is an engineering student AND does not have departmental approval.

We can convert the conditions listed to letter symbols as follows:

A: Has completed at least 20 courses

B: Is an engineering student

C: Is of good conduct

D: Has departmental approval

Y: Student may register for course X

We can then write:

Y = ABC + ABD + ABC + CD + BD



= ABC + B D + AD + ABC + CD + BD

= ABC + B D + A + ABC + CD
= (ABC + AB) + BD + ABC + CD
= AB + ABC + BD + CD

= B A + ĀC̄ + BD + CD

= B A + C + BD + CD

= AB + BC + BD + CD
Recall the theorem:
AB + AC + BC = AB + AC
We can use this theorem to rewrite the expression in brackets above as:

BD + CD = BD + CD + BC

Hence:
Y = AB + BC + BD + CD + BC

= AB + B C + C + BD + CD
= AB + B + BD + CD
= B + BD + CD
= B + CD
Hence a student may register for the course X if he is an engineering student OR he
is of good conduct AND has departmental approval.

page 35 of 101
32

3.1.2 The Karnaugh Map

Introduction

This is a graphical method used to simplify a Boolean expression. It represents the


information in a truth-table in a different format. Each combination of inputs is
represented by a cell in the map.
Once a Karnaugh Map (K-map) has been filled with ones and zeros, the sum of prod-
ucts expression can be obtained by ORing together the those squares that contain 1s.
The product of sums expression can be obtained by ANDing together those squares
that contain 0s.

Two variable K-map

Consider the 2-variable truth-table shown below:


A B x minterm
0 0 1 m0
0 1 1 m1
1 0 0 m2
1 1 0 m3
(This
PSfragtruth-table is arbitrarily chosen - it is for purposes of illustration only). There
replacements
are four input combinations, so this truth-table can be converted to a K-map with 4
cells, as shown on Figure 3.3. Note that in this case, variable A is treated as the MSB.

A A
B 0 1 B 0 1
0 m0 m2 0 1 0

1 m1 m3 1 1 0

Figure 3.3: Two variable K-map

The K-map may be alternatively drawn with the variable A on the vertical side and
variable B on the horizontal side, as shown on Figure 3.4:

3-variable K-map

Consider the 3-input truth-table shown below:

page 36 of 101
PSfrag replacements

33

B B
A 0 1 A 0 1
0 m0 m1 0 1 1
PSfrag replacements 1 m2 m3 1 0 0

Figure 3.4: Two variable K-map: alternative representation

A B C x minterm
0 0 0 1 m0
0 0 1 1 m1
0 1 0 1 m2
0 1 1 0 m3
1 0 0 0 m4
1 0 1 0 m5
1 1 0 1 m6
1 1 1 0 m7

This can be represented using a K-map as shown on Figure 3.5.

AB AB
C 00 01 11 10 C 00 01 11 10
0 m0 m2 m6 m4 0 1 1 1 0
PSfrag replacements
1 m1 m3 m7 m5 1 1 0 0 0

Figure 3.5: Three variable K-map

Note that the K-map cells are labelled in such a way that adjacent cells differ only in
one variable.
The 3-variable K-map may be alternatively drawn as shown on Figure 3.6.

C C
AB 0 1 AB 0 1
00 m0 m1 00 1 1

01 m2 m3 01 1 0

11 m6 m7 11 1 0

10 m4 m5 10 0 0

Figure 3.6: Three variable K-map: alternative representation

Note that the two representations shown (Figure 3.5 and Figure 3.6) are equivalent,
and you may work with whichever representation that you are more comfortable

page 37 of 101
34

with. The only thing you should keep in mind is the order in which the variables
appear – in this case, they appear in the order A (MSB), B and C (LSB).
PSfrag replacements
4-variable K-map

Consider the 4-input truth-table shown below:


A B C D x minterm
0 0 0 0 0 m0
0 0 0 1 1 m1
0 0 1 0 0 m2
0 0 1 1 0 m3
0 1 0 0 0 m4
0 1 0 1 1 m5
0 1 1 0 0 m6
0 1 1 1 0 m7
1 0 0 0 0 m8
1 0 0 1 0 m9
1 0 1 0 0 m10
1 0 1 1 0 m11
1 1 0 0 0 m12
1 1 0 1 1 m13
1 1 1 0 0 m14
1 1 1 1 1 m15

This may be represented using a K-map as shown on Figure 3.7.

AB AB
CD 00 01 11 10 CD 00 01 11 10
00 m0 m4 m12 m8 00 0 0 0 0

01 m1 m5 m13 m9 01 1 1 1 0

11 m3 m7 m15 m11 11 0 0 1 0

10 m2 m6 m14 m10 10 0 0 0 0

Figure 3.7: Four variable K-map

The K-map may be alternatively drawn as shown on Figure 3.8.

3.1.3 Looping

The Logic function can be simplified by properly combining those squares in the that
contain 1s. The process of combining 1s is called looping. The number of 1s that can
be looped together should be a power of 2 (1, 2, 4, 8, 16 e.t.c.).

page 38 of 101
35

CD CD
AB 00 01 11 10 AB 00 01 11 10
00 m0 m1 m3 m2 00 0 1 0 0

01 m4 m5 m7 m6 01 0 1 0 0

11 m12 m13 m15 m14 11 0 1 1 0

10 m8 m9 m11 m10 10 0 0 0 0

Figure 3.8: Four variable K-map: alternative representation

Groups of 2 (Pairs)

Two ones can be looped together if they are horizontally or vertically adjacent. Two
PSfrag replacements
ones next to each other diagonally are not adjacent. Looping a pair of adjacent 1s in a
K-map eliminates the variable that appears in the complemented and uncomplemented form.
Variables that are the same C
for all cells of the loop must appear in the final expression.
Example
Consider the K-map shown on Figure 3.9.

AB
C ĀB̄ ĀB AB AB̄
C̄ 0 1 1 0

C 0 0 0 0

Figure 3.9: Looping two 1s which are horizontally adjacent

The two 1s shown in the K-map are horizontally adjacent and can be looped together
as a pair as shown in the figure. Looking at the cells enclosed in the loop, we can
see that variable A appears as Ā in one cell (complemented form) and as A (uncom-
plemented form) in the other cell hence it is eliminated. Variable B appears as B in
both cells and variable C appears as C̄ so the simplified expression is:

x = B C̄

Example
Consider the K-map shown on Figure 3.10.
The two ones are vertically adjacent and the variable C is the one that changes and
is eliminated hence:
x = ĀB

page 39 of 101
C
36

AB
C ĀB̄ ĀB AB AB̄
C̄ 0 1 0 0

C 0 1 0 0

Figure 3.10: Looping two 1s which are vertically adjacent

PSfrag replacements
The leftmost column and the rightmost column of the K-map are considered to be
adjacent. Similarly, the top row and the bottom row of a K-map are considered to be
adjacent. C

Example
Consider the K-map shown on Figure 3.11.

AB
C ĀB̄ ĀB AB AB̄
C̄ 1 0 0 1
C 0 0 0 0

Figure 3.11: Looping two 1s which are horizontally adjacent

In this case,
x = B̄ C̄

Groups of 4 (Quads)

Four 1s PSfrag
can be replacements
looped together if they are horizontally adjacent, vertically adjacent
or form a square. A loop of four 1s eliminates 2 variables that appear in both com-
plemented and uncomplemented
C form.
Example
Consider the K-map shown on Figure 3.12.

AB
C ĀB̄ ĀB AB AB̄
C̄ 0 0 0 0

C 1 1 1 1

Figure 3.12: Looping four 1s which are horizontally adjacent

page 40 of 101
37

The four 1s are horizontally adjacent and are looped together to give:
PSfrag replacements
x=C

Example
Consider the K-map shown on Figure 3.13.

AB
CD ĀB̄ ĀB AB AB̄
C̄ D̄ 0 1 0 0

C̄D 0 1 0 0

CD 0 1 0 0

C D̄ 0 1 0 0

Figure 3.13: Looping four 1s which are vertically adjacent

The four 1s are vertically adjacent and are looped together to give:
PSfrag replacements
x = ĀB

Example

AB
CD ĀB̄ ĀB AB AB̄
C̄ D̄ 0 1 1 0

C̄D 0 1 1 0

CD 0 0 0 0

C D̄ 0 0 0 0

Figure 3.14: Looping four 1s which form a square

The four 1s in Figure 3.14 form a square and are looped together to give:

x = B C̄

Other examples of quads are shown on Figure 3.15, where x = B̄D for the K-map on
the left and x = B D̄ for the K-map on the right.

page 41 of 101
38

AB AB
CD ĀB̄ ĀB AB AB̄ CD ĀB̄ ĀB AB AB̄
C̄ D̄ 0 0 0 0 C̄ D̄ 0 1 1 0
C̄D 1 0 0 1 C̄D 0 0 0 0
PSfrag replacements
CD 1 0 0 1 CD 0 0 0 0
C D̄ 0 0 0 0 C D̄ 0 1 1 0

Figure 3.15: Looping four 1s


AB
CD ĀB̄ ĀB AB AB̄
C̄ D̄ 1 0 0 1
C̄D 0 0 0 0
CD 0 0 0 0
C D̄ 1 0 0 1

Figure 3.16: The 1s at the corners are adjacent and can looped together

Since the top row of a K-map is adjacent to the bottom row, and the right column to
the left, the corner cells of a K-map are also considered adjacent and can be looped
together if they all contain 1s, as shown on Figure 3.16.
PSfragInreplacements
this case, x = B̄ D̄.

Groups of 8 (octets)

Eight ones may be looped together if they are adjacent. A loop of eight 1s eliminates
3 variables. Examples of octets are shown on Figure 3.17.

AB AB
CD ĀB̄ ĀB AB AB̄ CD ĀB̄ ĀB AB AB̄
C̄ D̄ 1 1 0 0 C̄ D̄ 1 1 1 1
C̄D 1 1 0 0 C̄D 0 0 0 0
CD 1 1 0 0 CD 0 0 0 0
C D̄ 1 1 0 0 C D̄ 1 1 1 1

x = Ā x = D̄

Figure 3.17: Looping eight 1s (octets)

page 42 of 101
39

3.1.4 Complete Simplification Procedure

1. Construct the K-map and place 1s in those cells corresponding to 1s in the


truth-table. Place 0s in the other squares.

2. Examine the map and loop those 1s which are not adjacent to any other 1s.
these are called isolated 1s.

3. Identify those 1s that are adjacent to only one other 1. Loop any pair containing
such a 1. Adjacent ones which can be combined in more than one way are
temporarily bypassed.

4. Identify those 1s which can be combined with three other 1s in only one way.
If not all four 1s so involved have already been looped as pairs, loop the four
1s. The 1s that can be looped in a group of four in more than one way are
temporarily bypassed.

5. Repeat the preceding steps for groups of 8, 16 e.t.c.

6. Loop any quad that contains one or more 1s that have not yet been looped.

7. Loop any pairs necessary to include any 1s that have not yet been looped, mak-
ing sure to use the minimum number of loops.

8. Form the OR sum of all the terms generated by each loop.

Note: If the expression you obtain using the steps above can be simplified further by
algebraic means, it means you have not looped properly - you may be using too many
loops and/or your loops may not be large enough.
Carefully go through the examples below, and see if you can come up with the same
loops. These examples have been looped in such a way as to obtain the simplest
possible expressions.
Example

From Figure 3.18, x = AB̄ C̄ D̄ + ABC + BD


Example

From Figure 3.19, x = ĀB C̄ + AC̄D + ABC + ĀCD


Example

From Figure 3.20, x = ĀBC D̄ + ĀB̄ C̄ + AB C̄ + C̄D + B̄D + AD

page 43 of 101
PSfrag replacements

40

AB
CD ĀB̄ ĀB AB AB̄
C̄ D̄ 0 0 0 1

C̄D 0 1 1 0
PSfrag replacements CD 0 1 1 0

C D̄ 0 0 1 0

Figure 3.18: Example


AB
CD ĀB̄ ĀB AB AB̄
C̄ D̄ 0 1 0 0

C̄D 0 1 1 1
PSfrag replacements
CD 1 1 1 0

C D̄ 0 0 1 0

Figure 3.19: Example


AB
CD ĀB̄ ĀB AB AB̄
C̄ D̄ 1 0 1 0
C̄D 1 1 1 1
CD 1 0 1 1
C D̄ 0 1 0 0

Figure 3.20: Example

3.1.5 Obtaining Product of Sums Expressions from K-maps

So far, we have talked about obtaining Sum of Products expressions from K-maps. It
is also possible to obtain Product of Sums expressions – only this time we loop the
zeros together, not the ones. The examples below illustrate the procedure.
Example

 
From Figure 3.21, x = B̄ + C̄ + D̄ A + D̄
Example

page 44 of 101
41
PSfrag replacements
AB
CD 00 01 11 10
00 1 1 1 1

01 0 0 1 1

11 0 0 0 1

10 1 1 1 1

Figure 3.21:replacements
PSfrag Example: looping the 0s to obtain a product of sums expression
AB
CD 00 01 11 10
00 0 0 1 1

01 1 0 0 1

11 0 0 0 0

10 1 0 0 1

Figure 3.22: Example: looping the 0s to obtain a product of sums expression

  
From Figure 3.22, x = (A + C + D) B̄ + D̄ C̄ + D̄ B̄ + C̄

Note that for a given K-map, looping the 1s and looping the zeros gives the same results,
only that the results are expressed in different ways. Consider the example shown on
PSfragFigure 3.23 where in one case the 1s are looped and in the other case the 0s are
replacements
looped.

AB AB
CD 00 01 11 10 CD 00 01 11 10
00 0 0 0 0 00 0 0 0 0
01 0 1 1 1 01 0 1 1 1
11 0 1 1 1 11 0 1 1 1
10 0 1 1 1 10 0 1 1 1

Figure 3.23: Example: looping 0s or 1s gives same result expressed in different ways

The Sum of Products expression obtained by looping the 1s is:

x = AD + BD + BC + AC

page 45 of 101
42

while the Product of Sums expression obtained by looping 0s is:

x = (C + D) (A + B)

Opening the brackets of the Product of Sums expression will yield the Sum of Prod-
ucts expression obtained by looping the 1s, showing the two expressions are equiva-
lent.

3.2 Don’t Care Terms

These are also referred to as Unused terms, Forbidden terms or Redundant terms.
These terms describe combinations of variables which never occur in practice. In a
truth-table or a K-map, these inputs are represented by an X, an R or a d. As an
example, suppose that we have a digital circuit with three inputs and one output,
and the input combinations 000, 001 and 010 give an output 0, input combinations
101, 110 and 111 give an output 1, and input combinations 011 and 100 never occur
in practice. The truth-table for this circuit is as shown below:

A B C output
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 X
1 0 0 X
1 0 1 1
1 1 0 1
PSfrag replacements
1 1 1 1
When designing with K-maps containing don’t care variables, the designer can make
the output of any don’t care condition either a 1 or a 0 in order to produce the sim-
plest output expression. This is illustrated on Figure 3.24 for the truth-table above.

AB AB
C ĀB̄ ĀB AB AB̄ C ĀB̄ ĀB AB AB̄
C̄ 0 0 1 X C̄ 0 0 1 1

C 0 X 1 1 C 0 0 1 1

x = Ā

Figure 3.24: Example: simplifying a Boolean expression with don’t care terms

page 46 of 101
43

3.3 NAND/NOR gate circuit implementation

To implement a logic circuit using NAND gates only:

1. Derive the minimized expression for the function in sum of products form (ob-
tained by minimizing Boolean expressions algebraically or by looping 1s in a
K-map).

2. Apply double negation and De Morgan’s theorem to convert the expression in


a form suitable for NAND gate implementation.

As an example, suppose a design problem resulted in a minimized sum of products


expression:
x = AB + BC + AC
and we were to implement this expression using NAND gates only, we then apply the
above steps as follows:

x = AB + BC + AC = AB + BC + AC

= AB · BC · AC
which is implemented as shown on Figure 3.25.

A
PSfrag replacements
B x

Figure 3.25: Example: implementation using NAND gates only

To implement a logic circuit using NOR gates only:

1. Derive the minimized expression for the function in product of sums form (ob-
tained by looping the 0s in a K-map).

2. Apply double negation and De Morgan’s theorem to convert the expression in


a form suitable for NOR gate implementation.

As an example, suppose a design problem resulted in a minimized product of sums


expression:
x = (A + B) (B + C) (A + C)

page 47 of 101
44

and we were to implement this expression using NOR gates only, we then apply the
above steps as follows:

x = (A + B) (B + C) (A + C) = (A + B) (B + C) (A + C)

= (A + B) + (B + C) + (A + C)
which is implemented as shown on Figure 3.26.

A
PSfrag replacements
B x

Figure 3.26: Example: implementation using NOR gates only

page 48 of 101
BTECH. ELECTRICAL AND ELECTRONICS ENGINEERING

EET 3256: DIGITAL ELECTRONICS I


Assignment 1.
Due date: 8th April 2023.

a) Express the following numbers in decimal:


i. (11001.1011)2
ii. (A3.C)16
iii. (75.16)8
iv. (ABCD)16
b) Convert the following binary numbers to hexadecimal and decimal:
i. 1.1101012
ii. 1110.1012

c)

d)

e)

f)
g)

h)

i)

j)

k)

You might also like