SlideShare una empresa de Scribd logo
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

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Layouts
LayoutsLayouts
Layouts
 
Unit v. HDL Synthesis Process
Unit v. HDL Synthesis ProcessUnit v. HDL Synthesis Process
Unit v. HDL Synthesis Process
 
Stick Diagram
Stick DiagramStick Diagram
Stick Diagram
 
BCH Codes
BCH CodesBCH Codes
BCH Codes
 
Rc delay modelling in vlsi
Rc delay modelling in vlsiRc delay modelling in vlsi
Rc delay modelling in vlsi
 
Turbo codes.ppt
Turbo codes.pptTurbo codes.ppt
Turbo codes.ppt
 
single stage amplifier Unit 5 AMVLSI
single stage amplifier Unit 5 AMVLSIsingle stage amplifier Unit 5 AMVLSI
single stage amplifier Unit 5 AMVLSI
 
Verilog HDL
Verilog HDLVerilog HDL
Verilog HDL
 
Verilog data types -For beginners
Verilog data types -For beginnersVerilog data types -For beginners
Verilog data types -For beginners
 
CMOS Logic
CMOS LogicCMOS Logic
CMOS Logic
 
Coding verilog
Coding verilogCoding verilog
Coding verilog
 
MOS as Diode, Switch and Active Resistor
MOS as Diode, Switch and Active ResistorMOS as Diode, Switch and Active Resistor
MOS as Diode, Switch and Active Resistor
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
 
Crash course in verilog
Crash course in verilogCrash course in verilog
Crash course in verilog
 
Verilog hdl
Verilog hdlVerilog hdl
Verilog hdl
 
SRAM
SRAMSRAM
SRAM
 
MOS transistor 13
MOS transistor 13MOS transistor 13
MOS transistor 13
 
Mos transistor
Mos transistorMos transistor
Mos transistor
 
CMOS TG
CMOS TGCMOS TG
CMOS TG
 
Verilog full adder in dataflow & gate level modelling style.
Verilog full adder in dataflow  & gate level modelling style.Verilog full adder in dataflow  & gate level modelling style.
Verilog full adder in dataflow & gate level modelling style.
 

Similar a 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
 

Similar a 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
 

Último

The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
heathfieldcps1
 
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
 
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
 

Último (20)

The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...The impact of social media on mental health and well-being has been a topic o...
The impact of social media on mental health and well-being has been a topic o...
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
 
The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Advances in production technology of Grapes.pdf
Advances in production technology of Grapes.pdfAdvances in production technology of Grapes.pdf
Advances in production technology of Grapes.pdf
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
NCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdfNCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdf
 
How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17How to Manage Notification Preferences in the Odoo 17
How to Manage Notification Preferences in the Odoo 17
 
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
 
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
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdfTelling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
Telling Your Story_ Simple Steps to Build Your Nonprofit's Brand Webinar.pdf
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
B.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdfB.ed spl. HI pdusu exam paper-2023-24.pdf
B.ed spl. HI pdusu exam paper-2023-24.pdf
 
Morse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptxMorse OER Some Benefits and Challenges.pptx
Morse OER Some Benefits and Challenges.pptx
 

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