SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot (20)

digital logic_families
digital logic_familiesdigital logic_families
digital logic_families
 
Shift Registers
Shift RegistersShift Registers
Shift Registers
 
Combinational Logic
Combinational LogicCombinational Logic
Combinational Logic
 
Linear block coding
Linear block codingLinear block coding
Linear block coding
 
Convolutional codes
Convolutional codesConvolutional codes
Convolutional codes
 
IC fmaillies.ppt
IC fmaillies.pptIC fmaillies.ppt
IC fmaillies.ppt
 
Multiplexers & Demultiplexers
Multiplexers & DemultiplexersMultiplexers & Demultiplexers
Multiplexers & Demultiplexers
 
Digital communications 1
Digital communications 1Digital communications 1
Digital communications 1
 
Contamination delay
Contamination delayContamination delay
Contamination delay
 
Verilog operators.pptx
Verilog  operators.pptxVerilog  operators.pptx
Verilog operators.pptx
 
FYBSC IT Digital Electronics Unit V Chapter I Counters
FYBSC IT Digital Electronics Unit V Chapter I CountersFYBSC IT Digital Electronics Unit V Chapter I Counters
FYBSC IT Digital Electronics Unit V Chapter I Counters
 
Counters
CountersCounters
Counters
 
Registers-shift register
Registers-shift registerRegisters-shift register
Registers-shift register
 
ASk,FSK,PSK
ASk,FSK,PSKASk,FSK,PSK
ASk,FSK,PSK
 
CMOS Topic 5 -_cmos_inverter
CMOS Topic 5 -_cmos_inverterCMOS Topic 5 -_cmos_inverter
CMOS Topic 5 -_cmos_inverter
 
14827 shift registers
14827 shift registers14827 shift registers
14827 shift registers
 
Flip flop
Flip flopFlip flop
Flip flop
 
Arbiters
ArbitersArbiters
Arbiters
 
Modulo n counter
Modulo n counterModulo n counter
Modulo n counter
 
2.3 sequantial logic circuit
2.3 sequantial logic circuit2.3 sequantial logic circuit
2.3 sequantial logic circuit
 

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

Recently uploaded

Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 

Recently uploaded (20)

Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 

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