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

Metastability,MTBF,synchronizer & synchronizer failure
Metastability,MTBF,synchronizer & synchronizer failureMetastability,MTBF,synchronizer & synchronizer failure
Metastability,MTBF,synchronizer & synchronizer failure
prashant singh
 

What's hot (20)

Clock divider by 3
Clock divider by 3Clock divider by 3
Clock divider by 3
 
Chapter 6 register
Chapter 6 registerChapter 6 register
Chapter 6 register
 
Cmos logic
Cmos logicCmos logic
Cmos logic
 
555 Timer (detailed presentation)
555 Timer (detailed presentation)555 Timer (detailed presentation)
555 Timer (detailed presentation)
 
Programmable logic array
Programmable logic arrayProgrammable logic array
Programmable logic array
 
Synchronous sequential Circuits
Synchronous sequential CircuitsSynchronous sequential Circuits
Synchronous sequential Circuits
 
Sequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsSequential circuits in Digital Electronics
Sequential circuits in Digital Electronics
 
Bcd to excess 3 code converter
Bcd to excess 3 code converterBcd to excess 3 code converter
Bcd to excess 3 code converter
 
Counters
CountersCounters
Counters
 
carry look ahead adder
carry look ahead addercarry look ahead adder
carry look ahead adder
 
Registers and counters
Registers and countersRegisters and counters
Registers and counters
 
Clipper circuits
Clipper circuitsClipper circuits
Clipper circuits
 
Counters
CountersCounters
Counters
 
Metastability,MTBF,synchronizer & synchronizer failure
Metastability,MTBF,synchronizer & synchronizer failureMetastability,MTBF,synchronizer & synchronizer failure
Metastability,MTBF,synchronizer & synchronizer failure
 
decoder and encoder
 decoder and encoder decoder and encoder
decoder and encoder
 
Latches and flip flop
Latches and flip flopLatches and flip flop
Latches and flip flop
 
Sequential Logic Circuit
Sequential Logic CircuitSequential Logic Circuit
Sequential Logic Circuit
 
Counters
Counters Counters
Counters
 
Logic families
Logic  familiesLogic  families
Logic families
 
Registers siso, sipo
Registers siso, sipoRegisters siso, sipo
Registers siso, sipo
 

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

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
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
中 央社
 
Financial Accounting IFRS, 3rd Edition-dikompresi.pdf
Financial Accounting IFRS, 3rd Edition-dikompresi.pdfFinancial Accounting IFRS, 3rd Edition-dikompresi.pdf
Financial Accounting IFRS, 3rd Edition-dikompresi.pdf
MinawBelay
 

Recently uploaded (20)

Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
 
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
 
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
 
Word Stress rules esl .pptx
Word Stress rules esl               .pptxWord Stress rules esl               .pptx
Word Stress rules esl .pptx
 
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
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
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
 
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
 
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
 
Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).Dementia (Alzheimer & vasular dementia).
Dementia (Alzheimer & vasular dementia).
 
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
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
An Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxAn Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptx
 
Financial Accounting IFRS, 3rd Edition-dikompresi.pdf
Financial Accounting IFRS, 3rd Edition-dikompresi.pdfFinancial Accounting IFRS, 3rd Edition-dikompresi.pdf
Financial Accounting IFRS, 3rd Edition-dikompresi.pdf
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
Behavioral-sciences-dr-mowadat rana (1).pdf
Behavioral-sciences-dr-mowadat rana (1).pdfBehavioral-sciences-dr-mowadat rana (1).pdf
Behavioral-sciences-dr-mowadat rana (1).pdf
 
Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17
 

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