logic gates nand nor
TRANSCRIPT
-
8/7/2019 Logic Gates NAND NOR
1/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 1
Digital Electronics
Topic 2:Logic Gates
-
8/7/2019 Logic Gates NAND NOR
2/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 2
Logic Gates
The Inverter The AND Gate The OR Gate The NAND Gate
The NOR Gate The XOR Gate The XNOR Gate
Drawing Logic Circuit
Analysing Logic Circuit
Propagation Delay
-
8/7/2019 Logic Gates NAND NOR
3/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 3
Universal Gates: NAND and NOR
NAND Gate NOR Gate
Implementation using NAND Gates
Implementation using NOR Gates
Implementation of SOP Expressions
Implementation of POS Expressions
Positive and Negative Logic
Integrated Circuit Logic Families
-
8/7/2019 Logic Gates NAND NOR
4/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 4
Logic Gates
Gate Symbols
EXCLUSIVE OR
a
b a.b
a
ba+b
a a'
a
b(a+b)'
a
b(a.b)'
a
b
a b
a
b a.b&
a
ba+b1
AND
a a'1
a
b(a.b)'&
a
b(a+b)'1
a
b
a b=1
OR
NOT
NAND
NOR
Symbol set 1 Symbol set 2
(ANSI/IEEE Standard 91-1984)
-
8/7/2019 Logic Gates NAND NOR
5/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 5
Logic Gates: The Inverter
The InverterA A'
0 11 0
A A' A A'
Application of the inverter: complement.
1
0
0
1
0
1
0
1
1
0
0
1
1
0
1
0
Binary number
1s Complement
-
8/7/2019 Logic Gates NAND NOR
6/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 6
Logic Gates: The AND Gate
The AND Gate
A
BA.B
&A
BA.B
A B A . B
0 0 0
0 1 0
1 0 01 1 1
-
8/7/2019 Logic Gates NAND NOR
7/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 7
Logic Gates: The AND Gate
Application of the AND Gate
1 sec
A
1 sec
Enable
A
EnableCounter
Reset to zero
betweenEnable pulses
Register,decode
andfrequencydisplay
-
8/7/2019 Logic Gates NAND NOR
8/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 8
Logic Gates: The OR Gate
The OR Gate
1AB
A+BA
BA+B
A B A + B
0 0 0
0 1 1
1 0 11 1 1
-
8/7/2019 Logic Gates NAND NOR
9/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 9
Logic Gates: The NAND Gate
The NAND Gate
&A
B(A.B)'
A
B(A.B)'
A
B(A.B)'
A B (A.B)'
0 0 1
0 1 1
1 0 11 1 0 NAND Negative-OR
-
8/7/2019 Logic Gates NAND NOR
10/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 10
Logic Gates: The NOR Gate
The NOR Gate
1AB
(A+B)'A
B(A+B)'
A
B(A+B)'
A B (A+B)'
0 0 1
0 1 0
1 0 01 1 0 NOR Negative-AND
-
8/7/2019 Logic Gates NAND NOR
11/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 11
Logic Gates: The XOR Gate
The XOR Gate
=1A
BA B
A
BA B
A B A B
0 0 0
0 1 1
1 0 11 1 0
-
8/7/2019 Logic Gates NAND NOR
12/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 12
Logic Gates: The XNOR Gate
The XNOR Gate
A
B(A B)'
=1A
B(A B)'
A B (A B)'
0 0 1
0 1 0
1 0 01 1 1
-
8/7/2019 Logic Gates NAND NOR
13/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 13
Drawing Logic Circuit
When a Boolean expression is provided, we can easily drawthe logic circuit.
Examples:
(i) F1 = xyz' (note the use of a 3-input AND gate)
xy
z
F1
z'
-
8/7/2019 Logic Gates NAND NOR
14/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 14
Drawing Logic Circuit
(ii) F2 = x + y'z (can assume that variables and theircomplements are available)
x
y'
z
F2
y'z
(iii) F3 = xy' + x'z
x'z
F3
x'z
xy'x
y'
-
8/7/2019 Logic Gates NAND NOR
15/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 15
Analysing Logic Circuit
When a logic circuit is provided, we can analyse the circuit toobtain the logic expression.
Example: What is the Boolean expression of F4?
A'B'
A'B'+C (A'B'+C)'
A'
B'
CF4
F4 = (A'B'+C)' = (A+B).C'
-
8/7/2019 Logic Gates NAND NOR
16/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 16
Propagation Delay
Every logic gate experiences some delay (though very small)in propagating signals forward.
This delay is called Gate (Propagation) Delay. Formally, it is the average transition time taken for the output
signal of the gate to change in response to changes in the
input signals. Three different propagation delay times associated with a
logic gate:
tPHL: output changing from the High level to Low level
tPLH: output changing from the Low level to High level
tPD=(tPLH + tPHL)/2 (average propagation delay)
-
8/7/2019 Logic Gates NAND NOR
17/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 17
Propagation Delay
Input Output
Output
Input
H
L
L
H
tPHL tPLH
-
8/7/2019 Logic Gates NAND NOR
18/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 18
Propagation Delay
A B C
In reality, output signalsnormally lag behind inputsignals:
1
0
1
0
0
1
time
Signal for C
Signal for B
Signal for A
Ideally, nodelay:
1
0
1
0
0
1
time
Signal for C
Signal for B
Signal for A
-
8/7/2019 Logic Gates NAND NOR
19/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 19
Calculation of Circuit Delays
Amount of propagation delay per gate depends on:
(i) gate type (AND, OR, NOT, etc)
(ii) transistor technology used (TTL,ECL,CMOS etc), (iii) miniaturisation (SSI, MSI, LSI, VLSI)
To simplify matters, one can assume
(i) an average delay time per gate, or
(ii) an average delay time per gate-type.
Propagation delay of logic circuit
= longest time it takes for the input signal(s) to propagate to theoutput(s).
= earliest time for output signal(s) to stabilise, given that inputsignals are stable at time 0.
-
8/7/2019 Logic Gates NAND NOR
20/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 20
Calculation of Circuit Delays
In general, given a logic gate with delay, t.
Logic
Gate
t1t2
tn
: :
max (t1, t2, ..., tn ) + t
If inputs are stable at times t1,t2,..,tn, respectively; then theearliest time in which the output will be stable is:
max(t1, t2, .., tn) + t
To calculate the delays of all outputs of a combinationalcircuit, repeat above rule for all gates.
C l l i f Ci i D l
-
8/7/2019 Logic Gates NAND NOR
21/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 21
Calculation of Circuit Delays
As a simple example, consider the full adder circuit where allinputs are available at time 0. (Assume each gate has delayt.)
XY S
C
Z
max(0,0)+t = t
t
0
0
0
max(t,0)+t = 2t
max(t,2t)+t = 3t2t
where outputs S and C, experience delaysof 2t and 3t, respectively.
-
8/7/2019 Logic Gates NAND NOR
22/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 22
Universal Gates: NAND and NOR
AND/OR/NOT gates are sufficient for building any Booleanfunctions.
We call the set {AND, OR, NOT} a complete set of logic. However, other gates are also used because:
(i) usefulness
(ii) economical on transistors(iii) self-sufficient
NAND/NOR: economical, self-sufficient
XOR: useful (e.g. parity bit generation)
-
8/7/2019 Logic Gates NAND NOR
23/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 23
NAND Gate
NAND gate is self-sufficient (can build any logic circuit withit).
Therefore, {NAND} is also a complete set of logic.
Can be used to implement AND/OR/NOT.
Implementing an inverter using NAND gate:
x x'
(x.x)' = x' (T1: idempotency)
-
8/7/2019 Logic Gates NAND NOR
24/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 24
NAND Gate
Implementing AND using NAND gates:
x x.yy
(x.y)'
((xy)'(xy)')' = ((xy)')' idempotency= (xy) involution
Implementing OR using NAND gates:
x
x+y
y
x'
y'
((xx)'(yy)')' = (x'y')' idempotency
= x''+y'' DeMorgan= x+y involution
-
8/7/2019 Logic Gates NAND NOR
25/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 25
NOR Gate
NOR gate is also self-sufficient.
Therefore, {NOR} is also a complete set of logic
Can be used to implement AND/OR/NOT.
Implementing an inverter using NOR gate:
x x'
(x+x)' = x' (T1: idempotency)
-
8/7/2019 Logic Gates NAND NOR
26/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 26
NOR Gate
Implementing AND using NOR gates:
((x+x)'+(y+y)')'=(x'+y')' idempotency= x''.y'' DeMorgan
= x.y involution
xx.y
y
x'
y'
((x+y)'+(x+y)')' = ((x+y)')' idempotency= (x+y) involution
Implementing OR using NOR gates:
x x+yy
(x+y)'
-
8/7/2019 Logic Gates NAND NOR
27/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 27
Implementation using NAND gates
Possible to implement any Boolean expression using NANDgates.
Procedure:(i) Obtain sum-of-products Boolean expression:
e.g. F3 = xy'+x'z
(ii) Use DeMorgan theorem to obtain expressionusing 2-level NAND gates
e.g. F3 = xy'+x'z
= (xy'+x'z)' ' involution= ((xy')' . (x'z)')' DeMorgan
-
8/7/2019 Logic Gates NAND NOR
28/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 28
Implementation using NAND gates
x'z
F3
(x'z)'
(xy')'x
y'
F3 = ((xy')'.(x'z)') ' = xy' + x'z
-
8/7/2019 Logic Gates NAND NOR
29/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 29
Implementation using NOR gates
Possible to implement any Boolean expression using NORgates.
Procedure:(i) Obtain product-of-sums Boolean expression:
e.g. F6 = (x+y').(x'+z)
(ii) Use DeMorgan theorem to obtain expressionusing 2-level NOR gates.
e.g. F6 = (x+y').(x'+z)
= ((x+y').(x'+z))' ' involution= ((x+y')'+(x'+z)')' DeMorgan
-
8/7/2019 Logic Gates NAND NOR
30/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 30
Implementation using NOR gates
x'z
F6
(x'+z)'
(x+y')'x
y'
F6 = ((x+y')'+(x'+z)')' = (x+y').(x'+z)
-
8/7/2019 Logic Gates NAND NOR
31/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 31
Implementation of SOP Expressions
Sum-of-Products expressions can be implemented using:
2-level AND-OR logic circuits
2-level NAND logic circuits
AND-OR logic circuit
F = AB + CD + E
F
A
B
DC
E
-
8/7/2019 Logic Gates NAND NOR
32/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 32
Implementation of SOP Expressions
NAND-NAND circuit (by circuittransformation)
a) add double bubblesb) change OR-with-
inverted-inputs to NAND& bubbles at inputs totheir complements
F
A
B
DC
E
A
B
DC
E'
F
-
8/7/2019 Logic Gates NAND NOR
33/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 33
Implementation of POS Expressions
Product-of-Sums expressions can be implemented using:
2-level OR-AND logic circuits
2-level NOR logic circuits
OR-AND logic circuit
G = (A+B).(C+D).E
G
A
B
DC
E
-
8/7/2019 Logic Gates NAND NOR
34/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 34
Implementation of POS Expressions
NOR-NOR circuit (by circuittransformation):
a) add double bubbles
b) changed AND-with-inverted-inputs to NOR
& bubbles at inputs totheir complements
G
A
B
D
C
E
A
B
DC
E'
G
-
8/7/2019 Logic Gates NAND NOR
35/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 35
Positive & Negative Logic
In logic gates, usually:
H (high voltage, 5V) = 1
L (low voltage, 0V) = 0 This convention positive logic.
However, the reverse convention, negative logic possible:
H (high voltage) = 0 L (low voltage) = 1
Depending on convention, same gate may denote different
Boolean function.
-
8/7/2019 Logic Gates NAND NOR
36/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 36
Positive & Negative Logic
A signal that is set to logic 1 is said to be asserted, or active,or true.
A signal that is set to logic 0 is said to be deasserted, ornegated, or false.
Active-high signal names are usually written inuncomplemented form.
Active-low signal names are usually written in complementedform.
-
8/7/2019 Logic Gates NAND NOR
37/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 37
Positive & Negative Logic
Positive logic:
EnableActive High:0: Disabled
1: Enabled
Negative logic:
Enable
Active Low:
0: Enabled1: Disabled
d C l
-
8/7/2019 Logic Gates NAND NOR
38/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 38
Integrated Circuit Logic Families
Some digital integrated circuit families: TTL, CMOS, ECL.
TTL: Transistor-Transistor Logic.
Uses bipolar junction transistors
Consists of a series of logic circuits: standard TTL, low-powerTTL, Schottky TTL, low-power Schottky TTL, advancedSchottky TTL, etc.
I d Ci i L i F ili
-
8/7/2019 Logic Gates NAND NOR
39/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 39
Integrated Circuit Logic Families
TTL Series Prefix Designation Example of Device
Standard TTL 54 or 74 7400 (quad NAND gates)
Low-power TTL 54L or 74L 74L00 (quad NAND gates)
Schottky TTL 54S or 74S 74S00 (quad NAND gates)Low-powerSchottky TTL
54LS or 74LS 74LS00 (quad NAND gates)
I d Ci i L i F ili
-
8/7/2019 Logic Gates NAND NOR
40/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 40
Integrated Circuit Logic Families
CMOS: Complementary Metal-Oxide Semiconductor.
Uses field-effect transistors ECL: Emitter Coupled Logic.
Uses bipolar circuit technology.
Has fastest switching speed but high power consumption.
I d Ci i L i F ili
-
8/7/2019 Logic Gates NAND NOR
41/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 41
Integrated Circuit Logic Families
Performance characteristics
Propagation delay time.
Power dissipation.
Fan-out: Fan-out of a gate is the maximum number of inputsthat the gate can drive.
Speed-power product (SPP): product of the propagationdelay time and the power dissipation.
S
-
8/7/2019 Logic Gates NAND NOR
42/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 42
Summary
Logic Gates
AND,
OR,
NOT
NAND
NOR
Drawing Logic
Circuit
Analysing
Logic Circuit
Given a Boolean
expression, draw the
circuit.
Given a circuit, find
the function.
Implementation of a
Boolean expressionusing these
Universal gates.
Implementation
of SOP and POS
Expressions
Positive and
Negative Logic
Concept of Minterm
and Maxterm
-
8/7/2019 Logic Gates NAND NOR
43/43
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 43
End of file