0% found this document useful (0 votes)
71 views64 pages

Lecture3 - Logic Operation Fundamentals

This document discusses logic operation fundamentals including: 1. Basic logic operations of AND, OR, and NOT along with their truth tables and logic symbols. 2. Logic expressions and operations for multiple inputs including AND, OR, NAND, NOR, and XOR. 3. Equivalent logic symbols for NOT, NAND, and AND gates.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views64 pages

Lecture3 - Logic Operation Fundamentals

This document discusses logic operation fundamentals including: 1. Basic logic operations of AND, OR, and NOT along with their truth tables and logic symbols. 2. Logic expressions and operations for multiple inputs including AND, OR, NAND, NOR, and XOR. 3. Equivalent logic symbols for NOT, NAND, and AND gates.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 64

Lecture 3:

Logic Operation Fundamentals

 Basic logic operation


 Boolean algebra
 Logical function expression
 Logic Simplification by Karnaugh Map
Basic logic operation

In digital circuits, the most basic elements of circuits are


logic gates that can perform logic operations.

The three basic operations are AND, OR and NOT.


We can use these basic operations to carry out very
complex operations.
Basic logic operation
 AND logic operation
The result is true none but the all of conditions are true.
For the case of two conditions
If using A and B to express two conditions, L to express the result.
truth table truth table
Logic expression:
A B L A B L
L = A  B = AB false false false true = 1 0 0 0
  false true false 0 1 0
true false false false = 0 1 0 0
What is a truth table? true true true 1 1 1

The truth table is such a table that lists all possible combinations of all
conditions and corresponding results
Basic logic operation
Any 0 then 0, all 1s then 1
 AND logic operation truth table truth table
A B L A B L
Logic expression: false false false true = 1 0 0 0
L = A  B = AB false true false 0 1 0
true false false false = 0 1 0 0
  true true true 1 1 1

Logic symbol: (AND gate) true = high high = 1


false = low low = 0
A truth table (voltage level)
(inputs) L (output)
B A B L
low low low
(AND standard distinctive shape symbol) low high low
high low low
The output is 0 as long as any input is 0 high high high
The output is 1 none but all of inputs are 1s
Basic logic operation
Any 0 then 0, all 1s then 1
 AND logic operation truth table (voltage level) truth table
A B L A B L
Logic expression: low low low 0 0 0
low high low high = 1 0 1 0
L = A  B = AB
high low low 1 0 0
  high high high
low = 0
1 1 1
Logic symbol: (AND gate)
A
(inputs) L (output) A
B
B
(AND standard distinctive shape symbol)
L
Pulsed operation
Basic logic operation
 AND logic operation
For more than two inputs

Logic symbol: Logic expression:


A
B L = ABC ...
 
L
C .
.
.
Basic logic operation
 OR logic operation
The result is true as long as anyone of all conditions is true.
For the case of two conditions Logic symbol: (OR gate)
Logic expression: truth table
A
A B L
L B
L=A+B  
0 0 0
0 1 1 Pulsed operation:
The plus sign indicates 1 0 1 A
1 1 1
logic OR operation
(true = 1, false = 0) B

Any 1 then 1, all 0s then 0 L


Basic logic operation
 OR logic operation
For more then two inputs

Logic symbol: Logic expression:


A
B L = A+B+ C+ ...
L
C .
.  
.
Basic logic operation
 NOT logic operation
The result and the condition are opposite.
truth table
Logic expression: Logic symbol: (NOT gate)
A L
L=A   0 1
A L
1 0
Pulsed operation: (true = 1, false = 0)

L
Other logic operation
 NAND logic operation
When any of the inputs is LOW, the output will be HIGH.
For the case of two inputs Logic symbol: (NAND gate)
truth table
A
A B L L
Logic expression: B
0 0 1
L  AB 0
1
1
0
1
1
Pulsed operation:
A
1 1 0
B

Any 0 then 1, all 1s then 0 L


Other logic operation
 NOR logic operation
All of the inputs are LOW, the output is HIGH.
Truth table A
Logic expression: Z
A B L B
0 0 1
L  A B 0 1 0 Logic symbol
1 0 0
Pulsed operation:
1 1 0
A
Any 1 then 0, all 0s then 1
B

L
Other logic operation
 Exclusive-OR (XOR) logic operation
Only if both input states are different, the output is HIGH.
XOR gate only has two inputs. A
Truth table
L A B L Z
B
Logic symbol 0 0 0 1
0 1 1 0
L  AB  A B 1 0 1 0
1 1 0 1
 A B
Question: If L  AB  A B Z  A B  AB
What is the relation between L and Z ? A
Z
B
Z is exclusive-NOR (XNOR) logic operation.
Logic symbol
Equivalent logic symbols
A Z  A Z

NOT gate Equivalent for a


NOT gate

A
A
B
Z  A
B
Z B
Z  A
B Z

Equivalent for a AND gate Equivalent for a


NAND gate
NAND gate AND gate

A
A
B
Z  A
B
Z B
Z  A
B
Z

Equivalent for a OR gate Equivalent for a


NOR gate
NOR gate OR gate
The topic we’ll discuss

 Basic logic operation


 Boolean algebra
 Logical function expression
 Logic Simplification by Karnaugh Map
Boolean algebra

In 1854, the logical algebra known today as Boolean


algebra was founded and formulated in publication written
by George Boole.

In 1938, Claude Shannon was the first to apply Boole’s work


to the analysis and design of logic circuits.
Boolean algebra
Boolean algebra is the mathematics of digital systems.
A basic knowledge of Boolean algebra is indispensable to the
study and analysis of logic circuits.
It is a convenient and systematic way of expressing and
analyzing the operation of logic circuits.

The basic knowledge of Boolean algebra includes 3 laws, 12


basic rules and 2 theorems (DeMorgan’s theorems)
Laws of Boolean algebra
 Commutative laws
A+B=B+A A·B=B·A
 Associative laws
A + ( B + C ) = (A + B) + C A · ( B · C ) = (A · B) · C

 Distributive law
A ( B + C ) = AB + AC

Here, each of the laws is illustrated with two or three variables, but
the number of variables is not limited to this.
Rules of Boolean algebra The proofs of these rules
are shown in textbook page
 12 basic rules 168-170

1. A  0  A 7. A  A  A
2. A  1  1 8. A  A  0
3. A  0  0 9. A  A
4. A 1  A 10. A  AB  A
5. A  A  A 11 . A  A B  A  B
6. A  A  1 12. ( A  B )( A  C )  A  BC

A, B, or C can represent a single variable or a combination of variables.


Rules of Boolean algebra
 12 basic rules
Prove the rule 11 A  AB  A  B
Solution A  A B  A 1  A B A 1  A
 A(1  B )  A B A1 1
 A  AB  A B Distributive law
 A  ( A  A )B Distributive law
 A  1 B A A  1
 A B A 1  A
Theorems of Boolean algebra
 (DeMorgan’s theorems)
 The complement of a product of variables is equal to the sum
of the complements of the variables.
ABC     A  B  C    
 The complement of a sum of variables is equal to the product
of the complements of the variables.
A  B  C    A  B C 
Each variable can also represent a combination of other variables.
Example AB(C  D )     A  B  C  D      A  B  C  D    
A  B  CD      A  B  CD     A  B  (C  D )   
Theorems of Boolean algebra
 (DeMorgan’s theorems)
Prove them by the truth table (two variables)
AB  A  B
Prove: DeMorgan’s theorems
A B AB AB A B A  B are often applied to
0 0 0 1 1 1 1 logical function
0 1 0 1 1 0 1 transformation and
1 0 0 1 0 1 1 simplification
1 1 1 0 0 0 0

Two columns are equivalent that means: AB  A  B


The topic we’ll discuss

 Basic logic operation


 Boolean algebra
 Logical function expression
 Logic Simplification by Karnaugh Map
Logical function expression

 Standard forms of Boolean expressions (include


SOP, standard SOP, POS, and standard POS)
 Conversion of Boolean expressions
 Expressing of logical functions
Logical function expression
 Standard forms of Boolean expressions
All expressions can be converted into the Sum-of-Products form or
the Product-of-Sums form. It makes the evaluation,
simplification, and implementation of Boolean expressions
much more systematic and easier.

The Sum-of-Products form abbreviated SOP

The Product-of-Sums form abbreviated POS


Standard forms of Boolean expressions
 The SOP form (Sum-of-Products)
Two or more product terms are summed by Boolean addition.
Which belong to SOP form?
AB  ACD√ AB  A C D √ A( B  C )
AB  A CD A B C √
! A single overbar cannot extend over than one variable.
! A product term can be only one variable.
Are these product terms?
A BC AB  C A BC ABC √
Standard forms of Boolean expressions
 The standard SOP form (sum of minterms)
A standard SOP expression is one in which all the variables in the
domain appear in each product term in the expression.
The domain is the set of variables contained in the expression in either
original or complemented form. Such product term is
Which are standard SOP form? called standard product
term or minterm
AB  AC AB C  A BC  ABC √
AB CD  A B CD  A BCD AB CD  A B CD  A BCD √
! Each variable must appear once in each product term with the original
variable or the complementary variable (inverse variable).
Standard forms of Boolean expressions
 The speciality of the standard product terms (minterms)
 If the number of variables in the domain is n, the number of
standard product terms is 2n.
 A standard product term equal to 1 for only one combination of
variable values.
Example For a standard product term A BCD
Here, n = 4, the number of standard product terms is 16.
And only when A  0, B  1, C  1, D  0
Then A BCD  0  1  1  0  1  1  1  1  1
Standard forms of Boolean expressions
 The speciality of the standard product terms (minterms)
Truth table of all standard product terms for three variables
A B C A B C A B C A BC A BC AB C AB C ABC ABC
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 0
0 1 1 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0
1 1 0 0 0 0 0 0 0 1 0
1 1 1 0 0 0 0 0 0 0 1
Standard forms of Boolean expressions
 Implementation of an SOP expression
For product operation using AND gate
For sum operation using OR gate
For complement (overbar) operation using NOT gate
Example Implementing an SOP expression A B  ABC  C
A A AB

B ABC A B  ABC  C
C
C
Logical function expression

 Standard forms of Boolean expressions (include


SOP, standard SOP, POS, and standard POS)
 Conversion of Boolean expressions
 Expressing of logical functions
Conversion of Boolean expression
 Convert each of the following expression to SOP form:
(a ) ( A  B )( B  C  D ) (b) A  B  C
Solution
(a ) ( A  B )( B  C  D ) (b) A  B  C
(DeMorgan’s
 AB  AC  AD  BC  BD  A BC theorems)
(Distributive law)  ( A  B)  C AA

The same logical function can be  AC  BC


expressed many different forms of
Boolean expressions
 Continuously convert them to standard SOP form:
Conversion of Boolean expression
 Continuously convert them to standard SOP form:

Solution
( b ) A  B  C  AC  BC
 AC  1  BC  1 ( A  1  A)
 A C  ( B  B )  BC ( A  A ) ( A  A  1)
 ABC  AB C  ABC  A BC (Distributive low )
Standard forms of Boolean expressions
 The POS form (Product-of-Sums) and standard POS
form (product of maxterms)

Learn it by yourself
Logical function expression

 Standard forms of Boolean expressions (include


SOP, standard SOP, POS, and standard POS)
 Conversion of Boolean expressions
 Expressing of logical functions
Expressing of logical functions
Three ways to express a logical function
1. Logical function expressions 3. Truth table
L  AC  B inputs output
A B C L
2. Logic circuit (logic diagram) 0 0 0 0
A 0 0 1 0
C 0 1 0 1
L
B 0 1 1 1
1 0 0 0
Note:
1 0 1 1
In truth table, all possible combinations of values
1 1 0 1
for the input variables should be listed. 1 1 1 1
It is often needed to convert between these three formats
Expressing of logical functions
 Converting SOP expressions to truth table format
Example develop a truth table for the standard SOP expression
L  A B C  AB C  ABC Truth table
inputs output
Solution 3 input variables A B C L
8 possible combinations 0 0 0 0
0 0 1 1
ABC  1 L1 0 1 0 0
AB C  1 L1 0 1 1 0
1 0 0 1
ABC  1 L1 1 0 1 0
1 1 0 0
1 1 1 1
Expressing of logical functions
 Converting SOP expressions to truth table format
Example develop a truth table for the SOP expression
L  AC  B Truth table
? inputs output
SOP Standard SOP Truth table A B C L
Solution As long as AC  1 0 0 0 0
0 0 1 0
Namely A  1 and C  0 0 1 0 1
Then L1 0 1 1 1
1 0 0 1
As long as B1 1 0 1 0
Then L1 1 1 0 1
1 1 1 1
Expressing of logical functions
 Converting truth table format to logic circuit
Step: Truth table Standard SOP SOP Logic circuit
Example: draw a logic circuit from the truth table Truth table
Solution inputs output
Determine the standard products
A B C L
corresponding to L=1
0 0 0 0
A BC A BC AB C ABC ABC 0 0 1 0
Standard SOP 0 1 0 1
L  A BC  A BC  AB C  ABC  ABC 0 1 1 1
1 0 0 0
Get SOP by simplifying 1 0 1 1
1 1 0 1
1 1 1 1
Expressing of logical functions
 Converting truth table format to logic circuit
Solution continuously (Distributive low )
Get SOP by simplifying L  A BC  A BC  AB C  ABC  ABC
 A B(C  C )  AB C  AB(C  C )
 A B  AB C  AB ( A  A  1, A  1  A)
Logic circuit  ( A  A) B  AB C (Distributive low )
A  B  AB C ( A  A  1, A  1  A)
C  B  AC ( A  A B  A  B)
L
B The simplification looks like difficult to you,
because it is difficult to determine if the
The simplified expression can result is simplest. It relies on your skill of
make logic circuit simpler Boolean algebra.
Expressing of logical functions Truth table
ABCD L
 Converting logic circuit to truth table 0000 0
0001 0
format 0010 0
0011 0
Step: Logic circuit SOP Truth table 0100 0
0101 0
Example: Determine a truth table for the logic 0110 0
circuit 0111 0
1000 0
D CD 1001 0
C B  CD 1010 0
B 1011 1
A L 1100 1
A( B  CD ) 1101 1
Solution 1110 1
1111 1
L  A( B  CD )  AB  ACD
Logical function expression

 Standard forms of Boolean expressions (include


SOP, standard SOP, POS, and standard POS)
 Conversion of Boolean expressions
 Expressing of logical functions

(Review this section)


The topic we’ll discuss

 Basic logic operation


 Boolean algebra
 Logical function expression
 Logic Simplification by Karnaugh Map
Logic Simplification by Karnaugh Map

 Karnaugh Map
 Mapping a logic function on K-Map
 Karnaugh Map Simplification
Karnaugh Map
 Karnaugh Map
A Karnaugh Map is a graphical representation of a logic
function’s truth table. Abbreviation K-Map.
 It is a graphical style.
 It can represent a logic function.
 It is similar to a truth table.

Usually, K-Map is used for expressions with three and four


variables.
Karnaugh Map
 The 3-variables K-Map
The number of cells in a K-Map is equal to the total number of
possible input variable combinations as is the number of rows in a truth
table. Here, the number of cells is 23=8. Truth table
C C
AB 0 1 AB 0 1 ABC Z
0 0 0
00 00 A B C A B C
0 0 1
01 01 A BC A BC 0 1 0
0 1 1
11 11 ABC ABC 1 0 0
10 10 AB C AB C 1 0 1
1 1 0
(Notice the sequence) 1 1 1
Standard product terms
Karnaugh Map
Truth table
 The 4-variables K-Map ABCD Z
0000
The number of cells is 24=16. 0001
0010
CD CD 0011
AB 00 01 11 10 AB 00 01 11 10 0100
00 00 A B C D A B C D A B CD A B CD 0101
0110
01 01 A BC D A BC D A BCD A BCD 0111
1000
11 11 ABC D ABC D ABCD ABCD
1001
1010
10 10 AB C D AB C D AB CD AB CD
1011
1100
1101
1110
1111
Karnaugh Map
 Cell adjacency
Why are the cells arranged like this sequence?
To ensure that there is only a CD
AB 00 01 11 10
single-variable change between
00 A B C D A B C D A B CD A B CD
adjacent cells.
01 A BC D A BC D A BCD A BCD
Adjacency is defined by a
11 ABC D ABC D ABCD ABCD
single-variable change.
10 AB C D AB C D AB CD AB CD

“wrap-around” adjacency
Next item we are going to discuss

 Karnaugh Map
 Mapping a logic function on K-Map
 logic Simplification by Karnaugh Map
Mapping a logic function on K-Map
 Mapping directly from a truth table
Z Truth table
C
AB 0 1 ABC Z
00 1 0 0 0 1
0 0 1 0
01
0 1 0 0
11 1 1 0 1 1 0
1 0 0 1
10 1 1 0 1 0
1 1 0 1
1 1 1 1
Mapping a logic function on K-Map
 Mapping a standard SOP expression
For a standard SOP expression, the 1 is placed on K-Map for
each product term in the expression.
Each 1 is placed in a corresponding to the value of a product term.
L
C
AB 0 1
Example :
00 1
L  A B C  A BC  ABC 01 1
001 010 110 11 1
10
Mapping a logic function on K-Map
 Mapping a nonstandard SOP expression
We can map a nonstandard SOP expression on a K-Map like filling
it in a truth table.
Example :
Truth table
L
L  A  AB  ABC ABC L C
AB 0 1
0 0 0 1
0 0 1 1 00 1 1
0 1 0 1 01 1 1
0 1 1 1
1 0 0 1 11 1
1 0 1 1
10 1 1
1 1 0 1
1 1 1 0
Mapping a logic function on K-Map
 Mapping a nonstandard SOP expression

Example :
L  A  C D  ACD  A BCD
L
CD
AB 00 01 11 10
00 1
01 1 1
11 1 1 1 1
10 1 1 1 1
Next item we are going to discuss

 Karnaugh Map
 Mapping a logic function on K-Map
 Karnaugh Map Simplification
Karnaugh Map Simplification
 The goal
The goal of using K-Map is to simplify logic functions.
The process that results in an expression containing the fewest
possible terms with the fewest possible variables is called
minimization.

When we obtain a minimum SOP expression, we can use


fewest possible logic gates to perform this logic function.
Karnaugh Map Simplification
 Simplifying principle with K-Map
Grouping any adjacent 2i ( i = 1, 2, 3, · · ·, n ) cells in the
K-Map which contain 1s will eliminate i variables.
Group 1
Group 1 creates the product term is CD
AB 00 01 11 10
A BC D  A BCD  A BD(C  C ) A B C D A B C D A B CD A B CD
00
 A BD
A BC D A BC D A BCD A BCD
01 1 1
Group 2 creates the product term is
ABC D ABC D ABCD ABCD
ABCD  ABCD  AB CD  AB CD 11 1 1
 ABC ( D  D )  AB C ( D  D ) AB C D AB C D AB CD AB CD
10 1 1
 ABC  AB C
 AC ( B  B ) Group 2
 AC
Karnaugh Map Simplification
 The steps of K-Map simplification
 Grouping the 1s
 Determining the product term for each group
 Summing the resulting product terms
Grouping the 1s
The goal is to maximize the size of the groups and minimize the number of groups.
Grouping the 1s rules
1. A group must contain either 1, 2, 4, 8, or 16 cells.
2. Each cell in a group must be adjacent to one or more cells in that same group.
3. Always include the largest possible number of 1s in a group.
4. Each 1 on the map must be included in at least one group.
5. The 1s already in a group can be included in another group as long as the
overlapping groups include non-common 1s.
Karnaugh Map Simplification must contain either 1, 2,
Each 1 must be included 4, 8, or 16 cells
 Step1: Grouping the 1s

include the largest


The 1 already in a group possible number of 1s

wrap-around adjacency
Karnaugh Map Simplification
 Step2: Determining the product term for each group
Variables that occur both uncomplemented and complemented within the group are
eliminated. These are called contradictory variables.

ABC
B
BC
AC

AC

AB
Karnaugh Map Simplification
 Step2: Determining the product term for each group
BC

AB D
AC

AB D
AB C
Karnaugh Map Simplification
 Step3: Summing the resulting product terms
ABC
B
BC
AC

AC

AB
Minimum SOP expression
A B C  BC  AB A C  AC  B
Karnaugh Map Simplification
 Step3: Summing the resulting product terms
BC

AB D
AC

AB D  A C  A B AB D
AB C  BC  D AB C
Karnaugh Map Simplification
 Example
Use a K-Map to simplify the following SOP expression:
W XY Z  WXYZ  WXY Z  W YZ  WXY Z

Solution: YZ
WX 00 01 11 10
Mapping the expression on a K-Map
00 1 1
Grouping the 1s
01 1
Determining the product terms and summing
them 11

WXZ  W YZ  XY Z 10 1 1 1
Karnaugh Map Simplification
 Example
Use a K-Map to simplify the following SOP expression:
W XY Z  WXYZ  WXY Z  W YZ  WXY Z

Solution: YZ
WX 00 01 11 10
Mapping the expression on a K-Map
00 1 1
Grouping the 1s
01 1
Determining the product terms and summing
them 11

WXZ  W YZ  XY Z 10 1 1 1

WXY  W YZ  XY Z  WXY Non-minimization


About simplification

 In practice there are many software that can help us


to do logic simplification. So it now becomes easier
than before.
 The goal that we learn it is to understand the aims,
the principles, the method, the meanings of logic
simplification.

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