Sei sulla pagina 1di 43

Digital Electronics

Topic 2:
Logic Gates

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 1
ƒ 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

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 2
ƒ 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

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 3
Logic Gates
ƒ Gate Symbols Symbol set 1 Symbol set 2
(ANSI/IEEE Standard 91-1984)
a a
AND a.b & a.b
b b

a a
OR a+b ≥1 a+b
b b

NOT a a' a 1 a'

a a
(a.b)' & (a.b)'
NAND b b

a a
NOR (a+b)' ≥1 (a+b)'
b b

a a
EXCLUSIVE OR a⊕b =1 a⊕b
b b

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 4
Logic Gates: The Inverter
ƒ The Inverter
A A'
A A' A A' 0 1
1 0
ƒ Application of the inverter: complement.
Binary number
1 1 0 1 0 0 0 1

0 0 1 0 1 1 1 0
1’s Complement
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 5
Logic Gates: The AND Gate

ƒ The AND Gate

A A &
A.B A.B
B B

A B A.B
0 0 0
0 1 0
1 0 0
1 1 1

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 6
Logic Gates: The AND Gate
ƒ Application of the AND Gate

1 sec

A A
Counter
Enable
Enable
1 sec
Register,
Reset to zero decode
between and
frequency
Enable pulses
display

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 7
Logic Gates: The OR Gate

ƒ The OR Gate

A A ≥1
A+B A+B
B B

A B A+B
0 0 0
0 1 1
1 0 1
1 1 1

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 8
Logic Gates: The NAND Gate

ƒ The NAND Gate


A
(A.B)' ≡ A
(A.B)'
A &
(A.B)'
B B B

A B (A.B)'
0 0 1
0 1 1 ≡
1 0 1
1 1 0 NAND Negative-OR

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 9
Logic Gates: The NOR Gate

ƒ The NOR Gate


A
B
(A+B)' ≡ A
(A+B)'
A
B
≥1
(A+B)'
B

A B (A+B)'
0 0 1
0 1 0 ≡
1 0 0
1 1 0 NOR Negative-AND

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 10
Logic Gates: The XOR Gate

ƒ The XOR Gate

A A =1
A⊕B A⊕B
B B

A B A⊕B
0 0 0
0 1 1
1 0 1
1 1 0

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 11
Logic Gates: The XNOR Gate

ƒ The XNOR Gate

A A =1
(A ⊕ B)' (A ⊕ B)'
B B

A B (A ⊕ B) '
0 0 1
0 1 0
1 0 0
1 1 1

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 12
Drawing Logic Circuit
ƒ When a Boolean expression is provided, we can easily draw
the logic circuit.
ƒ Examples:
(i) F1 = xyz' (note the use of a 3-input AND gate)

x
y F1

z z'

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 13
Drawing Logic Circuit
(ii) F2 = x + y'z (can assume that variables and their
complements are available)

x
F2
y'
z y'z

(iii) F3 = xy' + x'z


x xy'
y'
F3
x'
z x'z

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 14
Analysing Logic Circuit

ƒ When a logic circuit is provided, we can analyse the circuit to


obtain the logic expression.
ƒ Example: What is the Boolean expression of F4?

A' A'B'
B' A'B'+C (A'B'+C)'
F4
C

F4 = (A'B'+C)' = (A+B).C'

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 15
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)

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 16
Propagation Delay

Input Output

H
Input
L

H
Output
L

tPHL tPLH

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 17
Propagation Delay

A B C

ƒ Ideally, no ƒ In reality, output signals


normally lag behind input
delay:
signals:
1 1
Signal for A Signal for A
0 0

1 1
0 Signal for B 0 Signal for B

1 1
Signal for C Signal for C
0 0
time time
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 18
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 the
output(s).
= earliest time for output signal(s) to stabilise, given that input
signals are stable at time 0.

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 19
Calculation of Circuit Delays

ƒ In general, given a logic gate with delay, t.


t1
t2 Logic
: : Gate
tn max (t1, t2, ..., tn ) + t

If inputs are stable at times t1,t2,..,tn, respectively; then the


earliest time in which the output will be stable is:
max(t1, t2, .., tn) + t

ƒ To calculate the delays of all outputs of a combinational


circuit, repeat above rule for all gates.

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 20
Calculation of Circuit Delays

ƒ As a simple example, consider the full adder circuit where all


inputs are available at time 0. (Assume each gate has delay
t.)

X 0 max(0,0)+t = t
max(t,0)+t = 2t
Y 0 S

t 2t max(t,2t)+t = 3t
C
0
Z

where outputs S and C, experience delays


of 2t and 3t, respectively.

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 21
Universal Gates: NAND and NOR
ƒ AND/OR/NOT gates are sufficient for building any Boolean
functions.
ƒ 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)

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 22
NAND Gate

ƒ NAND gate is self-sufficient (can build any logic circuit with


it).
ƒ 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)

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 23
NAND Gate
ƒ Implementing AND using NAND gates:
(x.y)'
x
x.y
y
((xy)'(xy)')' = ((xy)')' idempotency
= (xy) involution

ƒ Implementing OR using NAND gates:


x'
x ((xx)'(yy)')' = (x'y')' idempotency
x+y = x''+y'' DeMorgan
= x+y involution
y
y'

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 24
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)

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 25
NOR Gate
ƒ Implementing AND using NOR gates:
x'
x
x.y
((x+x)'+(y+y)')'=(x'+y')' idempotency
y
y' = x''.y'' DeMorgan
= x.y involution

ƒ Implementing OR using NOR gates:


(x+y)'
x
x+y
y
((x+y)'+(x+y)')' = ((x+y)')' idempotency
= (x+y) involution

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 26
Implementation using NAND gates
ƒ Possible to implement any Boolean expression using NAND
gates.
Procedure:
(i) Obtain sum-of-products Boolean expression:
e.g. F3 = xy'+x'z
(ii) Use DeMorgan theorem to obtain expression
using 2-level NAND gates
e.g. F3 = xy'+x'z
= (xy'+x'z)' ' involution
= ((xy')' . (x'z)')' DeMorgan

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 27
Implementation using NAND gates

x (xy')'
y'
F3
x'
z (x'z)'

F3 = ((xy')'.(x'z)') ' = xy' + x'z

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 28
Implementation using NOR gates
ƒ Possible to implement any Boolean expression using NOR
gates.
Procedure:
(i) Obtain product-of-sums Boolean expression:
e.g. F6 = (x+y').(x'+z)
(ii) Use DeMorgan theorem to obtain expression
using 2-level NOR gates.
e.g. F6 = (x+y').(x'+z)
= ((x+y').(x'+z))' ' involution
= ((x+y')'+(x'+z)')' DeMorgan

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 29
Implementation using NOR gates

x (x+y')'
y'
F6
x'
z (x'+z)'

F6 = ((x+y')'+(x'+z)')' = (x+y').(x'+z)

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 30
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

A
B
F = AB + CD + E
C
F
D

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 31
Implementation of SOP Expressions
ƒ NAND-NAND circuit (by circuit A
transformation) B
a) add double bubbles C
F
b) change OR-with- D

inverted-inputs to NAND E
& bubbles at inputs to
their complements
A
B
C
F
D

E'

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 32
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

A
B
G = (A+B).(C+D).E
C
G
D

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 33
Implementation of POS Expressions

ƒ NOR-NOR circuit (by circuit A


transformation): B
a) add double bubbles C
G
D
b) changed AND-with-
inverted-inputs to NOR E
& bubbles at inputs to
their complements
A
B
C
G
D

E'

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 34
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.

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 35
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, or
negated, or false.
ƒ Active-high signal names are usually written in
uncomplemented form.
ƒ Active-low signal names are usually written in complemented
form.

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 36
Positive & Negative Logic
Positive logic:

Active High:
Enable 0: Disabled
1: Enabled

Negative logic:

Active Low:
Enable 0: Enabled
1: Disabled

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 37
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-power
TTL, Schottky TTL, low-power Schottky TTL, advanced
Schottky TTL, etc.

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 38
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-power 54LS or 74LS 74LS00 (quad NAND gates)


Schottky TTL

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 39
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.

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 40
Integrated Circuit Logic Families

ƒ Performance characteristics
™ Propagation delay time.
™ Power dissipation.
™ Fan-out: Fan-out of a gate is the maximum number of inputs
that the gate can drive.
™ Speed-power product (SPP): product of the propagation
delay time and the power dissipation.

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 41
Summary
Logic Gates Drawing Logic Analysing
Circuit Logic Circuit

AND, NAND Given a Boolean Given a circuit, find


OR, expression, draw the the function.
NOT NOR circuit.

Implementation Positive and


Implementation of a of SOP and POS Negative Logic
Boolean expression Expressions
using these
Universal gates. Concept of Minterm
and Maxterm
FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 42
End of file

FLB 20203
DIGITAL SYSTEMS Introduction to Logic Gates 43

Potrebbero piacerti anche