0% found this document useful (0 votes)
7 views104 pages

Chapter 2 (Full) - Boelean Algebra & Logic Functions

Chapter 2 covers Boolean algebra and logic functions, detailing logic functions, gates, circuits, and their representations through truth tables. It introduces minterms and maxterms for n-variable functions and discusses standard forms of Boolean expressions, including Sum of Products (SOP) and Product of Sums (POS). The chapter also explains Karnaugh maps for simplifying Boolean functions and the concept of adjacent cells in K-maps.

Uploaded by

nguyenducdo35
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)
7 views104 pages

Chapter 2 (Full) - Boelean Algebra & Logic Functions

Chapter 2 covers Boolean algebra and logic functions, detailing logic functions, gates, circuits, and their representations through truth tables. It introduces minterms and maxterms for n-variable functions and discusses standard forms of Boolean expressions, including Sum of Products (SOP) and Product of Sums (POS). The chapter also explains Karnaugh maps for simplifying Boolean functions and the concept of adjacent cells in K-maps.

Uploaded by

nguyenducdo35
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/ 104

Chapter 2

Boolean algebra
and Logic functions
Boolean algebra
and Logic functions

Logic functions, logic gates and logic circuits


Boolean algebra
Karnaugh map
Simplification Using Karnaugh Map
Part 1
Logic functions, logic gates
and logic circuits
Logic functions, logic gates
and logic circuits

The function x = f(A1, A2, …, AN) is called a


N-variable logic function if A1, A2, …,AN are logic
variables and x  X, with X={0,1}.

+ The right side: logic expression.


+ The left side: logic variable.

 Logic expression (Boolean expression) is an algebraic


expression with the operands are logic variables and
operators are basic logic operations.
Logic functions, logic gates
and logic circuits

Logic expressions  Logic circuits


Logic circuits  Logic expressions
The inputs of logic circuits  Logic variables
The outputs of logic circuits  The value of function

+ A logic circuit corresponding to a basic logic


operation of Boolean algebra is called the logic gate.
Logic functions, logic gates
and logic circuits

To describe the operation of a logic function or a circuit


 List all function’s values (the outputs of logic circuit)
based on the a combination of variables’ values
(The inputs of logic circuit)

 Truth table.
Truth Table

The Truth Table for a function x = f(A1, A2, …, AN)


is a table consisting of N+1 columns and 2N rows.
 display all function’s values based on the combination
of variables.

+ Given a set of values of logic variables


 calculate the corresponding function’s value.
Truth Table
Example: The Truth Table for the function x = f1(A,B)
and y = f2(A,B,C) is given as follows:
Basic logic operations
and logic gates
1. NOT operation and NOT gate
+ NOT operation:
One variable function.
Symbol: A  Complement of A, or NOT A
Truth Table:
Basic logic operations
and logic gates

+ NOT gate:

 is a digital circuit performing the NOT operation.


 has one input and one output.
Symbol:
Basic logic operations
and logic gates
+ Pulse diagram of NOT gate:
Basic logic operations
and logic gates

2. 2-input OR operation and gate


+ 2-input OR operation:
 2-variable function.
Symbol: A+B  A or B
Truth Table:
Basic logic operations
and logic gates

+ 2-input OR gate:

 is a digital circuit performing the OR operation.


 has two inputs and one output.
Symbol:
Basic logic operations
and logic gates
+ Pulse diagram of 2-input OR gate:
Basic logic operations
and logic gates

3. 2-input AND operation and gate


+ 2-input AND operation:
 2-variable function.
Symbol: A.B  A and B
Truth Table:
Basic logic operations
and logic gates

+ 2-input AND gate:

 is a digital circuit performing the AND operation.


 has two inputs and one output.
Symbol:
Basic logic operations
and logic gates
+ Pulse diagram of 2-input AND gate:
Basic logic operations
and logic gates
4. 2-input NOR operation and NOR gate.
+ 2-input NOR operation:
 2-variable function.
Symbol: A +B  A nor B
Truth Table:
Basic logic operations
and logic gates
+ 2-input NOR gate:

is a digital circuit performing the NOR operation.


has two inputs and one output.
Symbol:

Meaning:
Basic logic operations
and logic gates
+ Pulse diagram of 2-input NOR diagram:
Basic logic operations
and logic gates
Basic logic operations
and logic gates
Basic logic operations
and logic gates
Basic logic operations
and logic gates
Basic logic operations
and logic gates
Basic logic operations
and logic gates
Basic logic operations
and logic gates
Basic logic operations
and logic gates
Basic logic operations
and logic gates
Basic logic operations
and logic gates
Theorems of logic algebra
Theorems of logic algebra

DeMorgan’s Theorem
(X+Y)’ = X’ . Y’
(X.Y)’ = X’ + Y’
The complement of the sum is the product of the complements
The complement of the product is the sum of the complements
In general
(A+B+….+Z)’ = A’ . B’ . … . Z’
(A.B.C….Z)’ = A’+ B’+ ….+Z’
PRACTICE

c
Chapter 2
Boolean algebra
and Logic functions
Part 2
Boolean algebra
Boolean algebra

A Minterm:

For an n-variable function, a minterm is a product term of n


variables in complemented or un-complemented form.
 If the variable’s value is 0  complemented form.

 If the variable’s value is 1  uncomplemented form.


Boolean algebra

A Minterm:
With n variables  2n minterms.
Symbol for minterm: mi , whereas i is the value of binary
combination of variables.

Example:
If X, Y and Z are the input variables, the minterms are:
X’Y’Z’ X’Y’Z X’YZ’ X’YZ XY’Z’ XY’Z XYZ’ XYZ
Boolean algebra

A Maxterm:

For an n variable function, a maxterm is a sum term of n


variables in complemented or un-complemented form.
If the value of variable is 1  complemented form.

If the value of variable is 0  uncomplemented form.


Boolean algebra
A Maxterm:

With n variables  2n maxterms.


Symbol for maxterm: Mi, whereas i is the value of binary
combination of variables.
Example:
If X, Y and Z are the input variables, the maxterms are:
X’+Y’+Z’ X’+Y’+Z X’+Y+Z’ X’+Y+Z X+Y’+Z’
X+Y’+Z X+Y+Z’ X+Y+Z
Boolean algebra
Boolean algebra

The complement of minterm is maxterm and vice versa

mi = M i

M i = mi
Boolean algebra

Standard (Canonical) forms of an expression


A switching function can be represented by several
different, but equivalent, algebraic expressions.
The standard form is a unique algebraic representation
of each function.

There are two Standard forms: SOP and POS


Boolean algebra

Standard form 1: (Standard Sum of Products - SOP)


 Express a Boolean function

Whereas:
mi is the ith minterm.
Fi is the F-function’s value corresponding to the ith minterm.
Example:
Boolean algebra
Boolean algebra

Example: Express the following functions in the


Standard form 1 in term of sum of minterms.
Boolean algebra

Example:
Write the expression form of the following functions.
Boolean algebra

Standard form 2: (Standard Product of Sums - POS)


 Express a Boolean function

Whereas:
Mi is the ith maxterm.
Fi is the F-function’s value corresponding to the ith maxterm.
Example:
Boolean algebra

Example: Express the following functions in the


Standard form 2 in term of product of maxterms.
Boolean algebra

Example:
Write the expression form of the following functions.

Transform the function F into Standard form 2.


Boolean algebra

Transform from the algebraic form into Truth Table form

1. Transform the expression form into Standard form 1.


Fill values “1” in the rows having the binary combinations
equals to the minterm indices of the expression. The other
rows will have F=0.
Boolean algebra
Boolean algebra
Boolean algebra

Transform from the algebraic form into Truth Table form

2. Transform the expression form into Standard form 2.


Fill values “0” in the rows having the binary combinations
equals to the maxterm indices of the expression. The other
rows will have F=1.
Boolean algebra
Boolean algebra
Boolean algebra

Transform from Truth Table form into the algebraic form

1. From the Truth Table, the Boolean function is equal to


the sum of minterms for which the output is one.

 the sum of minterms (also called the standard SOP) form


Boolean algebra

Example: Write the algebraic form of the following function


Boolean algebra

Transform from Truth Table form into the algebraic form

2. From the Truth Table, the Boolean function is equal to


the product of maxterms for which the output is 0.

the product of Maxterms (also called the standard


Product of Sums) form.
Boolean algebra
Example: Write the algebraic form of the following function
Boolean algebra

“Don’t care”
In practical, there are some cases in which the binary
combinations of variables does not exist. Thus, the output
(the value of the function) corresponding to these binary
combinations can be 0 or 1 (called “don’t care”), symbol “d”.
When filling in the Truth Table for the “don’t care” cases, the
symbol “x” is used.
Boolean algebra
Example:
Write the Truth Table for F
Boolean algebra
Example:
Write the Truth Table for F
Chapter 2
Boolean algebra
and Logic functions
Part 3
Karnaugh map
Karnaugh map

Karnaugh map

Karnaugh map (or K-map) is a method used to simplify


the Boolean function. Each cell of K-map expresses a
value of function F (0, 1 or x), corresponding to a row of
the Truth Table
Karnaugh map

2-variable K-map

The numbers in the cells of K-map


are the ordinal numbers of cells as
well as that of rows in the Truth
Table
Karnaugh map

3-variable K-map
Karnaugh map

4-variable K-map
Karnaugh map
5-variable K-map
Karnaugh map
Fill values in K-map:

1. If the function F is given in the Standard form 1 (-form)


 Fill “1” in cells having the ordinal numbers corresponding
to minterms,

 Fill “x” in cells having the ordinal numbers corresponding to


“don’t care”

 Fill “0” in the remained cells.

We can fill only two symbols “0” and “x” or “1” and “x” in the
K-map. The blank cells are implicit.
Fill in the K-map the following function

F(D,C,B,A) = (2,3,5,8,11,13,14) + d(1,4,15)

F DC F DC
00 01 11 10 00 01 11 10
BA BA
00 X 1 00 0 X 0
0 4 12 8 0 4 12 8

01 X 1 1 5 1 13 01 X 0
9
1 5 13 9

11 13 X15 1 11 11 0 X 15
7
3 7 11

10 12 6
1 14 10 0 0
10 2 6 14 10
Karnaugh map
Fill values in K-map:
2. If the function F is given in the Standard form 2 (-form)
 Fill “0” in cells having the ordinal numbers corresponding
to maxterms,

 Fill “x” in cells having the ordinal numbers corresponding to


“don’t care”
 Fill “1” in the remained cells.
We can fill only two symbols “0” and “x” or “1” and “x” in the
K-map. The blank cells are implicit.
Fill in the K-map the following function
F(A,B,C,D) = (4,5,12,14,15) . d(3,7,8,11)

F AB F AB
00 01 11 10 01 11 10
CD CD 00
00 0 4 0 12 X 8 00 1 X8
0 0 4 12

01 05 01 1 1 1
1 13 9 1 5 13 9

11 X 3 X 7 0 15 X 11 11 X3 X7 X 11
15

10 0 14 10 1 1 1
2 6 10 2 6 14 10
Karnaugh map
Fill values in K-map:

3. If the function F is based on the Truth Table


 Fill “0”, “1” or “x” in cells having the same binary
combinations in Truth Table.
Given the Truth Table, fill in the K-map:

A B C F F AB
C 00 01 11 10
0 0 0 0
0 0
1 2
X 6
1 4
0 0 1 0
1 1 3 7
X 5
0 1 0 1
0 1 1 0 F AB
1 0 0 1 C 00 01 11 10
1 0 1 x 0 0 0 2
X 6 4
1 1 0 x 1 0 1
0 3
0 7
X 5
1 1 1 0
Karnaugh map
Fill values in K-map:

4. If the function F is given in algebraic form

 Convert it into Standard from 1 or 2  fill in the K-map.


 If it has the form of SOP  transform it into Standard form 1.
 If it has the form of POS  transform it into Standard form 2.
Part 4
Simplification using
K-map
Simplify the Boolean function
using K-map

1. Definition of adjacent cells:

Two cells are adjacent if they lie close each other or they are
symmetric through axis. The feature of two adjacent cells is
they are corresponding to two minterms (or maxterms)
which are different in only 1 bit.
Simplify the Boolean function
using K-map

Definition of adjacent cells:


 4 cells are adjacent if they consist of 2 adjacent cells and
each cell of this group is adjacent to one cell of the other.
The above definition is applied similarly for 8
adjacent cells and 2n adjacent cells.

The adjacent cells are grouped if they have the same


1 or 0.
Simplify the Boolean function
using K-map
Example: 2 adjacent cells
Simplify the Boolean function
using K-map

Example: 4 adjacent cells


Simplify the Boolean function
using K-map

Example: 4 adjacent cells


Simplify the Boolean function
using K-map

Example: 8 adjacent cells


Simplify the Boolean function
using K-map
Grouping the adjacent cells
When grouping the adjacent cells having the same value “1”,
we obtain a product of variables having the same value:
 0 if variables are complemented.
1 if variables are not complemented.
(Variable with different values are omitted.)
Because two adjacent cells have the binary combinations
which are different in one variable  grouping two adjacent
cells can remove one variable.
Simplify the Boolean function
using K-map

Grouping the adjacent cells


When grouping the adjacent cells having the same value “0”,
we obtain a sum of variables having the same value:
 0 if variables are not complemented.
 1 if variables are complemented.
(Variable with different values are omitted.)
Because two adjacent cells have the binary combinations
which are different in one variable  grouping two adjacent
cells can remove one variable.
Simplify the Boolean function
using K-map

Similarly:

 When grouping 4 adjacent cells  remove 2 variables.


 When grouping 8 adjacent cells  remove 3 variables.
Generally:
When grouping 2n adjacent cells  n variables.
Simplify the Boolean function
using K-map

Example: Grouping 2 adjacent cells having value “1”


F F F
AB AB AB
00 01 11 10 00 01 11 10 00 01 11 10
CD CD CD
00 00 1 00

01 01 01

11 11 11 1 1

10 1 1 10 1 10
Simplify the Boolean function
using K-map

Example: Grouping 4 adjacent cells having value “1”


F F F
AB AB AB
00 01 11 10 00 01 11 10 00 01 11 10
CD CD CD
00 00 1 1 1 1 00

01 01 01 1 1

11 1 1 11 11 1 1

10 1 1 10 10
Simplify the Boolean function
using K-map

Example: Grouping 4 adjacent cells having value “1”


F F F
AB AB AB
00 01 11 10 00 01 11 10 00 01 11 10
CD CD CD
00 1 00 1 1 00 1 1

01 1 01 01

11 1 11 11

10 1 10 1 1 10 1 1
Simplify the Boolean function
using K-map

Example: Grouping 8 adjacent cells having value “1”


F F F
AB AB AB
00 01 11 10 00 01 11 10 00 01 11 10
CD CD CD
00 1 1 00 1 1 1 1 00 1 1

1 1 01 01 1 1
01
1 11 11 1 1
11 1
10 1 1 10 1 1 1 1 10 1 1
Simplify the Boolean function
using K-map

Example: Grouping 2 adjacent cells having value “0”


F F F
AB AB AB
00 01 11 10 00 01 11 10 00 01 11 10
CD CD CD
00 00 0 00

01 01 01

11 11 11 0 0

10 0 0 10 0 10
Simplify the Boolean function
using K-map

Example: Grouping 4 adjacent cells having value “0”


F F F
AB AB AB
00 01 11 10 00 01 11 10 00 01 11 10
CD CD CD
00 00 0 0 0 0 00

01 01 01 0 0

11 0 0 11 11 0 0

10 0 0 10 10
Simplify the Boolean function
using K-map

Example: Grouping 4 adjacent cells having value “0”


F F F
AB AB AB
00 01 11 10 00 01 11 10 00 01 11 10
CD CD CD
00 0 00 0 0 00 0 0

01 0 01 01

11 0 11 11

10 0 10 0 0 10 0 0
Simplify the Boolean function
using K-map

Example: Grouping 8 adjacent cells having value “0”


F F F
AB AB AB
00 01 11 10 00 01 11 10 00 01 11 10
CD CD CD
00 0 0 00 0 0 0 0 00 0 0

0 0 01 01 0 0
01
0 11 11 0 0
11 0
10 0 0 10 0 0 0 0 10 0 0
Simplify the Boolean function
using K-map

Simplify the following function:

F
AB
00 01 11 10
CD
00 1 1 1 1
01 1 1 1 1

11
10 1 1 1
Simplify the Boolean function
using K-map

Simplify the following function:

F
AB
00 01 11 10
CD
00 1 1
01 1 1

11
10 1 1 1
Simplify the Boolean function
using K-map

Simplify the following function:

F
AB
00 01 11 10
CD
00 0 0 0 0
01 0 0 0 0

11
10 0 0 0
Simplify the Boolean function
using K-map

Simplify the following function:


F(D,C,B,A) = (2,3,5,8,11,13,14) + d(1,6,9,10,15)
F
AB
CD
00 01 11 10 C’D
B’D 00 1
x 1 1 x
01 AB’
11 1 x 1
10 1 x 1 x
CD’
Simplify the Boolean function
using K-map

Simplify the following function:


F(D,C,B,A) = (2,3,5,8,11,13,14).d(1,6,9,10,15)
F
AB
CD
00 01 11 10 C+D’
B+D’ 00 0
x 0 0 x
01 A’+B
11 0 x 0
10 0 x 0 x
C’+D
Simplify the Boolean function
using K-map

Simplify the following functions:


Simplify the Boolean function
using K-map

Simplify the following functions:

0
Simplify the Boolean function
using K-map

Simplify the following functions:


Simplify the Boolean function
using K-map

Simplify the following functions:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy