0% found this document useful (0 votes)
39 views38 pages

Chapter 3 Logic Gates

Enggineering

Uploaded by

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

Chapter 3 Logic Gates

Enggineering

Uploaded by

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

Logic Gates

 A logic gate (or electronic gate) is a circuit that is able to


operate on a number of binary signals to perform a
particular logical function
 In other words, it is a device that controls the flow of
information, usually in the form of pulses
 In practice, the available logic gates in use are:
 NOT (OR INVERTER)
 AND
 OR
 NOR (NOT-OR)
 NAND (NOT-AND)
 EXCLUSIVE-OR (XOR)
 EXCLUSIVE-NOR (XNOR)
Logic Gates
 NOT (INVERTER)
 Performs a basic logic function called inversion
or complementation
 The inverter changes one logic level (HIGH /
LOW) to the opposite logic level
 In terms of bits, it changes a ‘1’ to a ‘0’ and
vice- versa
 The standard logic symbols for the inverter
are:
INPUT OUTPUT
1
1 0
HIGH LOW

0 1
LOW HIGH
Logic Gates
 The truth table for NOT gate

INPUT OUTPUT

A Y=A

0 1

1 0

 The total number of possible input


combinations (N) is determined by the
mathematical formula:
N = 2n
where n is the number of input variables
Logic Gates
 The AND gate
 Is composed of two or more inputs and a
single output, and it performs logical
multiplication
 The logical operation of the AND gate is such
that the output is HIGH (1) when all the inputs
are HIGH, otherwise it is LOW (0)
 The standard logic symbols for the AND gate
are: &
&
Logic Gates
 The truth table for AND gate

INPUT OUTPUT

A B X = AB

0 0 0

0 1 0

1 0 0

1 1 1
Logic Gates
 The OR gate
 Is composed of two or more inputs and a
single output, and it performs logical addition
 The logical operation of the OR gate is such
that the output is HIGH (1) when any of the
inputs are HIGH, otherwise it is LOW (0)
 The standard logic symbols for the OR gate
are:

1

1
Logic Gates
 The truth table for OR gate

INPUT OUTPUT

A B X = A+B

0 0 0

0 1 1

1 0 1

1 1 1
Logic Gates
 The NOR (NOT OR) gate
 Is composed of two or more inputs and a single
output and it has a universal property
 The term NOR is a contraction of NOT–OR and
implies an OR function with an inverted output
 The logical operation of the NOR gate is such
that the output is HIGH (1) only when all the
inputs are LOW
 The standard logic symbols for the NOR gate
are: 1
1
Logic Gates
 The truth table for NOR gate

INPUT OUTPUT

A B X =A+B

0 0 1

0 1 0

1 0 0

1 1 0
Logic Gates
 The NAND (NOT AND) gate
 Is composed of two or more inputs and a
single output
 It is a very popular logic element because it
may be used as a universal function
 That is, it may be employed to construct an
inverter, an AND gate, an OR gate, or any
combination of these functions
 The term NAND is a contraction of NOT-AND
and implies an AND function with an inverted
output
 The logical operation of the NAND gate is such
that the output is LOW (0) only when all the
inputs are HIGH (1)
Logic Gates
 The standard logic symbols for the NAND gate:
&
&

 The truth table for NAND gate is:


INPUT OUTPUT

A B X = AB

0 0 1

0 1 1

1 0 1

1 1 0
Logic Gates
 The XOR (EXCLUSIVE OR) Gate
 It has two input terminals and one output
terminal
 Usually formed from the combination of other
logic gates
 Is an "inequality" function and the output is
HIGH (1) when the inputs are not equal to
each other
 The standard logic symbols for the XOR gate:
=1
=1
Logic Gates
 The truth table for XOR gate is

INPUT OUTPUT

A B X

0 0 0

0 1 1

1 0 1

1 1 0
Logic Gates
 The XNOR (EXCLUSIVE NOR)
 It has two input terminals and one output
terminal
 Usually formed from the combination of other
logic gates
 Is an "equality" function and the output is
HIGH (1) when the inputs are equal to each
other
 The standard logic symbol for the XNOR gate:
=1
=1
Logic Gates
 The truth table for XNOR gate is

INPUT OUTPUT

A B X

0 0 1

0 1 0

1 0 0

1 1 1
Logic Gates
 The truth table below summarizes the
output states for all 2-input gates

INPUT OUTPUT OF EACH GATE

A B AND NAND OR NOR EX-OR EX-


NOR

0 0 0 1 0 1 0 1

0 1 0 1 1 0 1 0

1 0 0 1 1 0 1 0

1 1 1 0 1 0 0 1
Logic Gates
 The truth table below summarizes the
output states for all 3-input gates

INPUT OUTPUT
A B C AND NAND OR NOR
0 0 0 0 1 0 1
0 0 1 0 1 1 0
0 1 0 0 1 1 0
0 1 1 0 1 1 0
1 0 0 0 1 1 0
1 0 1 0 1 1 0
1 1 0 0 1 1 0
1 1 1 1 0 1 0
Combination of Logic Gates
 Logic gates can be combined to produce
more complex functions
 They can also be combined to substitute
one type of gate for another
 For example to produce an output Q
which is true only when input A is true and
input B is false, as shown in the truth table
below,
INPUT A INPUT B OUTPUT Q
0 0 0
0 1 0
1 0 1
1 1 0
Combination of Logic Gates
 we can combine a NOT gate and an AND
gate like this

Q = A AND NOT B
Combination of Logic Gates
 Truth tables can be used to work out the
function and the output of a combination
of gates
 For example

D = NOT (A OR B)
E = B AND C
Q = D OR E (NOT(A OR B)) OR (B AND C)
Chapter 3: Combination of Logic
Gates

INPUTS OUTPUTS
A B C D E Q
0 0 0 1 0 1
0 0 1 1 0 1
0 1 0 0 0 0
0 1 1 0 1 1
1 0 0 0 0 0
1 0 1 0 0 0
1 1 0 0 0 0
1 1 1 0 1 1
Combination of Logic Gates
signment
Compute the truth table for the following combinational logic

& &
A A
1
C
1 F C F
& &

& &
D
B B
Combination of Logic Gates
 Logic gates are available on ICs which usually
contain several gates of the same type
 For example four 2-input NAND gates or
three 3-input NAND gates
 This can be wasteful if only a few gates are
required
 To avoid using too many different gates you
can reduce the number of gate inputs or
substitute one type of gate for another
 The number of inputs to a gate can be
reduced by connecting two (or more) inputs
together
Combination of Logic Gates
 The diagram below shows a 3-input AND
gate operating as a 2-input AND gate

 Reducing a NAND or NOR gate to just one


input creates a NOT gate
Combination of Logic Gates
 NAND or NOR gates can also be combined
to create any type of gate apart from the
NOT gate

 This enables a circuit to be built from just


one type of gate, either NAND or NOR

 For example an AND gate is a NAND gate


then a NOT gate (to undo the inverting
function)
Combination of Logic Gates
 To change a type of gate, such as changing
OR to AND, you must do three things:

 Invert (NOT) each input


 Change the gate type (OR to AND, or AND to
OR)
 Invert (NOT) the output

 For example an OR gate can be built from


NOT outputs fed into a NAND (AND + NOT)
gate
Combination of Logic Gates
 NAND gate equivalents
 The table below shows the NAND gate
equivalents of NOT, AND, OR and NOR gates

Gate Equivalent in NAND gates


NOT

AND

OR

NOR
CHAPTER FOUR
Boolean Functions
 A Boolean function is an expression formed with
binary variables and logical operators

 A binary variable can have two possible states,


namely ‘0’ and ‘1’

 A truth table is a list which defines a Boolean


function

 For example, lets consider the truth table shown


below
Boolean Functions
INPUT OUTPUT
A B C X
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 0

 The algebraic expression representing


this function is therefore
Boolean Algebra
 It is the mathematics of digital system
 It is a relatively simple mathematical tool that
allows us to describe the relationship between a
logic circuit's output(s) and its inputs as an
algebraic equation (a Boolean expression)
 Boolean equations are often in either the sum-of-
product form or the product-of-sums form
 Each of the product terms in a sum-of-product
equation is known as a minterm
 while each sum term in a product-of-sum equation
is called a maxterm
Boolean Algebra
 The basic rules for Boolean addition and
multiplication are presented in the Table
below
ADDITION RULES MULTIPLICATION RULES

0+0=0 0∙0=0
0+1=1 0∙1=0
1+0=1 1∙0=0
1+1=1 1∙1=1
Laws of Boolean Algebra
 Cummutative Law
 The commutative law of addition for two
variables is algebraically expressed as
A+B=B+A
 The commutative law of multiplication for two
variables is expressed as
AB = BA

 Associative Laws
 The associative law of addition of three
variables is expressed as
A + (B + C) = (A + B) + C
Laws of Boolean Algebra
 The associative law of multiplication of three
variables is expressed as
A(BC) = (AB)C

 Distributive Law
 The distributive law of three variables is
expressed as follows:
A (B+C) = AB + AC
Rules of Boolean Algebra
Rule Number Boolean Expression
1 A+0=A
2 A+1=1
3 A∙0=0
4 A∙1=A
5 A+A=A
6 A+A=1
7 A∙A =A
8 A ∙A=0
9 A=A
10 A + AB = A
11 A + AB = A + B
12 (A+B)(A+C) = A + BC
13
14
Boolean Algebra
 De Morgan’s theorems may be verified by
examining the truth tables of Boolean
expressions
 For example: A+B= A∙B
A B A+B

0 0 A
1 B
1 A1B A0B 0

0 1 1 0 0 1 1

1 0 0 1 0 1 1

1 1 0 0 0 1 1
Boolean Algebra
 DUALITY
 Every sum-of-products equation has a dual
product-of-sums equation and vice versa

 This fact provides another method which can


be used in the simplification of Boolean
equations

 The dual of an equation is simply obtained by


merely replacing every AND symbol () by the
OR symbol (+) and vice versa
Boolean Algebra
 Analyze the circuit behavior of the combinational
logic system using:
 the truth table method
 the Boolean algebra method.

A L N

B P

C
Q

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy