0% found this document useful (0 votes)
23 views59 pages

EEB341.Chapter02 DigitalCircuits PART1

The document is a lecture overview on digital electronics, specifically focusing on digital circuits, logic variables, and functions such as AND, OR, and NOT. It discusses the differences between analog and digital signals, the concept of binary logic, and the use of truth tables and logic gates in circuit design. Additionally, it covers the analysis and synthesis of logic networks using timing diagrams and equivalent circuits.

Uploaded by

marangmak62
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views59 pages

EEB341.Chapter02 DigitalCircuits PART1

The document is a lecture overview on digital electronics, specifically focusing on digital circuits, logic variables, and functions such as AND, OR, and NOT. It discusses the differences between analog and digital signals, the concept of binary logic, and the use of truth tables and logic gates in circuit design. Additionally, it covers the analysis and synthesis of logic networks using timing diagrams and equivalent circuits.

Uploaded by

marangmak62
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 59

Dr.

N Ditshego
Lecturer
Department of Electrical Engineering
University of Botswana

Office No: 248/213


Ext: 4229
Email: [email protected]

EEB 341
DIGITAL ELECTRONICS

CHAPTER 2
DIGITAL CIRCUITS

1
Lecture Overview
 Analog vs Digital
 Logic Variables
 Logic Functions
 AND, OR, NOT
 Combining Functions
 Truth Tables
 Logic Gates
 Logic Networks
 Analysis using Truth Tables
 Analysis using Timing Diagrams
 Equivalent Logic Networks

2
Analogue vs Digital
 Analogue Circuits: Signals may take on a continuous range of
values between some minimum and maximum levels
 Classic example: Record player, Analogue Telephone
 Recent examples: Terrestrial Television, FM Radio, AM radio

 Digital Circuits: Signal values are restricted to a few discrete values


 Binary logic: Only two possible values, 0 and 1
 Decimal logic: Ten possible values, from 0 to 9
 Since each signal value is represented by a digit, or multiple digits, such logic
circuits are called digital circuits

3
Analogue vs Digital - resolution
 Assume we have an analogue signal, and we want to represent it
digitally with only two possible values (1 bit)
1200

1000

800

600
Analogue

400

200

0
0 50 100 150 200 250 300 350 400

1200

1000

800
Analogue
600

2 Values
400
(1-bit digital)

200

0
0 50 100 150 200 250 300 350 400
-200

4
Analogue vs Digital - resolution
 Assume we have an analogue signal, and we want to represent it
digitally with only four possible values (2 bits)
1200

1000

800

600
Analogue

400

200

0
0 50 100 150 200 250 300 350 400

1200

1000

800
Analogue
600

4 Values
400
(2 bit digital)

200

0
0 50 100 150 200 250 300 350 400
-200

5
Analogue vs Digital - resolution
 Assume we have an analogue signal, and we want to represent it
digitally with 16 values (4 bits)
1200

1000

800

600
Analogue

400

200

0
0 50 100 150 200 250 300 350 400

12 00

10 00

80 0

A n a lo g u e
60 0

16 Values
40 0 (4 bit digital)

20 0

0
0 50 10 0 15 0 20 0 25 0 30 0 35 0 40 0

-200

6
Analogue vs Digital - sample rate
 Assume we have an analogue signal, and we want to represent it
digitally with 16 values (4 bits), sampling at 10 Hz
1200

1000

800

600
Analogue

400

200

0
0 50 100 150 200 250 300 350 400

1200

1000

800 A n a lo g u e

600
16 Values
400
(4 bit digital)
200 10 Hz

0
0 50 100 150 200 250 300 350 400

7
Analogue vs Digital - sample rate
 Assume we have an analogue signal, and we want to represent it
digitally with 16 values (4 bits), sampling at 100 Hz
1200

1000

800

600
Analogue

400

200

0
0 50 100 150 200 250 300 350 400

1200

1000

800 A n a lo g u e

600
16 Values
400
( 4 b it digital)
100 Hz
200

0
0 50 100 150 200 250 300 350 400

8
Logic Gates

9
10
Binary Logic: Signals and Functions
 Binary signals can assume only two possible values
 0 or 1
 OFF or ON
 LOW or HIGH
 FALSE or TRUE

 Simplest binary element is controllable switch with two states

11
Example: Light Controlled by Switch

12
Binary Switch: OFF or ON

 The state of the light, L, as a function of the state of the switch, x


 If x = 0 (switch is off), then L = 0 (light is off)
 If x = 1 (switch is on), then L = 1 (light is on)
 This relationship described by the logic expression
L(x) = x
 L(x) is the logic function
 x is the input variable
 L is the output variable

13
AND Function

 Connect two switches in series, with control inputs x1 and x2


 L = 1 (light is on), if x1 = 1 AND x2 = 1 (both switches are on)
 L = 0 (light is off), otherwise (if either of the switches are off)

 The logic expression for the AND operation is:


L(x1, x2) = x1 AND x2 or L(x1, x2) = x1 · x2
 where “ · ” is called the AND operator, or the product operator,and
implements the AND function.

14
OR Function

 Connect two switches in parallel, with control inputs x1 and


x2
 L = 1 (light is on), if x1 = 1 OR x2 = 1 (if either or both of the switches are on)
 L = 0 (light is off), otherwise (both switches are off)

 The logic expression for the OR operation


is: L(x1, x2) = x1 OR x2 or L = x1 + x2

 where “ + ” is called the OR operator, or the sum operator, and


implements the OR function.
15
Combining Functions (OR, AND)

 Parallel-series connection of three switches, inputs x1, x2 and x3


 If (x1 = 1 OR x2 = 1) AND x3 = 1, then L = 1
 The light is on, if x3 is on, and, at the same time, at least one of x1 or x2 is on

 The logic expression for the parallel-series logic function is:


L(x1, x2 , x3) = (x1 OR x2) AND x3
or
L = (x1 + x2) · x3

16
NOT Function

 Inverting Circuit
 Closed switch will short circuit light and prevent current from flowing through it
 Extra series resistor to ensure closed switch does not short-circuit power supply!
 The light will turn on when the switch is off.
 If x = 0 (switch is off), then L = 1 (light is on)
 If x = 1 (switch is on), then L = 0 (light is off)

 The logic expression for the NOT operation is


L(x)  NOT x or L(x)  x
 The output variable L is the inverse, or complement, of the input
variable x
17
 Impractical to use overbar notation on keyboard, when using CAD
tools, so alternate notations are used:
x = x’ = !x = ~x = NOT x
( /x or _x also used for schematic diagrammes)
 Complement operation can also be applied to logic expressions, e.g.
if y  x  x then y  x  x
1 2 1 2

Thus y  0 if either x1=1 or x2=1


Thus y will only be 1 when neither x1 nor x2 equals 1, or x1 = x2 = 0

 The following notations are also equivalent

x1  x2 = (x1 + x2)’ = !(x1 + x2) = ~(x1 + x2) = NOT (x1 + x2)


18
Alternate notation
 In Boolean algebra, the symbols · and + are used for AND and OR
 In ordinary arithmetic, the symbols · and + are used for multiplication
and addition

 When designing digital circuits that perform arithmetic, the following


alternate notation is used for AND and OR:

OR: x y

AND: x y

19
Truth Tables
 Logic function also be represented with a table, called a truth table

 First two columns give all combinations of input values


 Third column gives output of AND function for each combination
 Last column gives output of OR function for each combination
20
 Truth table grows exponentially in size with number of inputs
 Truth table with 3 inputs has 8 rows (see 3-input AND and OR)

 Truth table with 4 inputs has 16 rows


 Truth table with n inputs has 2n rows
21
Logic Gates
 Logic gates are circuit elements that implement logic functions
electronically with transistors
 AND, OR and NOT gates are represented with graphic symbols

x1
(a) AND gate x1  x2
x2

x1
(b) OR gate x1 + x 2
x2

(c) NOT gate x x

22
Logic Gates
 Logic gates with multiple inputs

x1
x2
(a) AND gate with n inputs x1  x2    xn

xn

x1
x2
(b) OR gate with n inputs x1 + x2 +  + xn

xn

23
Logic Network
 The three basic logic functions (AND, OR and NOT) can be
combined to form logic functions of any complexity
 Any logic function can be implemented with a logic circuit consisting
of a network of logic gates

x1
x2
= x 1 + x2   x3
x3

 A combination of logic symbols in a drawing is called a circuit


diagram, or schematic

24
Analysis of a Logic Network
 Analysis : The task of determining the logic function of an existing
logic network
 Synthesis : The task of designing a new logic network that will
implement a desired logic function

x1
x1  x1  x2 
x1
A
x1 x1 x2 B
x2
x2

f  x1  x1  x2 

25
Analysis via Truth Table
 Apply all possible combinations of input signals and determine
output signal for each combination

x1 0011 1100
A
1101 f
0001 B
0101
x2

x x f (x , x ) A B
1 2 1 2
1 0
0 0 1
0 1 1 1 0
1 0 0 0 0
1 1 1 0 1

26
Analysis via Timing Diagram
 Graphical representation of signals with respect to time
0011 1100
x
1 A
1101
f
0 0 0 1 B
0101
x
2

1
x
1 0

x 1
2 0

1
A
0
1
B
0
1
f
0 Time

27
Timing Diagrams
 Timing diagrams useful for indicating functional behaviour of circuits
 Idealized waveforms assume output signals respond to changes in
input signals in zero time
 With practical logic gates, which are implemented in electronics,
there is a delay between a change in input values and the
corresponding change in the output value
 Timing diagrams correspond to measurements taken with
oscilloscopes and logic analyzers
 Timing diagrams also generated by CAD tools to show designer
expected behaviour of given circuit before actually implemented

28
Equivalent Circuits
 The following circuits produce the same outputs for the same
combinations of inputs, but with different networks

x1 0011 1100
A
1101 f
0001 B
0101
x2

0 01  1 1 1 0 0
x
1
1 1 0 1
0 10 1 g
x
2

 Subtle difference. Can you spot it?

29
DEFINATION

• A timing diagram is a graphical method for showing the exact output behaviour of a logic circuit
for every possible set of input condition.

• It is often used to describe the operation of digital devices because its visual characteristics are
much easier to understand than a wordy explanation

30
DEFINATION

• In most situations, logic signals applied to the input of logic devices are not at stationery levels.
Instead, they are voltages that change continuously with states

• To illustrate how logic gates respond to input signals in relation to time, timing diagrams have
been developed

31
Examples-Series switch and bulb

32
Example –Bulb is off at Time Period 1

33
Example –Bulb is off at Time Period 2

34
Example –Bulb is off at Time Period 3

35
Example –Bulb is off at Time Period 4

36
AND-GATE TIMING DIAGRAM

37
AND-GATE TIMING DIAGRAM1

38
AND-GATE TIMING DIAGRAM2

39
AND-GATE TIMING DIAGRAM3

40
AND-GATE TIMING DIAGRAM4

41
AND-GATE TIMING DIAGRAM5

42
SUMMARY ON GATES
AND Definition: the output is true (1) if both inputs are
true (1).
logical operator

F = A.B = AB = “A and B” A B A. B
0 0 0
Boolean expression
0 1 0
1 0 0
1 1 1
F
Truth table
Symbol (aka. logic gate)

43
OR
Definition: the output is true (1) if either or both
inputs are true (1).
logical operator

F = A+B = “A or B” A B A+ B
0 0 0
Boolean expression
0 1 1
1 0 1
1 1 1
FF
Truth table
Symbol

44
NOT
Definition: the output is true (1) if the input is false
(0).
logical operator

F = A' = “ not A” A A'


Boolean expression 0 1
1 0
Truth table
A F = A'
Symbol

45
Order of Precedence

The order of precedence of the basic logic


operations is defined as follows:

– NOT
– AND
– OR
The order of precedence can be modified by using
parenthesis.

46
Functionally Complete

The AND, OR, and NOT operations comprise a


functionally complete set.

All logic functions can be expressed in terms of


these logic operations.

All logic circuits can be realized using the


associated logic gates.

47
NAND
Definition: the output is false (0) if both inputs are
true (1).

F = (A.B)' = “not (A and B)” A B (A . B)'


0 0 1
Boolean expression
0 1 1
1 0 1
1 1 0
F = (A.B)'
Truth table
Symbol
shorthand for inversion

48
NOR
Definition: the output is false (0) if either or both
inputs are true (1).

F = (A+B)' = “not (A or B)” A B (A+B)'


0 0 1
Boolean expression
0 1 0
1 0 0
1 1 0
FFFF = (A+B)'
Truth table
Symbol
shorthand for inversion

49
XOR
Definition: the output is true (1) if either but not both
inputs are true (1).

F = A xor B A B A xor B
0 0 0
Boolean expression
0 1 1
logical operator
1 0 1
1 1 0

Truth table
Symbol

50
XNOR
Definition: the output is false (0) if either but not
both inputs are true (1).

F = A xnor B
A B A xnor B
Boolean expression
logical operator
0 0 1
0 1 0
1 0 0
1 1 1
Symbol
Truth table

51
Logic Circuits
Logic circuits are realized through the interconnection
of logic gates.

 Each logic gate represents a logical operation.


 This can be done using
 discrete components
Standard Logic Gates
programmable devices


 Read-only Memories (ROM)
 Programmable Logic Devices (PLD)
 Field Programmable Gate Arrays (FPGA)

52
Standard Logic Gates
Device Logic Gate
74xx08 Quad 2-input AND gate
74xx32 Quad 2-input OR gate
74xx04 Hex Inverter (NOT gate)
74xx00 Quad 2-input NAND gate
74xx02 Quad 2-input NOR gate
74xx86 Quad 2-input XOR gate

Note: “xx” refers to the logic family

53
Standard Logic Gates
 Data sheets provide essential information:
 Logic Function
 Truth Table
 Pin-out
 Electrical Characteristics
 Timing Characteristics
 Package Description(s)
This information is necessary when building logic circuits
from discrete components.

 Each logic family has a unique set of characteristics.

54
Standard Logic Gates: 74xx08

pin-out

Truth table

55
Standard Logic Gates: 74xx32

pin-out

Truth table

56
Standard Logic Gates: 74xx04

pin-out

Truth table

57
Building a Logic Circuit
Circuit
Diagram
C
74xx08
B
74xx04
inputs 74xx32 F output

74xx08
A

Boolean
F = B'.C + A.B Expression

58
Building a Logic Circuit
VDD
Wiring
Diagram
components
7404

wires
7408 7432

A
inputs B
C output
F

59

You might also like