0% found this document useful (0 votes)
60 views25 pages

AND Gate: Logic Diagram

The document discusses logic gates and circuits. It describes the basic logic gates - AND, OR, NOT, NAND, NOR, XOR and XNOR gates. It provides the logic diagrams and truth tables for each gate. It then discusses DeMorgan's theorems, which show the relationships between AND/OR gates and NAND/NOR gates. Specifically, it states that a NAND gate is equivalent to an OR gate with inverted inputs, and a NOR gate is equivalent to an AND gate with inverted inputs. It also discusses how DeMorgan's theorems can be extended to gates with more than two inputs.

Uploaded by

Kuldeep Saini
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)
60 views25 pages

AND Gate: Logic Diagram

The document discusses logic gates and circuits. It describes the basic logic gates - AND, OR, NOT, NAND, NOR, XOR and XNOR gates. It provides the logic diagrams and truth tables for each gate. It then discusses DeMorgan's theorems, which show the relationships between AND/OR gates and NAND/NOR gates. Specifically, it states that a NAND gate is equivalent to an OR gate with inverted inputs, and a NOR gate is equivalent to an AND gate with inverted inputs. It also discusses how DeMorgan's theorems can be extended to gates with more than two inputs.

Uploaded by

Kuldeep Saini
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/ 25

UNIT – 1

LOGIC GATES and CIRCUITS

Logic gates are the basic building blocks of any digital system. It is an electronic circuit
having one or more than one input and only one output. The relationship between the input
and the output is based on a certain logic. Based on this, logic gates are named as AND gate,
OR gate, NOT gate etc.

AND Gate
A circuit which performs an AND operation is shown in figure. It has n input (n >= 2) and
one output.

Logic diagram

Truth Table

OR Gate
A circuit which performs an OR operation is shown in figure. It has n input (n >= 2) and one
output.

Logic diagram
Truth Table

NOT Gate
NOT gate is also known as Inverter. It has one input A and one output Y.

Logic diagram

Truth Table

NAND Gate
A NOT-AND operation is known as NAND operation. It has n input (n >= 2) and one output.
Logic diagram

Truth Table

NOR Gate
A NOT-OR operation is known as NOR operation. It has n input (n >= 2) and one output.

Logic diagram

Truth Table
XOR Gate
XOR or Ex-OR gate is a special type of gate. It can be used in the half adder, full adder and
subtractor. The exclusive-OR gate is abbreviated as EX-OR gate or sometime as X-OR gate.
It has n input (n >= 2) and one output.

Logic diagram

Truth Table

XNOR Gate
XNOR gate is a special type of gate. It can be used in the half adder, full adder and
subtractor. The exclusive-NOR gate is abbreviated as EX-NOR gate or sometime as X-NOR
gate. It has n input (n >= 2) and one output.

Logic diagram
Truth Table

DeMorgan’s Theorem
As we have seen previously, Boolean Algebra uses a set of laws and rules to define the
operation of a digital logic circuit with “0’s” and “1’s” being used to represent a digital input
or output condition. Boolean Algebra uses these zeros and ones to create truth tables and
mathematical expressions to define the digital operation of a logic AND, OR and NOT (or
inversion) operations as well as ways of expressing other logical operations such as the XOR
(Exclusive-OR) function.

While George Boole’s set of laws and rules allows us to analyise and simplify a digital
circuit, there are two laws within his set that are attributed to Augustus DeMorgan (a
nineteenth century English mathematician) which views the logical NAND and NOR
operations as separate NOT AND and NOT OR functions respectively.

But before we look at DeMorgan’s Theory in more detail, let’s remind ourselves of the basic
logical operations where A and B are logic (or Boolean) input binary variables, and whose
values can only be either “0” or “1” producing four possible input combinations, 00, 01, 10,
and 11.
The following table gives a list of the common logic functions and their equivalent Boolean
notation where a “.” (a dot) means an AND (product) operation, a “+” (plus sign) means an
OR (sum) operation, and the complement or inverse of a variable is indicated by a bar over
the variable.

DeMorgan’s Theory
DeMorgan’s Theorems are basically two sets of rules or laws developed from the Boolean
expressions for AND, OR and NOT using two input variables, A and B. These two rules or
theorems allow the input variables to be negated and converted from one form of a Boolean
function into an opposite form.

DeMorgan’s first theorem states that two (or more) variables NOR´ed together is the same as
the two variables inverted (Complement) and AND´ed, while the second theorem states that
two (or more) variables NAND´ed together is the same as the two terms inverted
(Complement) and OR´ed. That is replace all the OR operators with AND operators, or all
the AND operators with an OR operators.

DeMorgan’s First Theorem

DeMorgan’s First theorem proves that when two (or more) input variables are AND’ed and
negated, they are equivalent to the OR of the complements of the individual variables. Thus
the equivalent of the NAND function will be a negative-OR function, proving that
A.B = A+B. We can show this operation using the following table.
The top logic gate arrangement of: A.B can be implemented using a standard NAND gate
with inputs A and B. The lower logic gate arrangement first inverts the two inputs producing
A and B. These then become the inputs to the OR gate. Therefore the output from the OR
gate becomes: A+B

Then we can see here that a standard OR gate function with inverters (NOT gates) on each of
its inputs is equivalent to a NAND gate function. So an individual NAND gate can be
represented in this way as the equivalency of a NAND gate is a negative-OR.

DeMorgan’s Second Theorem


DeMorgan’s Second theorem proves that when two (or more) input variables are OR’ed and
negated, they are equivalent to the AND of the complements of the individual variables. Thus
the equivalent of the NOR function is a negative-AND function proving that A+B = A.B, and
again we can show operation this using the following truth table.

The top logic gate arrangement of: A+B can be implemented using a standard NOR gate
function using inputs A and B. The lower logic gate arrangement first inverts the two inputs,
thus producing A and B. Thus then become the inputs to the AND gate. Therefore the output
from the AND gate becomes: A.B

Then we can see that a standard AND gate function with inverters (NOT gates) on each of its
inputs produces an equivalent output condition to a standard NOR gate function, and an
individual NOR gate can be represented in this way as the equivalency of a NOR gate is a
negative-AND.
Although we have used DeMorgan’s theorems with only two input variables A and B, they
are equally valid for use with three, four or more input variable expressions, for example:

For a 3-variable input

A.B.C = A+B+C

and also

A+B+C = A.B.C

For a 4-variable input

A.B.C.D = A+B+C+D

and also

A+B+C+D = A.B.C.D

and so on.
DeMorgan’s Equivalent Gates
We have seen here that by using DeMorgan’s Theorems we can replace all of the AND (.)
operators with an OR (+) and vice versa, and then complements each of the terms or variables
in the expression by inverting it, that is 0’s to 1’s and 1’s to 0’s before inverting the entire
function.

Thus to obtain the DeMorgan equivalent for an AND, NAND, OR or NOR gate, we simply
add inverters (NOT-gates) to all inputs and outputs and change an AND symbol to an OR
symbol or change an OR symbol to an AND symbol as shown in the following table.

Then we have seen in this tutorial about DeMorgan’s Thereom that the complement of two
(or more) AND’ed input variables is equivalent to the OR of the complements of these
variables, and that the complement of two (or more) OR’ed variables is equivalent to the
AND of the complements of the variables as defined by DeMorgan.
Sum of Product
The Sum of Product expression is equivalent to the logical AND fuction which Sums two or more
Products to produce an output

Boolean Algebra is a simple and effective way of representing the switching action of
standard logic gates and a set of rules or laws have been invented to help reduce the number
of logic gates needed to perform a particular logical operation. Boolean Algebra is the digital
logic mathematics we use to analyse gates and switching circuits such as those for the AND,
OR and NOT gate functions, also known as a “Full Set” in switching theory.

In mathematics, the number or quantity obtained by multiplying two (or more) numbers
together is called the product. For example, if we multiply the number 2 by 3 the resulting
answer is 6, as 2*3 = 6, so “6” will be the product number.

In Boolean Algebra, the multiplication of two integers is equivalent to the logical AND
operation thereby producing a “Product” term when two or more input variables are
“AND’ed” together. In other words, in Boolean Algebra the AND function is the equivalent
of multiplication and so its output state represents the product of its inputs.

AND Gate (Product)

Unlike conventional mathematics which uses a Cross (x), or a Star (*) to represent a
multiplication action, the AND function is represented in Boolean multiplication by a single
“dot” (.). Thus the Boolean equation for a 2-input AND gate is given as: Q = A.B, that is Q
equals both A AND B. For a product term these input variables can be either “true” or
“false”, “1” or “0”, or be of a complemented form, so A.B, A.B or A.B are all classed as
product terms.

The Product (AND) Term


So we now know that in Boolean Algebra, “product” means the AND’ing of the terms with
the variables in a product term having one instance in its true form or in its complemented
form so that the resulting product cannot be simplified further. These are known as minterms.
So how can we show the operation of this “product” function in Boolean Albegra.

A product term can have one or two independant variables, such as A and B, or it can have
one or two fixed constants, again 0 and 1. We can use these variables and constants in a
variety of different combinations and produce a product result as shown in the following lists.
Note that a Boolean “variable” can have one of two values, either “1” or “0”, and can change
its value. For example, A = 0, or A = 1 whereas a Boolean “constant” which can also be in
the form of a “1” or “0”, is a fixed value and therefore cannot change.

Then we can see that any given Boolean product can be simplified to a single constant or
variable with a brief description of the various Boolean Laws given below where “A”
represents a variable input.

 Annulment Law – A term AND’ed with 0 is always equal to 0 (A.0 = 0)

 Identity Law – A term AND’ed with 1 is always equal to the term (A.1 = A)

 Idempotent Law – A term AND’ed with itself is always equal to the term (A.A = A)

 Complement Law – A term AND’ed with its complement is always equal to 0 (A.A = 0)

 Commutative Law – The order in which two terms are AND’ed is the same (A.1 = 1.A)

The Sum (OR) Term


While the AND function is commonly referred to as the product term, the OR function is
referred to as a sum term. The OR function is the mathemetical equivalent of addition which
is denoted by a plus sign, (+). Thus a 2-input OR gate has an output term represented by the
Boolean expression of A+B because it is the logical sum of A and B.

OR Gate (Sum)

This logical sum is known commonly as Boolean addition as an OR function produces the
summed term of two or more input variables, or constants. We will look at the OR function
and Boolean addition in more detail in the next tutorial, but for now we will remember that an
OR function represents the Sum Term.

Sum of Products

So we have seen that the AND function produces the logical product of Boolean
multiplication, and that the OR function produces the logical sum of Boolean addition. But
when dealing with combinational logic circuits in which AND gates, OR gates and NOT
gates are connected together, the expressions of Sum-of-Products and Product-of-Sums are
widely used.

The Sum of Product (SOP) expression comes from the fact that two or more products (AND)
are summed (OR) together. That is the outputs from two or more AND gates are connected to
the input of an OR gate so that they are effectively OR’ed together to create the final AND-
OR logical output. For example, the following Boolean function is a typical sum-of-product
expression:

Sum of Product Expression

Q = (A.B) + (B.C) + (A.1)

and also

(A.B.C) + (A.C) + (B.C)

However, Boolean functions can also be expressed in nonstandard sum of products forms like
that shown below but they can be converted to a standard SOP form by expanding the
expression. So:

Q = A.B(C + C) + ABC

Becomes in sum-of-product terms:

Q = A.B.C + A.B.C + ABC

Actually this large SOP expression can be reduced further using the laws of Boolean algerbra
to give a reduced SOP expression of:

Q = A.B + A.C

Converting an SOP Expression into a Truth Table


We can display any sum-of-product term in the form of a truth table as each input
combination that produces a logic “1” output is an AND or product term as shown below.

Consider the following sum of product expression:

Q = A.B.C + A.B.C + A.B.C

We can now draw up the truth table for the above expression to show a list of all the possible
input combinations for A, B and C which will result in an output “1”.

Then we can clearly see from the truth table that each product row which produces a “1” for
its output corresponds to its Boolean multiplication expression with all of the other rows
having a “0” output as a “1” is always outputted from an OR gate.

Clearly the advantage here is that the truth table gives us a visual indication of the Boolean
expression allowing us to simplify the expression. For example, the above sum-of-product
term can be simplified to: Q = A.(B + B.C) if required.

Sum-of-Product Example
The following Boolean Algebra expression is given as:

Q = A(BC + BC + BC) + ABC


1. Convert this logical equation into an equivalent SOP term.

2. Use a truth table to show all the possible combinations of input conditions that will
produces an output.

3. Draw a logic gate diagram for the expression.

1. Convert to SOP term

Q = A.B.C + A.B.C + A.B.C + A.B.C

2. Truth Table

3. Logic Gate SOP Diagram


Then we have seen in this tutorial that the Sum-of-Products (SOP) expression is a standard
boolean expression that “Sums” two or more “Products” and that for a digital logic circuit an
SOP expression takes the output of two or more logic AND gates and OR’s them together to
create the final (AND-OR) output.

Product of Sum
The Product of Sum expression is equivalent to the logical OR-AND fuction which gives the
AND Product of two or more OR Sums to produce an output

Boolean Algebra is a simple and effective way of representing the switching action of
standard logic gates and a set of rules or laws have been invented to help reduce the number
of logic gates needed to perform a particular logical operation. Boolean Algebra is the digital
logic mathematics we use to analyse gates and switching circuits such as those for the AND,
OR and NOT gate functions, also known as a “Full Set” in switching theory.

In mathematics, the number or quantity obtained by multiplying two (or more) numbers
together is called the product. For example, if we multiply the number 2 by 3 the resulting
answer is 6, as 2*3 = 6, so “6” will be the product number.

In Boolean Algebra, the multiplication of two integers is equivalent to the logical AND
operation thereby producing a “Product” term when two or more input variables are
“AND’ed” together. In other words, in Boolean Algebra the AND function is the equivalent
of multiplication and so its output state represents the product of its inputs.

AND Gate (Product)


Unlike conventional mathematics which uses a Cross (x), or a Star (*) to represent a
multiplication action, the AND function is represented in Boolean multiplication by a single
“dot” (.). Thus the Boolean equation for a 2-input AND gate is given as: Q = A.B, that is Q
equals both A AND B. For a product term these input variables can be either “true” or
“false”, “1” or “0”, or be of a complemented form, so A.B, A.B or A.B are all classed as
product terms.

The Product (AND) Term


So we now know that in Boolean Algebra, “product” means the AND’ing of the terms with
the variables in a product term having one instance in its true form or in its complemented
form so that the resulting product cannot be simplified further. These are known as minterms.
So how can we show the operation of this “product” function in Boolean Albegra.

A product term can have one or two independant variables, such as A and B, or it can have
one or two fixed constants, again 0 and 1. We can use these variables and constants in a
variety of different combinations and produce a product result as shown in the following lists.

Product of Sum
So we have seen that the OR function produces the logical sum of Boolean addition, and that
the AND function produces the logical sum of Boolean multiplication. But when dealing with
combinational logic circuits in which AND gates, OR gates and NOT gates are connected
together, the expressions of Product-of-Sum is widely used.

The Product of Sum (POS) expression comes from the fact that two or more sums (OR’s) are
added (AND’ed) together. That is the outputs from two or more OR gates are connected to
the input of an AND gate so that they are effectively AND’ed together to create the final (OR
AND) output. For example, the following Boolean function is a typical product-of-sum
expression:

Product of Sum Expressions

Q = (A + B).(B + C).(A + 1)

and also

(A + B + C).(A + C).(B + C)
However, Boolean functions can also be expressed in nonstandard product of sum forms like
that shown below but they can be converted to a standard POS form by using the distributive
law to expand the expression with respect to the sum. Therefore:

Q = A + (BC)

Becomes in expanded product-of-sum terms:

Q = (A + B)(A + C)

Another nonstandard example is:

Q = (A + B) + (A.C)

Becomes as an expanded product-of-sum expession:

Q = (A + B + A)(A + B + C)

which can, if required be reduced using distributive law and absorption law too:

Q = (A + B)(A + B + C)

Q=A+B+C

Q=A+B

Converting an POS Expression into a Truth Table


We can display any product-of-sum term in the form of a truth table as each input
combination that produces a logic “0” output is an OR or sum term as shown below.

Consider the following product of sum expression:

Q = (A + B + C)(A + B + C)(A + B + C)

We can now draw up the truth table for the above expression to show a list of all the possible
input combinations for A, B and C which will result in an output “0”.

Product of Sum Truth Table Form

Inputs Output Product


C B A Q
0 0 0 0 A+B+C
0 0 1 1
0 1 0 0 A+B+C
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 0 A+B+C
1 1 1 1

Then we can clearly see from the truth table that each row which produces a “0” for its output
corresponds to its Boolean addition expression with all of the other rows having a “1” output.
The advantage here is that the truth table gives us a visual indication of the Boolean
expression allowing us to simplify the expression remembering that a sum term produces a
“0” output when all of its inputs are equal to “0”. So to make a sum term row equal to “0”,
the we must invert all the inputs which are equal to “1”.

Product-of-Sum Example
The following Boolean Algebra expression is given as:

Q = (A + B + C)(A + B + C)(A + B + C)(A + B + C)

1. Use a truth table to show all the possible combinations of input conditions that will
produces a “0” output.

2. Draw a logic gate diagram for the POS expression.

1. Truth Table

Product of Sum Truth Table Form

Inputs Output Product


C B A Q
0 0 0 0 A+B+C
0 0 1 1
0 1 0 0 A+B+C
0 1 1 1
1 0 0 1
1 0 1 0 A+B+C
1 1 0 0 A+B+C
1 1 1 1

2. Logic Gate Diagram


Then we have seen in this tutorial that the Product-of-Sum (POS) expression is a standard
boolean expression that takes the “Product” of two or more “Sums”. For a digital logic circuit
the POS expression takes the output of two or more logic OR gates and AND’s them together
to create the final OR-AND logic output.

Introduction of K-Map (Karnaugh Map)


In many digital circuits and practical problems we need to find expression with minimum
variables. We can minimize Boolean expressions of 3, 4 variables very easily using K-map
without using any Boolean algebra theorems. K-map can take two forms Sum of Product
(SOP) and Product of Sum (POS) according to the need of problem. K-map is table like
representation but it gives more information than TRUTH TABLE. We fill grid of K-map
with 0’s and 1’s then solve it by making groups.

Steps to solve expression using K-map-

1. Select K-map according to the number of variables.


2. Identify minterms or maxterms as given in problem.
3. For SOP put 1’s in blocks of K-map respective to the minterms (0’s elsewhere).
4. For POS put 0’s in blocks of K-map respective to the maxterms(1’s elsewhere).
5. Make rectangular groups containing total terms in power of two like 2,4,8 ..(except 1) and
try to cover as many elements as you can in one group.
6. From the groups made in step 5 find the product terms and sum them up for SOP form.

SOP FORM

1. K-map of 3 variables-
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)

1. K-map for 4 variables

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’)

POS FORM

1. K-map of 3 variables-

F(A,B,C)=π(0,3,6,7)
From red group we find terms

A B C’

Taking complement of these two

A’ B’ C

Now sum up them

(A’ + B’ + C)

From green group we find terms

B C

Taking complement of these two terms

B’ C’

Now sum up them

(B’+C’)

From brown group we find terms

A’ B’ C’
Taking complement of these two

ABC

Now sum up them

(A + B + C)

We will take product of these three terms :Final expression (A’ + B’ + C) (B’ + C’) (A + B
+ C)

2. K-map of 4 variables-

F(A,B,C,D)=π(3,5,7,8,10,11,12,13)

From green group we find terms

C’ D B

Taking their complement and summing them

(C+D’+B’)

From red group we find terms

C D A’

Taking their complement and summing them


(C’+D’+A)

From blue group we find terms

A C’ D’

Taking their complement and summing them

(A’+C+D)

From brown group we find terms

A B’ C

Taking their complement and summing them

(A’+B+C’)

Finally we express these as product –(C+D’+B’).(C’+D’+A).(A’+C+D).(A’+B+C’)

PITFALL– *Always remember POS ≠ (SOP)’

*The correct form is (POS of F)=(SOP of F’)’

You might also like