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

DLD Unit 2 (Spaces)

Uploaded by

madhugamer20
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)
68 views

DLD Unit 2 (Spaces)

Uploaded by

madhugamer20
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/ 22

DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

LOGIC GATES AND BOOLEAN ALGEBRA - UNIT-II


Logic gates are the fundamental components of all digital circuits and systems. In
digital electronics, there are seven main types of logic gates used to perform various
logical operations. A logic gate is basically an electronic circuit designed by using
components like diodes, transistors, resistors, capacitors, etc., and capable of
performing logical operations. In this article, we will study the definition, truth table,
and other related concepts of logic gates. So let’s start with the basic introduction of
logic gates.

The basic functions are implemented using electronic devices called “gates”.

The basic logic gates are


1. AND gate
2. OR gate
3. NOT gate

Universal logic gates are


1. NOR gate
2. NAND gate

Derived logic gates are


1. XOR gate
2. XNOR gate

AND Gate:

In the AND gate, the output of an AND gate attains state 1 if and only if all the inputs
are in state 1.

The Boolean expression of AND gate is Y = A.B


The truth table of a two-input AND basic gate is given as

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

OR Gate:

In an OR gate, the output of an OR gate attains state 1 if one or more inputs attain
state 1.

The Boolean expression of the OR gate is Y = A + B, read as Y equals A ‘OR’ B.


The truth table of a two-input OR basic gate is given as

NOT Gate:
In a NOT gate, the output of a NOT gate attains state 1 if and only if the input does
not attain state 1.

The Boolean expression is


It is read as Y equals NOT A.
The truth table of NOT gate is as follows

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

When connected in various combinations, the three gates (OR, AND and NOT) give
us basic logic gates, such as NAND and NOR gates, which are the universal building
blocks of digital circuits.

NAND Gate:

This basic logic gate is the combination of AND and NOT gates.

The Boolean expression of the NAND gate is

. The truth table of a NAND gate is given as

NOR Gate:

This gate is the combination of OR and NOT gates.

The Boolean expression of the NOR gate is . The truth table of a NOR
gate is as follows.

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

Exclusive-OR gate (XOR Gate):


In an XOR gate, the output of a two-input XOR gate attains state 1 if one adds only
input and attains state 1.

The Boolean expression of the XOR gate is

The truth table of an XOR gate is

Exclusive-NOR Gate (XNOR Gate):


In the XNOR gate, the output is in state 1 when both inputs are the same, that is, both
0 or both 1.

The Boolean expression of the XNOR :


The truth table of an XNOR gate is given below

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

BOOLEAN LAWS AND THEOREMS:


Boolean algebra is a branch of mathematics that deals with the manipulation of
variables which can assume only two truth values, true or false, denoted by 1 and 0,
respectively. In this article, we shall discuss the Boolean algebra laws used to perform
operations on Boolean variables.
Boolean algebra is a type of algebra that is created by operating the binary system. In
the year 1854, George Boole, an English mathematician, proposed this algebra. This
is a variant of Aristotle’s propositional logic that uses the symbols 0 and 1, or True
and False. Boolean algebra is concerned with binary variables and logic operations.

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

De Morgan’s Theorem:

The first theorem – It states that the NAND gate is equivalent to a bubbled OR gate.

The second theorem – It states that the NOR gate is equivalent to a bubbled AND gate.

Important Conversions:
1) The ‘NAND’ gate: From ‘AND’ and ‘NOT’ gates.

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

Complement and Duality Theorem:


The duality theorem is one of those elegant theorems proved in advanced mathematics.
We will state the theorem without proof. Here is what the duality theorem says.
Starting with a Boolean relation, you can
derive another Boolean relation by
1. Changing each OR sign to an AND sign
2. Changing each AND sign to an OR sign
3. Complementing any O or 1 appearing in the expression

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

Realization of Logic Gate Using Universal gates:


In Boolean Algebra, the NAND and NOR gates are called universal gates because any
digital circuit can be implemented by using any one of these two i.e. any logic gate
can be created using NAND or NOR gates only.

1. Implementation of AND Gate using Universal gates.

a) Using NAND Gates: The AND gate can be implemented by using two NAND
gates in the below

b) Using NOR Gates: Implementation of AND gate using only NOR gates as shown
below:

2. Implementation of OR Gate using Universal gates.

a) Using NAND Gates

The OR gate can be implemented using the NAND gate as below:

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

b) Using NOR Gates

Implementation of OR gate using two NOR gates as shown in the picture below:

3. Implementation of NOT Gate using Universal gates.

a) Using NAND Gates

b) Using NOR Gates

4. Implementation of XOR Gate using Universal gates.

a) Using NAND Gates

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

b) Using NOR Gates

5. Implementation of XNOR Gate using Universal gates.

a) Using NAND Gate

b) Using NOR Gate

6. Implementation of NOR Gate using NAND Gates

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

7.

8. Implementation of NAND Gate using NOR Gates

BOOLEAN FUNCTIONS: Boolean algebra is an algebra that deals with binary


variables and logic operations. A Boolean function described by an algebraic
expression consists of binary variables, the constants 0 and 1, and the logic operation
symbols. For a given value of the binary variables, the function can be equal to either
1 or 0. As an example, consider the Boolean function

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

CANONICAL AND STANDARD FORM:


Boolean functions expressed as a sum of minterms or product of maxterms are said to
be in canonical form

Canonical Form – In Boolean algebra, the Boolean function can be expressed as


Canonical Disjunctive Normal Form known as minterm and some are expressed as
Canonical Conjunctive Normal Form known as maxterm.

In Minterm, we look for the functions where the output results in “1” while in
Maxterm we look for functions where the output results in “0”.
We perform the Sum of Minterm also known as the Sum of products (SOP).
We perform Product of Maxterm also known as Product of sum (POS). Boolean
functions expressed as a sum of minterms or product of maxterms are said to be in
canonical form.

Standard Form – A Boolean variable can be expressed in either true or


complementary forms. In standard form Boolean function will contain all the
variables in either true form or complemented form.

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 takes the OR of all those terms.
 maxterm for each combination of the variables that produces a 0 in the function
and then takes the AND of all those terms.

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

So the SOP form is:

So, the POS form is:

MINIMIZATION OF LOGIC FUNCTIONS:(SOP AND POS):

********* (NOTE: Please verify your running notes.


1. Minimal to Canonical form conversion
2. Canonical form to Minimal form conversion) ***********

Karnaugh map:
The Karnaugh map, also known as the K-map, is a method to simplify boolean
algebra expressions. Maurice Karnaugh introduced it in 1953. A Karnaugh map (K-
map) is a visual method used to simplify the algebraic expressions
in Boolean functions without having to resort to complex theorems or equation
manipulations.
A Karnaugh map is a visual display of the fundamental products needed for a sum-of-
products solution. For instance, here is how to convert table into its Karnaugh map.

Two-Variable K-Map:The two-variable map is shown below.

There are four minterms for two variables; hence, the map consists of four squares,
one for each minterm. The map is to show the relationship between the squares and
the two variables x and y . The 0 and 1 marked in each row and column designate the
values of variables. Variable x appears primed in row 0 and unprimed in row 1.
Similarly, y appears primed in column 0 and unprimed in column 1.

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

Three-Variable K-Map: A three-variable K-map is shown in Fig. 3.3 . There are


eight minterms for three binary variables; therefore, the map consists of eight squares.
Note that the minterms are arranged, not in a binary sequence, but in a sequence
similar to the Gray code. The characteristic of this sequence is that only one bit
changes in value from one adjacent column to the next.

 Simplify the Boolean function


First, a 1 is marked in each minterm square that represents the function. This is shown
in in which the squares for minterms 010, 011, 100, and 101 are marked with 1’s.

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

The sum of four minterms can be replaced by a sum of only two product terms. The
logical sum of these two product terms gives the simplified expression F= xy + xy.

 Simplify the Boolean function F(x, y, z) =∑ (3, 4, 6, 7)

Four-Variable K-Map:The map for Boolean functions of four binary variables


(w, x, y, z) is shown in below diagram.the map is redrawn to show the relationship
between the squares and the four variables. The rows and columns are numbered in a
Gray code sequence, with only one digit changing value between two adjacent rows
or columns.

 Simplify the Boolean function F(w, x, y, z) = ∑(0, 1, 2, 4, 5, 6, 8, 9, 12, 13, 14)

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

Implicants in K-map:An implicant can be defined as a product/minterm term in Sum


of Products (SOP) or sum/maxterm term in Product of Sums (POS) of a Boolean
function.

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.

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

Essential Prime Implicants: These are those subcubes(groups) that cover at least one
minterm that cannot be covered by any other prime implicants.(If a minterm in a
square is covered by only one prime implicant, that prime implicant)

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

PRODUCT OF SUMS SIMPLIFICATIONS:

Don’t Care Condition: In the K-map method, there is a useful condition


namely, Don’t Care Condition, which helps in simplifying a Boolean function. The

P.S.GAJAPATHIRAJU@SPACES
DIGITAL LOGIC DESIGN SPACES DEGREE COLLEGE

don’t care condition makes the grouping of variables in K-map easy. In this tutorial,
we will understand the "don’t care" concept in K-map reduction with the help of
solved examples.

These input combinations for which the values of the Boolean function are not
specified are called don’t care combinations.

P.S.GAJAPATHIRAJU@SPACES

You might also like