0% found this document useful (0 votes)
18 views58 pages

DLD Unit 2

The document discusses logic functions and the role of logic gates in digital devices, highlighting basic types such as OR, AND, NOT, and XOR gates. It explains the representation of Boolean expressions through Sum of Products (SOP) and Product of Sums (POS) forms, along with their differences. Additionally, it covers minimization techniques for Boolean functions using algebraic manipulation and Karnaugh maps, emphasizing the importance of simplification in reducing circuit complexity and cost.

Uploaded by

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

DLD Unit 2

The document discusses logic functions and the role of logic gates in digital devices, highlighting basic types such as OR, AND, NOT, and XOR gates. It explains the representation of Boolean expressions through Sum of Products (SOP) and Product of Sums (POS) forms, along with their differences. Additionally, it covers minimization techniques for Boolean functions using algebraic manipulation and Karnaugh maps, emphasizing the importance of simplification in reducing circuit complexity and cost.

Uploaded by

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

Logic functions

• digital devices that are mainly based on the Boolean


function. Logic gates are used to carry out logical operations
on single or multiple binary inputs and give one binary
output. In simple terms, logic gates are the electronic circuits
in a digital system.
• Types of Basic Logic Gates
• There are several basic logic gates used in performing
operations in digital systems. The common ones are
• OR Gate
• AND Gate
• NOT Gate
• XOR Gate
• Additionally, these gates can also be found in a combination
of one or two. Therefore, we get other gates, such as NAND
Gate, NOR Gate, EXOR Gate and EXNOR Gate.
SOP and POS in Digital Logic
The inputs and output of a function are in the form of
binary numbers (boolean values) i.e., the values are
either zero (0) or one (1). Therefore, digital logic is also
known as ‘Boolean logic’.
These inputs and output can be termed as ‘Boolean
Variables’.
The output boolean variable of a digital signal can be
expressed in terms of input boolean variables which
forms the ‘Boolean Expression’.
• Representation of Boolean expression can be
primarily done in two ways. They are as follows:
1. Sum of Products (SOP) form
2. Product of Sums (POS) form
• Note:
If the number of input variables are n, then the total
number of combinations in Boolean algebra is 2n.
• Sum of Products (SOP):
It is one of the ways of writing a boolean
expression. As the name suggests, it is
formed by adding (OR operation) the product
terms.
• These product terms are also called as ‘min-
terms’. Min-terms are represented with ‘m’,
they are the product(AND operation) of
boolean variables either in normal form or
complemented form.
• Zero (0) – a is LOW -It should be
represented as A’ (Complement of A)
• One (1) – a is HIGH -It should be
represented as A
In boolean logic,
• AND is represented as '.'
• A AND B is written as 'A.B'
• OR is represented as '+'
• A OR B is written as 'A+B'
• For example, Considering number of input
variables =3, Say A, B and C.
• Total number of combinations are: 23=8.
• Consider a function X, whose truth
table is as follows: The function X can
be written in SOP form by adding all the
min-terms when X is HIGH(1).
While writing SOP, the following convention is to be followed: .
• Product of Sums (POS):
As the name suggests, it is formed by
multiplying(AND operation) the sum
terms. These sum terms are also called
as ‘max-terms’. Max-terms are
represented with ‘M’, they are the sum
(OR operation) of Boolean variables
either in normal form or complemented
form.
• The function X can be written in POS
form by multiplying all the max-terms
when X is LOW(0).
While writing POS, the following
convention is to be followed:
Difference between SOP and POS :
S.No. SOP POS

A way of representing boolean A way of representing boolean expressions


1.
expressions as sum of product terms. as product of sum terms.

SOP uses minterms. Minterm is product POS uses maxterms. Maxterm is sum of
2. of boolean variables either in normal boolean variables either in normal form or
form or complemented form. complemented form.

It is sum of minterms. Minterms are It is product of maxterms. Maxterms are


3.
represented as ‘m’ represented as ‘M’

SOP is formed by considering all the POS is formed by considering all the
4.
minterms, whose output is HIGH(1) maxterms, whose output is LOW(0)

While writing minterms for SOP, input While writing maxterms for POS, input with
with value 1 is considered as the value 1 is considered as the complement
5.
variable itself and input with value 0 is and input with value 0 is considered as the
considered as complement of the input. variable itself.
Simplification of logic functions by
theorems
Minimization of Boolean Functions
• The process of simplifying the algebraic expression
of a boolean function is called minimization.
Minimization is important since it reduces the cost
and complexity of the associated circuit.
• Minimization can be done using Algebraic
Manipulation or K-Map method.
• there are several rules of Boolean algebra presented
in this section for use in reducing expressions to
their simplest forms.
• the simplified equation may be translated back into
circuit form for a logic circuit performing the same
function with fewer components.
• If equivalent function may be achieved with fewer
components, the result will be increased reliability
and decreased cost of manufacture.
Minimization using Algebraic Manipulation –

• This method is the simplest of all


methods used for minimization. It is
suitable for medium sized
expressions involving 4 or 5
variables.
• Algebraic manipulation is a manual
method, hence it is prone to human
error.
• Simple Rules of 0 and 1 (best name for them I
guess):
• Annihilator of Multiplication: Anything
that multiplies (AND) with 0 gives 0 (A * 0
= 0)
• Annihilator of Addition: Anything that
adds (OR) with 1 gives 1 (A + 1 = 1)
• Identity for Multiplication: Anything
that multiplies (AND) with 1 gives itself (A
* 1 = A)
• Identity for Addition: Anything that adds
(OR) with 0 gives itself (A + 0 = A)
• Boolean Algebra only Laws:
• Idempotence: Add or Multiply with
self gives self (AA = A and A + A =
A)
• Absorption: Special Case of
Distributivity [A(A + B) = A and A +
AB = A]
• Distributivity of Addition over
Multiplication [A + BC = AB + AC]
• Complement Laws:
• Anything multiplied(AND) with its
complement gives 0 (A*A' = 0)
• Anything added(AND) with its complement
gives 1(A + A' = 1)
• If we complement two times we get
ourself again (A'' = A)
• Using the Truth Table we know that
A + A'B = A + B and A' + AB = A' + B.
So, when having both the "one" that is
alone survives and the "one" that is
together with another variable gets cleared!
Simplification of Boolean functions Using the
theorems of Boolean Algebra, the algebraic forms of
functions can often be simplified, which leads to
simpler (and cheaper) implementations.
• The function looks like this:
• F(A, B, C) = (A+B)B' + B' + BC
We use the Distributivity Law [(A+B)B' = AB' +
BB']:
• F(A, B, C) = AB' + BB' + B' + BC
We use one of the Complement Law(BB' = 0) and
afterwards the Identity of Addition (AB' + 0 = AB'):
• F(A, B, C) = AB' + B' + BC
We take a common factor B' of the first two:
• F(A, B, C) = B'(A + 1) + BC
We use the Annihilator of Addition (A + 1 = 1) and
afterwards the Identity of Multiplication (B '* 1 =
B'):
• F(A, B, C) = B' + BC
We use the Complement Law (B' + BC = B' + C):
• F(A, B, C) = B' + C
• De Morgan Theorem:
• The De Morgan Theorem is used to make our Circuit even
smaller including more gates then the AND, OR, NOT Gates.
Using the Universal NOR and NAND Gates we can then
simplify our Circuit even further (We will talk about them
separatelly some posts later on)
• The Theorem for two variables looks like this:
• (AB)' = A' + B'
• (A + B)' = A'B'
• A simple way of memorizing it is that AND turns into
OR and vise versa, and A turns into NOT A or A' and vise
versa.
• So, we can generalize it for even more:
• (ABC)' = A' + B' + C'
• (A + B + C)' = A'B'C'
• Using this Theorem we can get rid of all the Complements
putting them all together and making them into an NAND or
NOR Gate [NAND is actually (AB)' and NOR is actually (A+B)'].
• https://www.gatevidyalay.com/tag/karnaugh-map-dont-care-condition/
1. Form the K-map
•Plot the Boolean expression on the K-map by placing ones (1s)
in the cells corresponding to the minterms of the expression. The cells
are arranged in a grid where adjacent cells differ by only one variable.

2. Identify Groups
•Group 1s: Form groups (also called loops) of 1s in the K-map.
Groups must be in sizes of 1, 2, 4, 8, etc., and must be a power
of two. Larger groups are preferred as they lead to greater
simplification.
•Overlapping Groups: Groups can overlap if necessary. This
means that a single 1 can be part of more than one group.
•Wrap-Around Groups: The K-map is considered to wrap
around both horizontally and vertically, so cells on the edges can
be grouped with cells on the opposite edge.
3. Minimize the Boolean Expression
•Largest Groups First: Prioritize creating the largest possible
groups because they simplify the expression the most.
•Common Variables: For each group, identify the variables
that remain constant (either all 1s or all 0s) across the group.
These variables are part of the simplified term.
•Eliminate Variables: Variables that change within a group
are eliminated from the simplified term.
•Create Terms: Each group corresponds to a product (AND)
term in the simplified Boolean expression. Combine all the
product terms with a sum (OR) operation.
4. Handle Don't Care Conditions (if applicable)
•Don’t Care (X) Conditions: Sometimes, certain inputs do not
affect the output (don't care conditions). These can be treated
as either 1s or 0s, depending on what allows for greater
simplification.

5. Combine the Reduced Terms


•After creating simplified product terms for all groups, combine
them using the OR operation to form the final simplified
Boolean expression.

6. Verify the Simplification


•Optionally, verify that the simplified expression is equivalent to
the original expression by re-expanding or by using a truth
table.
• Example of K-map Reduction:
• For a 3-variable K-map:
1.Draw a 2x4 K-map.
2.Plot the minterms where the function is 1.
3.Group the adjacent 1s into groups of 1, 2, or 4.
4.Derive the simplified Boolean expression from
these groups.
• Key Rules Recap:
• Groups must be powers of two (1, 2, 4, 8,
etc.).
• Larger groups provide more simplification.
• Groups can overlap and wrap around edges.
• Include don't care conditions if they simplify
the expression.
Z= ∑A,B,C(1,3,6,7)
Z= ∑A,B,C(1,3,6,7)

•From red group we get


product term— A’C
•From green group we
get product term— AB

•Summing these product


terms we get- Final
expression (A’C+AB)
F(P,Q,R,S)=∑(0,2,5,7,8,10,13,15)
F(P,Q,R,S)=∑(0,2,5,7,8,10,13,15)

• From red group we


get product term QS
• From green group
we get product term
— Q’S’

• Summing these
product terms we
get- Final expression
(QS+Q’S’)
Don't Care Condition

• The "Don't care" condition says that we can


use the blank cells of a K-map to make a
group of the variables. To make a group of
cells, we can use the "don't care" cells as
either 0 or 1, and if required, we can also
ignore that cell. We mainly use the "don't
care" cell to make a large group of cells.
• The cross(×) symbol is used to represent
the "don't care" cell in K-map. This cross
symbol represents an invalid combination.
• Significance of “Don’t Care” Conditions:
• Don’t Care conditions has the following significance in designing of the digital
circuits:

• Simplification of the output:


• These conditions denotes inputs that are invalid for a given digital circuit. Thus, they
can used to further simplify the boolean output expression of a digital circuit.
• Reduction in number of gates required:
• Simplification of the expression reduces the number of gates to be used for
implementing the given expression. Therefore, don’t cares make the digital circuit
design more economical.
• Reduced Power Consumption:
• While grouping the terms along with don’t cares reduces switching of the states.
This decreases the memory space that is required to represent a given digital circuit
which in turn results in less power consumption.
• Represent Invalid States in Code Converters:
• These are used in code converters. For example- In design of 4-bit BCD-to-XS-3 code
converter, the input combinations 1010, 1011, 1100, 1101, 1110, and 1111 are
don’t cares.
• Prevention of Hazards in Digital Circuits:

• Minimize the following function in
SOP minimal form using K-Maps:
F(A, B, C, D) = m(1, 2, 6, 7, 8, 13, 14,
15) + d(0, 3, 5, 12)
• Minimize the following function in SOP
minimal form using K-Maps:
F(A, B, C, D) = m(1, 2, 6, 7, 8, 13, 14,
15) + d(0, 3, 5, 12)

Therefore,

f = AC'D' + A'D + A'C + AB


• Example 1: Minimize f =
m(1,5,6,12,13,14) + d(4) in SOP
minimal form
• Example 1: Minimize f =
m(1,5,6,12,13,14) + d(4) in SOP
minimal form
• The k-map of the given function in the SOP form is as follows:

You might also like