0% found this document useful (0 votes)
53 views

Unit2 STLD

The document discusses Boolean algebra and its applications in switching theory and logic design. It defines the basic postulates of Boolean algebra including associativity, commutativity, distributivity, identity, and complement. It also discusses universal logic gates, canonical and standard forms, Karnaugh maps, and don't care terms which allow for simplifying Boolean functions and optimizing logic circuit design.
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)
53 views

Unit2 STLD

The document discusses Boolean algebra and its applications in switching theory and logic design. It defines the basic postulates of Boolean algebra including associativity, commutativity, distributivity, identity, and complement. It also discusses universal logic gates, canonical and standard forms, Karnaugh maps, and don't care terms which allow for simplifying Boolean functions and optimizing logic circuit design.
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/ 73

Switching Theory and Logic Design

Boolean Algebra
Boolean Algebra

• A set B of elements (a,b,c,….) with an equivalence


relation( =), two binary operations( + and .) and a
unary operation( complementation – denoted by ‘ ) is a
boolean algebra if and only if the following postulates
are satisfied.
• Associativity
• Commutativity
• Distributivity
• Identity
• Complement
P.1 ) Associativity :-
The + and . Operators are associative
(a+b)+c = a+(b+c)
(ab)c = a(bc) = abc

P.2) Commutativity
The + and . Operators are commutative
a + b = b+ a
ab = ba
P.3) Distributivity :-
a + bc = (a+b)(a+c)
a( b+c) = ab+ ac

P.4)Identity Elements
There exists an identity element (denoted by 0) for the
+ operation and another (denoted by 1) for the .
Operation within B such that
a+ 0 = a
a .1=a
 P.5) Complement
Each member of B has a complement within B such
that if a’ is the complement of a , then

a + a’ = 1
aa‘ = 0
Fundamental Theorms on Boolean Algebra
1) Closure of Identity Elements
For all a€B, a+1 = 1 and a.0=0

2) Equality Theorem
For all a,b,c € B ,
if a+b = a+c and ab= ac, then b = c
Complementary Theorem

• For all a,b €B, if a+b =1 and ab=0, then a = b’ and


b=a’
DeMorgan’s Theorem

(a+b)’ = a’b’ and


(ab)’ = a’ + b’
Boolean Constants, Variables & Functions
 The Boolean algebra contains two constants 0 and 1
 Any characters in lowercase or uppercase are used
as Boolean Variables
Boolean Functions

 Any Boolean constants, variables, itself or combined


with any of three operations(logical sum, logical
product & complement) will give a Boolean
expression. Any boolean expression can be written
as a Boolean Function
F = A’B + (AB)’
The above mentioned Boolean algebra is also called
Switching algebra since the two constant values 0
and 1 represent off & on respectively in a circuit
Principle of Duality
Each postulate consists of two expressions statement
one expression is transformed into the other by
interchanging the operations (+) and (⋅) as well as the
identity elements 0 and 1. Such expressions are
known as duals of each other. If some equivalence is
proved, then its dual is also immediately true.
E.g. If we prove: (x.x)+(x’+x’)=1, then we have by
duality: (x+x)⋅(x’.x’)=0
Universal Logic Gates
NAND and NOR gates are called Universal gates.
All fundamental gates (NOT, AND, OR) can be realized by using
either only NAND or only NOR gate.
A universal gate provides flexibility and offers enormous
advantage to logic designers.
NAND as a Universal Gate NAND Known as a “universal” gate because ANY
digital circuit can be implemented with NAND gates alone. To prove the
above, it suffices to show that AND, OR, and NOT can be implemented
using NAND gates only.
Algebraic Manipulation (Minimization of Boolean
function)
• Boolean algebra is a useful tool for simplifying digital
circuits.
• Why to do it? Simpler can mean cheaper, smaller,
faster.
Example: Simplify F = x’yz + x’yz’ + xz.
F= x’yz + x’yz’ + xz
= x’y(z+z’) + xz
= x’y•1 + xz
= x’y + xz
Complement of a Function 
The complement of a function is derived by interchanging (• and
+), and (1 and 0), and complementing each variable.
Otherwise, interchange 1s to 0s in the truth table column
showing F.
The complement of a function IS NOT THE SAME as the dual of a
function.

Example • Find G(x,y,z), the complement of F(x,y,z) = xy’z’ + x’yz


Ans: G = F’ = (xy’z’ + x’yz)’
= (xy’z’)’ • (x’yz)’ DeMorgan
= (x’+y+z) • (x+y’+z’) DeMorgan again

Note: The complement of a function can also be derived by


finding the function’s dual, and then complementing all of the
literals
Boolean Functions & Logical Operations

 A Boolean variable in the true form or in the


complemented form is called a literal.
 Eg: a,a’,b,b’
 The Boolean product of two or more literals is called
a product term
 Eg: ab’c , a’bc’
 The Boolean sum of two or more literals is called a
sum term
 Eg: (a+b’+c’) , (a’+b+c’)
Canonical and Standard Forms
We need to consider formal techniques for the
simplification of Boolean functions. Identical
functions will have exactly the same canonical
form.
•Minterms and Maxterms
• Sum-of-Minterms and Product-of- Maxterms
• Product and Sum terms
• Sum-of-Products (SOP) and Product-of-Sums
(POS)
Definitions
Literal: A variable or its complement
Product term: literals connected by •
Sum term: literals connected by +
Minterm: a product term in which all the variables appear exactly
once, either complemented or uncomplemented.
Maxterm: a sum term in which all the variables appear exactly
once, either complemented or uncomplemented.
Canonical form: Boolean functions expressed as a sum of
Minterms or product of Maxterms are said to be in canonical
form.
Canonical Forms

• Every function F() has two canonical forms:


–Canonical Sum-Of-Products (sum of minterms) or disjunctive
canonical form(DCF)
– Canonical Product-Of-Sums (product of maxterms) or conjunctive
canonical form(CCF)

Canonical Sum-Of-Products: The minterms included are those mj


Canonical Product-Of-Sums: The maxterms included are those Mj
Conversion of SOP from standard to canonical form
Example. Express the Boolean function F = A + B’C as a sum of minterms.

Solution: The function has three variables: A, B, and C


. The first term A is missing two variables; therefore, A = A(B + B’) = AB + AB’ This
function is still missing one variable,
so A = AB(C + C’) + AB’ (C + C’) = ABC + ABC’ + AB’C + AB’C’
The second term B’C is missing one variable; hence, B’C = B’C(A + A’) = AB’C +
A’B’C Combining all terms, we have F = A + B’C = ABC + ABC’ + AB’C + AB’C’+
A’B’C
But AB’C appears twice, and according to theorem (x + x = x), it is possible to
remove one of those occurrences.
Rearranging the minterms in ascending order, we finally obtain
F = A’B’C + AB’C + AB’C + ABC’ + ABC = m1 + m4 + m5 + m6 + m7
When a Boolean function is in its sum‐of‐minterms form, it is sometimes
convenient to express the function in the following brief notation: F(A, B, C) =
∑m (1, 4, 5, 6, 7)
Example. Express the Boolean function F = xy + x’z as a product of maxterms.

Solution: First, convert the function into OR terms by using the distributive law:
F = xy + x’z = (xy + x’)(xy + z)
= (x + x’)(y + x’)(x + z)(y + z)
= (x’+ y)(x + z)(y + z)
The function has three variables: x, y, and z. Each OR term is missing one
variable; therefore,
x’+ y = x’ + y + zz’
= (x’ + y + z)(x’ + y + z’)
x + z = x + z + yy’
= (x + y + z)(x + y’ + z)
y + z = y + z + xx’
= (x + y + z)(x’ + y + z)
Combining all the terms and removing those which appear more than once, we
finally obtain F = (x + y + z)(x + y’ + z)(x’ + y + z)(x’ + y + z)
F= M0M2M4M5 A convenient way to express this function is as follows:
F(x, y, z) = πM(0, 2, 4, 5) The product symbol, π, denotes the ANDing of
maxterms; the numbers are the indices of the maxterms of the function.
 Express the following function in a canonical form
 F = ab’+bc’+ac
 F= a’+bc

 Express the following function in a canonical form


 F = (a+b)(b+c’)
 F(a,b,c)= a+b
Fundamental Products and Sums
 A product term of n variables is called a minterm of n
variables.
 Eg: ab’c’ , ab’c’
 The no.of all possible minterms of n variables is 2n.
 A minterm is also called a fundamental product.

 A sum term of n variables is called a maxterm of n variables


 Eg: (a+b+c+d), (a+b’+c+d’)
 The no.of all possible maxterms of n variables is 2n.
 A maxterm is also called a fundamental sum.
 Disjunctive canonical normal form(DCNF) of a Boolean
function is a sum of minterms and the conjunctive
canonical normal form(CCNF) is a product of maxterms.
 F=a’b’c’ + a’b’c + abc
∑ Indicates that the
= m0+m 1+m 7 terms are minterms and
= ∑(0,1,7) the function is a

F = (a+b+c)(a’+b’+c)(a’+b’+c’) ∏ Indicates that the


= M 0M 6 M 7 terms are maxterms and
= ∏(0,6,7) the function is a product
Self Dual Function
 Ifa Boolean function and its dual are the same, then
the function is called a self-dual function
 Check whether the given function is self dual or not
f= ab+ac+bc
 Check whether f = b’(a’c’+ac) + b(a’c +ac’) is self
dual or not
Karnaugh Maps(Veitch Diagram)
 The number of gates required and the number of
input terminals for the gates for the implementation
of a Boolean function get reduced considerably if the
Boolean function can be simplified.
 Karnaugh Map method gives a systematic approach
for simplifying a Boolean expression.
 K-map contains boxes called cells. Each of the cell
represents one of the 2n possible products(of the
variables) that can be formed from n variables.

 Thus a 3-variable map contains 8 cells, 2 variable-4


cells, 4 variable-16 cells.
 Each nearby cells represents only one bit change.
 Numbering of each cells will be done based on the
gray code sequence.
K-map representation
Plotting SOP form in K-map
Plotting POS form in K-map
K-map minimization
 Two cells are said to be adjacent if there is only one
bit change among the cells.
 Group those cells and eliminate variables which is in
true form and complementary form.
Ex: Reduce the expression f=∑m(0,2,3,4,5,6) using mapping and implement it in
AOI logic as well as in NAND logic.

AOI logic
NAND logic.
4 Variable K Map example:
Don’t care terms

Don’t cares in a Karnaugh map, or truth table, may be


either 1s or 0s, as long as we don’t care what the output is
for an input condition we never expect to see. We plot
these cells with an asterisk, *, among the normal 1s and 0s.
When forming groups of cells, treat the don’t care cell as
either a 1 or a 0, or ignore the don’t cares.
This is helpful if it allows us to form a larger group than
would otherwise be possible without the don’t cares. There
is no requirement to group all or any of the don’t cares.
5 variable K-Map in Digital Logic
f ( P Q R S T)
Subcube 1: The one marked in red comprises of cells
( 0, 4, 8, 12, 16, 20, 24, 28)
Subcube 2: The one marked in blue comprises of
cells (7, 23)
Subcube 3: The one marked in pink comprises of
cells ( 0, 2, 8, 10, 16, 18, 24, 26)
Subcube 4: The one marked in yellow comprises of
cells (24, 25, 26, 27)
Prime Cubes
 Each cells in the k-map corresponds to minterms is
called a cube.
 A cube of a given function that can not grow larger
by expanding into other cubes of the function is
called a prime cube(PC) or a prime implicant (PI) of
the function.
Essential Prime Cubes
 Ifamong the minterms subsuming a prime cube,
there is at least one that is covered by this and only
this prime cube, then the prime cube is called an
essential prime cube (EPC) or an essential prime
implicant(EPI)
Redundant Prime Cubes
 Ifeach of the minterms subsuming a prime cube is
covered by other essential prime cubes, then the
prime cube is a redundant prime cube(RPC) or a
redundant prime implicant
Quine-Mc Cluskey Minimization
 wrt to minimization, K-maps Only good for:
 Small functions (<6variables)
 Single output function at a time

 NotImplementable on Computer
 Subjective Interpretation, Different Coverings
 Q-M (Tabular Minimization) Solves These Problems
Procedure

F (w,x,y,z)= (0,1,2,3,5,7,8,10,14,15)
 Write the binary equivalent of all the minterms.
 Group all the minterms by the no of 1s they contain.
Step 1
0 0000
1 0001
2 0010
8 1000
3 0011
5 0101
10 1010
7 0111
14 1110
15 1111
 Combine the members of new groups to create more
new groups.
 Combined group must differ by one bit and must
have – in the same position.
 Combine as much as possible.
 Select prime implicants to cover all the ones.
Finding Prime Implicants
Step 1 Step 2 Step 3
0 0000 (0,1) 000- (0,1,2,3) 00--
1 0001 (0,2) 00-0 (0,2,1,3) 00--
2 0010 (0,8) -000
(1,3) 00-1 (0,2,8,10) -0-0
8 1000
3 0011 (1,5) 0-01 (0,8,2,10) -0-0
(2,3) 001- (1,3,5,7) 0--1
5 0101
10 1010 (2,10) -010
(8,10) 10-0 (1,5,3,7) 0--1
7 0111
14 1110 (3,7) 0-11 6 Prime Implicants
15 1111 (5,7) 01-1
1-10 00--
(10,14) 1-10
-111 -0-0
(7,15) -111
111- 0--1
(14,15) 111-
Finding Prime Implicants
Step 1 Step 2 Step 3
0 0000 (0,1) 000- (0,1,2,3) 00--
1 0001 (0,2) 00-0 (0,2,1,3) 00--
2 0010 (0,8) -000
(1,3) 00-1 (0,2,8,10) -0-0
8 1000
3 0011 (1,5) 0-01 (0,8,2,10) -0-0
(2,3) 001- (1,3,5,7) 0--1
5 0101
10 1010 (2,10) -010
(8,10) 10-0 (1,5,3,7) 0--1
7 0111
14 1110 (3,7) 0-11 6 Prime Implicants
15 1111 (5,7) 01-1
1-10 00--
(10,14) 1-10
-111 -0-0
(7,15) -111
111- 0--1
(14,15) 111-
Find Essential Prime Implicants –
Prime Cube table
Prime Covered Minterms
Implicant minterms 0 1 2 3 5 7 8 10 14 15
1-10 10,14 X X
-111 7,15 X X
111- 14,15 X X
00-- 0,1,2,3 X X X X
-0-0 0,2,8,10 X X X X
0--1 1,3,5,7 X X X X

Essential Prime implicant


Here essential prime cubes are x’z’ & w’z
Selective Prime Cube Table

• In an SPC table, If a row I has crosses in


all columns where another row J has
crosses, and there is at least one more
column with a cross under I but not under
J, row I is said to dominate row J
• A row in an SPC table that is dominated
by another row of the same or smaller cost
can be deleted from the SPC table
14 15
A(10,14) *
B(7,15) *
C(14,15) * *

• As per the theorem , Here C can be


selected.

You might also like