SlideShare une entreprise Scribd logo
1  sur  43
Computer & Network
Technology

Chamila Fernando
02/03/14

Information Representation

BSc(Eng) Hons,MBA,MIEEE
1
Lecture 5:
Logic Gates and Circuits
 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
02/03/14

Logic Gates

2
Lecture 4:
Logic Gates and Circuits
 Universal Gates: NAND and NOR
 NAND Gate
 NOR Gate







02/03/14

Implementation using NAND Gates
Implementation using NOR Gates
Implementation of SOP Expressions
Implementation of POS Expressions
Positive and Negative Logic
Integrated Circuit Logic Families
Logic Gates

3
Logic Gates
 Gate Symbols
AND
OR

NOT

a
b
a
b
a
a

NAND
NOR
EXCLUSIVE OR
02/03/14

Symbol set 2

Symbol set 1

b
a
b
a
b
Logic Gates

a.b

a+b

a'

(a.b)'

(a+b)'

a⊕ b

(ANSI/IEEE Standard 91-1984)
a
&
a.b
b
a
b
a
a
b
a
b
a
b

≥1

a+b

1

a'

&

(a.b)'

≥1

(a+b)'

=1

a⊕b

4
Logic Gates: The Inverter
 The Inverter

A A'

A

A'

A

0
1

A'

1
0

 Application of the inverter: complement.
1

1

Binary number
0
1
0
0

0

0

1

0

1

1

0

1

1

0

1’s Complement
02/03/14

Logic Gates

5
Logic Gates: The AND Gate
 The AND Gate
A

A.B

B

A
0
0
1
1

02/03/14

B
0
1
0
1

A
B

&

A.B

A.B
0
0
0
1

Logic Gates

6
Logic Gates: The AND Gate
 Application of the AND Gate
1 sec

A

A
Enable

Counter

Enable
1 sec

Reset to zero
between
Enable pulses

02/03/14

Logic Gates

Register,
decode
and
frequency
display

7
Logic Gates: The OR Gate
 The OR Gate
A

A+B

B

A
0
0
1
1

02/03/14

B
0
1
0
1

A
B

≥
1

A+B

A+B
0
1
1
1

Logic Gates

8
Logic Gates: The NAND Gate
 The NAND Gate
A

(A.B)'

B

A
0
0
1
1

02/03/14

B
0
1
0
1

≡

A

(A.B)'

B

(A.B)'
1
1
1
0

A
B

&

(A.B)'

≡
NAND

Logic Gates

Negative-OR

9
Logic Gates: The NOR Gate
 The NOR Gate
A

(A+B)'

B

A
0
0
1
1

02/03/14

B
0
1
0
1

≡

A

(A+B)'

B

(A+B)'
1
0
0
0

A
B

≥
1

(A+B)'

≡
NOR

Logic Gates

Negative-AND

10
Logic Gates: The XOR Gate
 The XOR Gate
A

A⊕B

B

A
0
0
1
1

02/03/14

B
0
1
0
1

A
B

=1

A⊕B

A ⊕B
0
1
1
0

Logic Gates

11
Logic Gates: The XNOR Gate
 The XNOR Gate
A

(A ⊕ B)'

B

A
0
0
1
1

02/03/14

A
B

=1

(A ⊕ B)'

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

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
z

02/03/14

F1
z'

Logic Gates

13
Drawing Logic Circuit
(ii) F2 = x + y'z (can assume that variables and their
complements are available)
x

F2

y'
z

(iii) F3 = xy' + x'z

y'z

x
y'

xy'
F3

x'
z

02/03/14

Logic Gates

x'z

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

C

(A'B'+C)'

F4

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

02/03/14

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.
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
02/03/14

(average propagation delay)
Logic Gates

17
Propagation Delay
Input

Output

H

Input
L

Output

H
L
tPHL

02/03/14

Logic Gates

tPLH

18
Propagation Delay
A

B

C

 In reality, output signals

 Ideally, no

normally lag behind
input signals:

delay:
1
0

1

Signal for A

0

1
0
1
0

1

Signal for B

0
1

Signal for C

0

time
02/03/14

Signal for A

Signal for B
Signal for C
time

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 the
output(s).
= earliest time for output signal(s) to stabilise, given that input
signals are stable at time 0.
02/03/14

Logic Gates

20
Calculation of Circuit Delays
 In general, given a logic gate with delay, t.
t1
t2
:
tn

:

Logic
Gate
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.
02/03/14

Logic Gates

21
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
Y

0
0

max(0,0)+t = t

max(t,0)+t = 2t

S
t

2t

max(t,2t)+t = 3t

C
Z

0

where outputs S and C, experience delays
of 2t and 3t, respectively.
02/03/14

Logic Gates

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

02/03/14

Logic Gates

24
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'

02/03/14

x'

(T1: idempotency)

Logic Gates

25
NAND Gate
 Implementing AND using NAND gates:
x
y

(x.y)'
x.y
((xy)'(xy)')' = ((xy)')' idempotency
= (xy)
involution

 Implementing OR using NAND gates:
x

y

02/03/14

x'

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

y'

Logic Gates

26
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'

02/03/14

x'

(T1: idempotency)

Logic Gates

27
NOR Gate
 Implementing AND using NOR gates:
x'

x

y

y'

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

idempotency
DeMorgan
involution

 Implementing OR using NOR gates:
x
y

02/03/14

(x+y)'
x+y
((x+y)'+(x+y)')' = ((x+y)')'
= (x+y)

Logic Gates

idempotency
involution

28
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
02/03/14

Logic Gates

29
Implementation using NAND gates
x
y'

(xy')'

x'
z

(x'z)'

F3

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

02/03/14

Logic Gates

30
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
02/03/14

Logic Gates

31
Implementation using NOR gates
x
y'

(x+y')'

x'
z

(x'+z)'

F6

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

02/03/14

Logic Gates

32
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
D

F

E

02/03/14

Logic Gates

33
Implementation of SOP Expressions
 NAND-NAND circuit (by
circuit transformation)

a) add double bubbles
b) change OR-withinverted-inputs to NAND
& bubbles at inputs to
their complements

A
B
C
D

F

E

A
B
C
D

F

E'

02/03/14

Logic Gates

34
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
D

G

E

02/03/14

Logic Gates

35
Implementation of POS Expressions
 NOR-NOR circuit (by circuit
transformation):

A
B

a) add double bubbles
b) changed AND-withinverted-inputs to NOR
& bubbles at inputs to
their complements

C
D

G

E

A
B
C
D

G

E'

02/03/14

Logic Gates

36
Positive & Negative Logic
 In logic gates, usually:
 H (high voltage, 5V) = 1
 L (low voltage, 0V) = 0

 This convention – positive logic.
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.

02/03/14

Logic Gates

38
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.

02/03/14

Logic Gates

39
Positive & Negative Logic
Positive logic:
Enable

Active High:
0: Disabled
1: Enabled

Negative logic:
Enable

02/03/14

Logic Gates

Active Low:
0: Enabled
1: Disabled

40
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.

02/03/14

Logic Gates

41
Integrated Circuit Logic Families
TTL Series
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
Schottky TTL

02/03/14

Prefix Designation Example of Device

54LS or 74LS

74LS00 (quad NAND gates)

Logic Gates

42
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.

02/03/14

Logic Gates

43
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.

02/03/14

Logic Gates

44
Summary
Logic Gates

AND,
OR,
NOT

NAND
NOR

Implementation of a
Boolean expression
using these
Universal gates.

02/03/14

Drawing Logic
Circuit

Analysing
Logic Circuit

Given a Boolean
expression, draw the
circuit.

Given a circuit, find
the function.

Implementation
of SOP and POS
Expressions

Positive and
Negative Logic

Concept of Minterm
and Maxterm
Logic Gates

45
End of file

02/03/14

Logic Gates

46

Contenu connexe

Tendances

Adder substracter
Adder substracterAdder substracter
Adder substracter
WanNurdiana
 

Tendances (20)

J - K & MASTERSLAVE FLIPFLOPS
J - K & MASTERSLAVE FLIPFLOPSJ - K & MASTERSLAVE FLIPFLOPS
J - K & MASTERSLAVE FLIPFLOPS
 
Octal to binary encoder
Octal to binary encoderOctal to binary encoder
Octal to binary encoder
 
Adder substracter
Adder substracterAdder substracter
Adder substracter
 
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
Logic gates - AND, OR, NOT, NOR, NAND, XOR, XNOR Gates.
 
Logic gates
Logic gatesLogic gates
Logic gates
 
BCD ADDER
BCD ADDER BCD ADDER
BCD ADDER
 
Carry look ahead adder
Carry look ahead adderCarry look ahead adder
Carry look ahead adder
 
Design of Accumulator Unit
Design of Accumulator UnitDesign of Accumulator Unit
Design of Accumulator Unit
 
Universal Gates - Aneesa N Ali
Universal Gates - Aneesa N AliUniversal Gates - Aneesa N Ali
Universal Gates - Aneesa N Ali
 
DELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counterDELD Unit IV ring and twisted ring counter
DELD Unit IV ring and twisted ring counter
 
Verilog hdl
Verilog hdlVerilog hdl
Verilog hdl
 
Johnson counter
Johnson counterJohnson counter
Johnson counter
 
555 Timer (detailed presentation)
555 Timer (detailed presentation)555 Timer (detailed presentation)
555 Timer (detailed presentation)
 
Logic gates ppt
Logic gates pptLogic gates ppt
Logic gates ppt
 
Dlc{binary to gray code conversion} ppt
Dlc{binary to gray code conversion} pptDlc{binary to gray code conversion} ppt
Dlc{binary to gray code conversion} ppt
 
Nand and nor as a universal gates
Nand and nor as a universal gatesNand and nor as a universal gates
Nand and nor as a universal gates
 
Counters
CountersCounters
Counters
 
Encoder and decoder
Encoder and decoderEncoder and decoder
Encoder and decoder
 
Synchronous sequential Circuits
Synchronous sequential CircuitsSynchronous sequential Circuits
Synchronous sequential Circuits
 
Universal logic gate
Universal logic gateUniversal logic gate
Universal logic gate
 

Similaire à Lecture 5

Hardware combinational
Hardware combinationalHardware combinational
Hardware combinational
Defri Tan
 
The logic gate circuit
The logic gate circuitThe logic gate circuit
The logic gate circuit
roni Febriandi
 
Logic Design - Chapter 5: Part1 Combinattional Logic
Logic Design - Chapter 5: Part1 Combinattional LogicLogic Design - Chapter 5: Part1 Combinattional Logic
Logic Design - Chapter 5: Part1 Combinattional Logic
Gouda Mando
 
04 Unit IV DTE.pptx
04 Unit IV DTE.pptx04 Unit IV DTE.pptx
04 Unit IV DTE.pptx
Harsheye
 

Similaire à Lecture 5 (20)

Logic gates
Logic gatesLogic gates
Logic gates
 
e CAD lab manual
e CAD lab manuale CAD lab manual
e CAD lab manual
 
VLSI & E-CAD Lab Manual
VLSI & E-CAD Lab ManualVLSI & E-CAD Lab Manual
VLSI & E-CAD Lab Manual
 
12.Digital Logic.pdf
12.Digital Logic.pdf12.Digital Logic.pdf
12.Digital Logic.pdf
 
ECAD lab manual
ECAD lab manualECAD lab manual
ECAD lab manual
 
Logic Gates & Family.pdf
Logic Gates & Family.pdfLogic Gates & Family.pdf
Logic Gates & Family.pdf
 
Deld lab manual
Deld lab manualDeld lab manual
Deld lab manual
 
Digital Logic circuit
Digital Logic circuitDigital Logic circuit
Digital Logic circuit
 
Pdc 2 mark
Pdc   2 markPdc   2 mark
Pdc 2 mark
 
Practical file
Practical filePractical file
Practical file
 
Hardware combinational
Hardware combinationalHardware combinational
Hardware combinational
 
Nand or gates ver_student
Nand or gates ver_studentNand or gates ver_student
Nand or gates ver_student
 
Programmable Logic Array(PLA), digital circuits
Programmable Logic Array(PLA), digital circuits Programmable Logic Array(PLA), digital circuits
Programmable Logic Array(PLA), digital circuits
 
The logic gate circuit
The logic gate circuitThe logic gate circuit
The logic gate circuit
 
Logic gate tester for IC's ( Digital Electronics and Logic deisgn EE3114 )
Logic gate tester for IC's ( Digital Electronics and Logic deisgn EE3114 )Logic gate tester for IC's ( Digital Electronics and Logic deisgn EE3114 )
Logic gate tester for IC's ( Digital Electronics and Logic deisgn EE3114 )
 
Logic Design - Chapter 5: Part1 Combinattional Logic
Logic Design - Chapter 5: Part1 Combinattional LogicLogic Design - Chapter 5: Part1 Combinattional Logic
Logic Design - Chapter 5: Part1 Combinattional Logic
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Digital Electronics
Digital ElectronicsDigital Electronics
Digital Electronics
 
04 Unit IV DTE.pptx
04 Unit IV DTE.pptx04 Unit IV DTE.pptx
04 Unit IV DTE.pptx
 
2th year iv sem de lab manual
2th year iv sem de lab manual2th year iv sem de lab manual
2th year iv sem de lab manual
 

Dernier

IATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdffIATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdff
17thcssbs2
 
ppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyes
ashishpaul799
 
Neurulation and the formation of the neural tube
Neurulation and the formation of the neural tubeNeurulation and the formation of the neural tube
Neurulation and the formation of the neural tube
SaadHumayun7
 
Liberal & Redical Feminism presentation.pptx
Liberal & Redical Feminism presentation.pptxLiberal & Redical Feminism presentation.pptx
Liberal & Redical Feminism presentation.pptx
Rizwan Abbas
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
中 央社
 

Dernier (20)

Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
 
“O BEIJO” EM ARTE .
“O BEIJO” EM ARTE                       .“O BEIJO” EM ARTE                       .
“O BEIJO” EM ARTE .
 
Application of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matricesApplication of Matrices in real life. Presentation on application of matrices
Application of Matrices in real life. Presentation on application of matrices
 
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & EngineeringBasic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
Basic Civil Engg Notes_Chapter-6_Environment Pollution & Engineering
 
MichaelStarkes_UncutGemsProjectSummary.pdf
MichaelStarkes_UncutGemsProjectSummary.pdfMichaelStarkes_UncutGemsProjectSummary.pdf
MichaelStarkes_UncutGemsProjectSummary.pdf
 
IATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdffIATP How-to Foreign Travel May 2024.pdff
IATP How-to Foreign Travel May 2024.pdff
 
ppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyesppt your views.ppt your views of your college in your eyes
ppt your views.ppt your views of your college in your eyes
 
Neurulation and the formation of the neural tube
Neurulation and the formation of the neural tubeNeurulation and the formation of the neural tube
Neurulation and the formation of the neural tube
 
Open Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPointOpen Educational Resources Primer PowerPoint
Open Educational Resources Primer PowerPoint
 
Liberal & Redical Feminism presentation.pptx
Liberal & Redical Feminism presentation.pptxLiberal & Redical Feminism presentation.pptx
Liberal & Redical Feminism presentation.pptx
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
 
Keeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security ServicesKeeping Your Information Safe with Centralized Security Services
Keeping Your Information Safe with Centralized Security Services
 
size separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceuticssize separation d pharm 1st year pharmaceutics
size separation d pharm 1st year pharmaceutics
 
Salient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptxSalient features of Environment protection Act 1986.pptx
Salient features of Environment protection Act 1986.pptx
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024
 
The Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. HenryThe Last Leaf, a short story by O. Henry
The Last Leaf, a short story by O. Henry
 

Lecture 5

  • 1. Computer & Network Technology Chamila Fernando 02/03/14 Information Representation BSc(Eng) Hons,MBA,MIEEE 1
  • 2. Lecture 5: Logic Gates and Circuits  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 02/03/14 Logic Gates 2
  • 3. Lecture 4: Logic Gates and Circuits  Universal Gates: NAND and NOR  NAND Gate  NOR Gate       02/03/14 Implementation using NAND Gates Implementation using NOR Gates Implementation of SOP Expressions Implementation of POS Expressions Positive and Negative Logic Integrated Circuit Logic Families Logic Gates 3
  • 4. Logic Gates  Gate Symbols AND OR NOT a b a b a a NAND NOR EXCLUSIVE OR 02/03/14 Symbol set 2 Symbol set 1 b a b a b Logic Gates a.b a+b a' (a.b)' (a+b)' a⊕ b (ANSI/IEEE Standard 91-1984) a & a.b b a b a a b a b a b ≥1 a+b 1 a' & (a.b)' ≥1 (a+b)' =1 a⊕b 4
  • 5. Logic Gates: The Inverter  The Inverter A A' A A' A 0 1 A' 1 0  Application of the inverter: complement. 1 1 Binary number 0 1 0 0 0 0 1 0 1 1 0 1 1 0 1’s Complement 02/03/14 Logic Gates 5
  • 6. Logic Gates: The AND Gate  The AND Gate A A.B B A 0 0 1 1 02/03/14 B 0 1 0 1 A B & A.B A.B 0 0 0 1 Logic Gates 6
  • 7. Logic Gates: The AND Gate  Application of the AND Gate 1 sec A A Enable Counter Enable 1 sec Reset to zero between Enable pulses 02/03/14 Logic Gates Register, decode and frequency display 7
  • 8. Logic Gates: The OR Gate  The OR Gate A A+B B A 0 0 1 1 02/03/14 B 0 1 0 1 A B ≥ 1 A+B A+B 0 1 1 1 Logic Gates 8
  • 9. Logic Gates: The NAND Gate  The NAND Gate A (A.B)' B A 0 0 1 1 02/03/14 B 0 1 0 1 ≡ A (A.B)' B (A.B)' 1 1 1 0 A B & (A.B)' ≡ NAND Logic Gates Negative-OR 9
  • 10. Logic Gates: The NOR Gate  The NOR Gate A (A+B)' B A 0 0 1 1 02/03/14 B 0 1 0 1 ≡ A (A+B)' B (A+B)' 1 0 0 0 A B ≥ 1 (A+B)' ≡ NOR Logic Gates Negative-AND 10
  • 11. Logic Gates: The XOR Gate  The XOR Gate A A⊕B B A 0 0 1 1 02/03/14 B 0 1 0 1 A B =1 A⊕B A ⊕B 0 1 1 0 Logic Gates 11
  • 12. Logic Gates: The XNOR Gate  The XNOR Gate A (A ⊕ B)' B A 0 0 1 1 02/03/14 A B =1 (A ⊕ B)' B (A ⊕ B) ' 0 1 1 0 0 0 1 1 Logic Gates 12
  • 13. 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 z 02/03/14 F1 z' Logic Gates 13
  • 14. Drawing Logic Circuit (ii) F2 = x + y'z (can assume that variables and their complements are available) x F2 y' z (iii) F3 = xy' + x'z y'z x y' xy' F3 x' z 02/03/14 Logic Gates x'z 14
  • 15. 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 C (A'B'+C)' F4 F4 = (A'B'+C)' = (A+B).C' 02/03/14 Logic Gates 16
  • 16. Propagation Delay  Every logic gate experiences some delay (though very small) in propagating signals forward.  This delay is called Gate (Propagation) Delay. 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 02/03/14 (average propagation delay) Logic Gates 17
  • 18. Propagation Delay A B C  In reality, output signals  Ideally, no normally lag behind input signals: delay: 1 0 1 Signal for A 0 1 0 1 0 1 Signal for B 0 1 Signal for C 0 time 02/03/14 Signal for A Signal for B Signal for C time Logic Gates 19
  • 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 the output(s). = earliest time for output signal(s) to stabilise, given that input signals are stable at time 0. 02/03/14 Logic Gates 20
  • 20. Calculation of Circuit Delays  In general, given a logic gate with delay, t. t1 t2 : tn : Logic Gate 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. 02/03/14 Logic Gates 21
  • 21. 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 Y 0 0 max(0,0)+t = t max(t,0)+t = 2t S t 2t max(t,2t)+t = 3t C Z 0 where outputs S and C, experience delays of 2t and 3t, respectively. 02/03/14 Logic Gates 22
  • 22. 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) 02/03/14 Logic Gates 24
  • 23. 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' 02/03/14 x' (T1: idempotency) Logic Gates 25
  • 24. NAND Gate  Implementing AND using NAND gates: x y (x.y)' x.y ((xy)'(xy)')' = ((xy)')' idempotency = (xy) involution  Implementing OR using NAND gates: x y 02/03/14 x' ((xx)'(yy)')' = (x'y')' idempotency = x''+y'' DeMorgan x+y = x+y involution y' Logic Gates 26
  • 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' 02/03/14 x' (T1: idempotency) Logic Gates 27
  • 26. NOR Gate  Implementing AND using NOR gates: x' x y y' x.y ((x+x)'+(y+y)')'=(x'+y')' = x''.y'' = x.y idempotency DeMorgan involution  Implementing OR using NOR gates: x y 02/03/14 (x+y)' x+y ((x+y)'+(x+y)')' = ((x+y)')' = (x+y) Logic Gates idempotency involution 28
  • 27. 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 02/03/14 Logic Gates 29
  • 28. Implementation using NAND gates x y' (xy')' x' z (x'z)' F3 F3 = ((xy')'.(x'z)') ' = xy' + x'z 02/03/14 Logic Gates 30
  • 29. 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 02/03/14 Logic Gates 31
  • 30. Implementation using NOR gates x y' (x+y')' x' z (x'+z)' F6 F6 = ((x+y')'+(x'+z)')' = (x+y').(x'+z) 02/03/14 Logic Gates 32
  • 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 A B F = AB + CD + E C D F E 02/03/14 Logic Gates 33
  • 32. Implementation of SOP Expressions  NAND-NAND circuit (by circuit transformation) a) add double bubbles b) change OR-withinverted-inputs to NAND & bubbles at inputs to their complements A B C D F E A B C D F E' 02/03/14 Logic Gates 34
  • 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 A B G = (A+B).(C+D).E C D G E 02/03/14 Logic Gates 35
  • 34. Implementation of POS Expressions  NOR-NOR circuit (by circuit transformation): A B a) add double bubbles b) changed AND-withinverted-inputs to NOR & bubbles at inputs to their complements C D G E A B C D G E' 02/03/14 Logic Gates 36
  • 35. Positive & Negative Logic  In logic gates, usually:  H (high voltage, 5V) = 1  L (low voltage, 0V) = 0  This convention – positive logic. 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. 02/03/14 Logic Gates 38
  • 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, or negated, or false.  Active-high signal names are usually written in uncomplemented form.  Active-low signal names are usually written in complemented form. 02/03/14 Logic Gates 39
  • 37. Positive & Negative Logic Positive logic: Enable Active High: 0: Disabled 1: Enabled Negative logic: Enable 02/03/14 Logic Gates Active Low: 0: Enabled 1: Disabled 40
  • 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- power TTL, Schottky TTL, low-power Schottky TTL, advanced Schottky TTL, etc. 02/03/14 Logic Gates 41
  • 39. Integrated Circuit Logic Families TTL Series 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 Schottky TTL 02/03/14 Prefix Designation Example of Device 54LS or 74LS 74LS00 (quad NAND gates) Logic Gates 42
  • 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. 02/03/14 Logic Gates 43
  • 41. 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. 02/03/14 Logic Gates 44
  • 42. Summary Logic Gates AND, OR, NOT NAND NOR Implementation of a Boolean expression using these Universal gates. 02/03/14 Drawing Logic Circuit Analysing Logic Circuit Given a Boolean expression, draw the circuit. Given a circuit, find the function. Implementation of SOP and POS Expressions Positive and Negative Logic Concept of Minterm and Maxterm Logic Gates 45