0% found this document useful (0 votes)
17 views66 pages

mod 1 ppt

Uploaded by

Shashwat Yadav
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)
17 views66 pages

mod 1 ppt

Uploaded by

Shashwat Yadav
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/ 66

Module – 1

What you will learn?


• Binary Logic
• Basic Theorems And Properties Of Boolean Algebra
• Boolean Functions
• Digital Logic Gates
• Gate – Level Minimization – Introduction
• The Map Method
• Four-Variable Map
• Don’t-Care Conditions
• NAND and NOR Implementation
Introduction to Boolean Algebra
• Basic Mathematics needed for the study of logic design of digital
system
• Applications of Boolean Algebra
• Set Theory
• Mathematical Logic
• Switching Circuits
• The symbols 0 and 1 represent two different states in a logic circuit
• 0 represents a range of low voltages
• 1 represent a range of high voltages
Basic Logic Gates
• AND
• OR
• NOT or Inverter
• Truth tables, symbols and timing diagrams
• NAND
• NOR
• XOR
• XNOR
PRINCIPLE OF DUALITY
One can transform the given expression by interchanging the operation (+) and (•) as
well as the identity elements 0 and 1 . Then the expression will be referred as dual
of each other. This is known as the principle of duality.
Example: x + x = 1 then the dual expression is x • x = 0
Postulates and Theorems of Boolean
Algebra

The postulates are basic axioms of the algebraic structure and need no proof. The
theorems must be proven from the postulates
• The theorems of Boolean algebra can be proven by means of truth tables. In truth tables, both sides
of the relation are checked to see whether they yield identical results for all possible combinations
of the variables involved.
• Truth table for Absorption theorem

• Truth table for the first DeMorgan’s theorem:


Operator Precedence
Boolean Functions
• A Boolean function can be represented in a truth table. The number of rows in the truth table is 2n,
where n is the number of variables in the function. The binary combinations for the truth table are
obtained from the binary numbers by counting from 0 through 2n – 1

• A Boolean function can be transformed from an algebraic expression into a circuit diagram
composed of logic gates connected in a particular structure. The logic circuit diagram is also called
as Schematic.
Minimizing the Boolean expression
• There is only one way that a Boolean function can be represented in a truth table.

• However, when the function is in algebraic form, it can be expressed in a variety of ways, all of which
have equivalent logic.

• The particular expression used to represent the function will dictate the interconnection of gates in the
logic‐circuit diagram. Conversely, the interconnection of gates will dictate the logic expression.

• By manipulating a Boolean expression according to the rules of Boolean algebra, it is sometimes possible
to obtain a simpler expression for the same function and thus reduce the number of gates in the circuit
and the number of inputs to the gate.

• Designers are motivated to reduce the complexity and number of gates because their effort can
significantly reduce the cost of a circuit.
Algebraic Manipulation
• When a Boolean expression is implemented with logic gates, each term requires a gate and each
variable within the term designates an input to the gate.

• Literal is defined to be a single variable within a term, in complemented or uncomplemented form.

• By reducing the number of terms, the number of literals, or both in a Boolean expression, it is often
possible to obtain a simpler circuit.

• The manipulation of Boolean algebra consists mostly of reducing an expression for the purpose of
obtaining a simpler circuit.

• Functions of up to five variables can be simplified by the map method

• For complex Boolean functions and many different outputs, designers of digital circuits use computer
minimization programs that are capable of producing optimal circuits with millions of logic gates.
Functions 4 and 5 are together known as the consensus theorem
Complement of a function
• The complement of a function may be derived algebraically through DeMorgan’s theorems.
• DeMorgan’s theorems can be extended to three or more variables.
• The three‐variable form of the first DeMorgan’s theorem:

• The generalized form of DeMorgan’s theorems states that the complement of a function is obtained
by interchanging AND and OR operators and complementing each literal.
Find the complement of the function by applying DeMorgan’s theorem as many times as necessary

A simpler procedure for deriving the complement of a function is to take the dual of the
function and complement each literal. This method follows from the generalized forms of
DeMorgan’s theorems.
Canonical & Standard Forms
Minterms & Maxterms
• A binary variable may appear either in its normal form (x) or in its complement form (x).
• Now consider two binary variables x and y combined with an AND operation. Since each variable may appear in
either form, there are four possible combinations: x' y’, x’y, xy’, and xy. Each of these four AND terms is called a
minterm, or a standard product.
• In a similar manner, n variables can be combined to form 2n minterms.
• Each minterm is obtained from an AND term of the n variables, with each variable being primed if the
corresponding bit of the binary number is a 0 and unprimed if the corresponding bit of the binary number is a 1.
• A symbol for each minterm is of the form mj, where the subscript j denotes the decimal equivalent of the binary
number of the minterm designated.
• In a similar fashion, n variables forming an OR term, with each variable being primed or unprimed, provide 2n
possible combinations, called maxterms, or standard sums.
• NOTE:
(1) each maxterm is obtained from an OR term of the n variables, with each variable being unprimed if the
corresponding bit is a 0 and primed if a 1, and
(2) each maxterm is the complement of its corresponding minterm and vice versa.
Minterms and Maxterms of three binary
variables
• A Boolean function can be expressed
algebraically from a given truth table by forming
a minterm for each combination of the variables
that produces a 1 in the function and then taking
the OR of all those terms.
• Example: the function f1 in the Table 2.4 is
determined by expressing the combinations 001,
100, and 111 as x' y' z, xy' z', and xyz, respectively.
Since each one of these minterms results in f1 = 1,
we have

• Similarly, it may be easily verified that

• Any Boolean function can be expressed as a sum of


minterms (with ―sum‖ meaning the ORing of terms).
• Consider the complement of a Boolean function. It
may be read from the truth table by forming a
minterm for each combination that produces a 0 in
the function and then ORing those terms. The
complement of f1 is read as
If we take the complement of f1', we obtain the function f1:

Similarly, it is possible to read the expression for f2 from the table:

• Any Boolean function can be expressed as a product of maxterms (with ―product‖ meaning the
ANDing of terms).
• The procedure for obtaining the product of maxterms directly from the truth table is as follows:
• Form a maxterm for each combination of the variables that produces a 0 in the function, and
then form the AND of all those maxterms.
• Boolean functions expressed as a sum of minterms or product of maxterms are said to be
in canonical form .
Sum of Minterms
• The minterms whose sum defines the Boolean function are those which give the 1’s of the
function in a truth table.
• It is sometimes convenient to express a Boolean function in its sum‐of‐minterms form.
• If the function is not in this form, it can be made so by first expanding the expression into a sum of
AND terms.
• Each term is then inspected to see if it contains all the variables. If it misses one or more variables,
it is ANDed with an expression such as x + x', where x is one of the missing variables
• The summation ∑ symbol stands
for the ORing of terms; the
numbers following it are the
indices of the minterms of the
function.
• The letters in parentheses
following F form a list of the
variables in the order taken when
the minterm is converted to an
AND term.
• An alternative procedure for deriving the minterms of a Boolean function is to obtain the
truth table of the function directly from the algebraic expression and then read the minterms
from the truth table. Consider the Boolean function

• The truth table shown in Table 2.5 can be derived directly from the algebraic expression by listing
the eight binary combinations under variables A, B, and C and inserting 1’s under F for those
combinations for which A = 1 and BC = 01.

• From the truth table, we can then read the five minterms of the function to be 1, 4, 5, 6, and 7.
Product of Maxterms
• Each of the 22n functions of n binary variables can be also expressed as a product of
maxterms.
• To express a Boolean function as a product of maxterms, it must first be brought into a form of OR
terms.
• This may be done by using the distributive law,
• Then any missing variable x in each OR term is ORed with xx’.
Conversion between canonical forms
• The complement of a function expressed as the sum of minterms equals the sum of minterms
missing from the original function. This is because the original function is expressed by those
minterms which make the function equal to 1, whereas its complement is a 1 for those minterms for
which the function is a 0.

• This function has a complement that can be expressed as

• Now, if we take the complement of F′ by DeMorgan’s theorem, we obtain F in a different form:

• The maxterm with subscript j is a complement of the minterm with the same subscript j and
vice versa.
General conversion Procedure:
• To convert from one canonical form to another, interchange the symbols ∑ and π, and list those numbers
missing from the original form.
• A Boolean function can be converted from an algebraic expression to a product of maxterms by means of
a truth table and the canonical conversion procedure.
• Example:
• First, we derive the truth table of the function,
• The 1’s under F in the table are determined from the
combination of the variables for which xy = 11 or xz = 01.
The minterms of the function are read from the truth table
to be 1, 3, 6, and 7.
• The function expressed as a sum of minterms is
F(x, y, z) = ∑(1, 3, 6, 7)
• Since there is a total of eight minterms or maxterms
in a function of three variables, we determine the missing
terms to be 0, 2, 4, and 5.
• The function expressed as a product of maxterms is
F(x, y, z) = π(0, 2, 4, 5)
Standard Forms
• The two canonical forms of Boolean algebra are basic forms that one obtains from reading a given
function from the truth table.
• Another way to express Boolean functions is in standard form.
• There are two types of standard forms: the sum of products and products of sums.
• The sum of products is a Boolean expression containing AND terms, called product terms, with one
or more literals each. The sum denotes the ORing of these terms. An example of a function
expressed as a sum of products is

• A product of sums is a Boolean expression containing


OR terms, called sum terms.
• Each term may have any number of literals.
• The product denotes the ANDing of these terms.
• An example of a function expressed as a
product of sums is
A Boolean function may be expressed in a nonstandard form. For example, the
function
is neither in sum‐of‐products nor in product‐of‐sums form.

There are three levels of gating in this circuit. It can be changed to a standard form by
using the distributive law to remove the parentheses:

In general, a two‐level implementation is preferred because it produces the least amount of delay
through the
gates when the signal propagates from the inputs to the output.
Digital Logic
Gates
Extension to Multiple Inputs
The gates shown in the Fig—except for the
inverter and buffer—can be extended to
have more than two inputs.
Positive and Negative Logic
• Choosing the high‐level H to represent logic 1 defines a positive logic system. Choosing the
low‐level L to represent logic 1 defines a negative logic system.
Gate Level Minimization
• Gate-level minimization is the design task of finding an optimal gate-level implementation of the
Boolean functions describing a digital circuit.
The Map Method:
• The complexity of the digital logic gates that implement a Boolean function is directly related to the
complexity of the algebraic expression from which the function is implemented.
• Although the truth table representation of a function is unique, when it is expressed algebraically it
can appear in many different, but equivalent, forms.
• Boolean expressions may be simplified by algebraic means. This procedure of minimization is
awkward because it lacks specific rules to predict each succeeding step in the manipulative
process.
• The map method provides a simple, straightforward procedure for minimizing Boolean functions.
• This method may be regarded as a pictorial form of a truth table.
• The map method is also known as the Karnaugh map or K-map
K-Map
• A K-map is a diagram made up of squares, with each square representing one minterm of the function that is to be
minimized.

• Since any Boolean function can be expressed as a sum of minterms, it follows that a Boolean function is recognized
graphically in the map from the area enclosed by those squares whose minterms are included in the function.

• In fact, the map presents a visual diagram of all possible ways a function may be expressed in standard form.

• By recognizing various patterns, the user can derive alternative algebraic expressions for the same function, from which
the simplest can be selected.

• The simplified expressions produced by the map are always in one of the two standard forms: sum of products or
product of sums.

• It will be assumed that the simplest algebraic expression is an algebraic expression with a minimum number of terms
and with the smallest possible number of literals in each term. This expression produces a circuit diagram with a
minimum number of gates and the minimum number of inputs to each gate.

• The simplest expression is not unique: It is sometimes possible to find two or more expressions that satisfy the
minimization criteria. In that case, either solution is satisfactory.
Two-Variable K-Map
Three-Variable K-Map
The simplified function is:
The simplified function is:
Four Variable K-Map
The simplified function is:
The simplified function is:
Various Implicants in k-map
• Implicant is a product/minterm term in Sum of Products (SOP) or sum/maxterm term in Product of Sums (POS) of a Boolean
function. E.g., consider a boolean function, F = AB + ABC + BC. Implicants are AB, ABC, and BC.
• Prime Implicants: A group of squares or rectangles made up of a bunch of adjacent minterms which is allowed by the definition
of K-Map are called prime implicants (PI) i.e. all possible groups formed in K-Map.

• Essential Prime Implicants: These are those subcubes (groups) that cover at least one minterm that can’t be covered by any other
prime implicant. Essential prime implicants (EPI) are those prime implicants that always appear in the final solution.
• Redundant Prime Implicants: The prime implicants for which each of its minterm is covered by some essential prime implicant
are redundant prime implicants(RPI). This prime implicant never appears in the final solution.
• Selective Prime Implicants: The prime implicants for which are neither essential nor redundant prime implicants are
called selective prime implicants(SPI). These are also known as non-essential prime implicants. They may appear in some solution
or may not appear in some solution.
• The simplified expression is obtained from the logical sum of the two essential
prime implicants and any two prime implicants that cover minterms m3, m9, and
m11. There are four possible ways that the function can be expressed with four
product terms of two literals each:
Don’t Care Conditions
• The logical sum of the minterms associated with a Boolean function specifies the conditions under which the function is
equal to 1. The function is equal to 0 for the rest of the minterms. This pair of conditions assumes that all the combinations
of the values for the variables of the function are valid.
• In practice, in some applications the function is not specified for certain combinations of the variables.
• As an example, the four-bit binary code for the decimal digits has six combinations that are not used and consequently are
considered to be unspecified.
• Functions that have unspecified outputs for some input combinations are called incompletely specified functions .
• In most applications, we simply don’t care what value is assumed by the function for the unspecified minterms. For this
reason, it is customary to call the unspecified minterms of a function don’t-care conditions . These don’t-care conditions
can be used on a map to provide further simplification of the Boolean expression.
• A don’t-care minterm is a combination of variables whose logical value is not specified.
• Such a minterm cannot be marked with a 1 in the map, because it would require that the function always be a 1 for such a
combination. Likewise, putting a 0 on the square requires the function to be 0. To distinguish the don’t-care condition from
1’s and 0’s, an X is used. Thus, an X inside a square in the map indicates that we don’t care whether the value of 0 or 1 is
assigned to F for the particular minterm.
• In choosing adjacent squares to simplify the function in a map, the don’t-care minterms may be assumed to be either 0 or 1.
When simplifying the function, we can choose to include each don’t-care minterm with either the 1’s or the 0’s, depending
on which combination gives the simplest expression.
Simplify the Boolean function
F (w, x, y, z) = ∑ (1, 3, 7, 11, 15)
which has the don’t-care conditions
d (w, x, y, z) = ∑ (0, 2, 5)
Simplify the following functions using K-Map
NAND and NOR Implementation
• Digital circuits are usually constructed with NAND and
NOR gates rather than AND, OR and NOT gates.
• NAND and NOR gates are easier to fabricate with
electronic components and are the basic gates in all the
IC digital logic families.
• NAND and NOR gates are usually faster and use fewer
components than AND and OR gates.
• Because of this prominence, rules and procedures have
been developed to convert Boolean functions given in
terms of AND, OR and NOT into equivalent NAND
and NOR logic diagrams.
NAND Circuits:
• The NAND gate is said to be a universal gate because
any logic circuit can be implemented with it.
• To show that any Boolean function can be implemented
with NAND gates, we only need to show that the
logical operations of AND, OR, and complement can be
obtained with NAND gates alone.
NAND Circuits contd…
Two alternative equivalent graphic symbols for the NAND
gate:

• Both the graphic symbols are useful in the analysis and design of NAND circuits.
• When both symbols are mixed in the same diagram, the circuit is said to be in mixed notation.
• A convenient way to implement a Boolean function with NAND gates is to obtain the simplified
Boolean function in terms of Boolean operators and then convert the function to NAND logic.
• The conversion of an algebraic expression from AND, OR, and complement to NAND can be done by
simple circuit manipulation techniques that change AND–OR diagrams to NAND diagrams.
Two – level implementation of Boolean
functions using NAND gate
• The implementation of Boolean functions with NAND gates requires that the functions be in
sum-of-products form.
The procedure for obtaining the logic diagram from a Boolean
function with two levels of NAND gates
1. Simplify the function and express it in sum-of-products form.
2. Draw a NAND gate for each product term of the expression that has at least two
literals. The inputs to each NAND gate are the literals of the term. This procedure
produces a group of first-level gates.
3. Draw a single gate using the AND-invert or the invert-OR graphic symbol in the
second level, with inputs coming from outputs of first-level gates.
4. A term with a single literal requires an inverter in the first level. However, if the
single literal is complemented, it can be connected directly to an input of the second level
NAND gate.
Multilevel NAND Circuits
• The general procedure for converting a multilevel AND–OR diagram into an all-NAND diagram using mixed
notation:
1. Convert all AND gates to NAND gates with AND-invert graphic symbols.
2. Convert all OR gates to NAND gates with invert-OR graphic symbols.
3. Check all the bubbles in the diagram. For every bubble that is not compensated by another small circle along
the same line, insert an inverter (a one-input NAND gate) or complement the input literal.
Implementing using multi-
level NAND Gates
NOR Implementation
• The NOR operation is the dual of the
NAND operation.
• Therefore, all procedures and rules for
NOR logic are the duals of the
corresponding procedures and rules
developed for NAND logic.
• The NOR gate is another universal gate
that can be used to implement any
Boolean function.
• The implementation of the complement,
OR, and AND operationswith NOR
gates:
NOR Implementation contd…
• A two-level implementation with NOR gates requires that the function be simplified into product-of-
sums form.

• The simplified product-of-sums expression is obtained from the map by combining the 0’s and
complementing.

• A product-of-sums expression is implemented with a first level of OR gates that produce the sum
terms followed by a second-level AND gate to produce the product.

• The transformation from the OR–AND diagram to a NOR diagram is achieved by changing the OR
gates to NOR gates with OR-invert graphic symbols and the AND gate to a NOR gate with an
invert-AND graphic symbol. A single literal term going into the second-level gate must be
complemented.
• The procedure for converting a
multilevel AND–OR diagram to an
all-NOR diagram is similar to the
one presented for NAND gates.
• Convert each OR gate to an OR-
invert symbol and each AND gate
to an invert-AND symbol.
• Any bubble that is not
compensated by another bubble
along the same line needs an
inverter, or the complementation of
the input literal.

You might also like