You are on page 1of 26

ESC201T : Introduction to

Electronics

Lecture 31: Digital Circuits-1

B. Mazhari
Dept. of EE, IIT Kanpur
Analog vs. Digital Signal

Vo2(t)
Vi(t) Converter Circuit
Vo1(t)
1

Can take only discrete values (0,1,2..9)


V(t)

Analog Voltage Vo2 (V) Vo1 (V)


(V)
0
0.45 4 5
0.75 7 5
Can take any value in the range 0-1V 0.93 9 3
0.932 9 3
0.934 9 3
Loss in accuracy 0.936 9 4
Advantages of using digital Signals
Robustness towards noise

Vix(t)  Viy(t)
Vix (t )  0.45  Viy (t ) : (0.25, 0.65)

n(t) :(-0.2,0.2) It is very difficult to recover the original signal

Regeneration
Advantages of using digital Signals Robustness towards noise

Vix(t)  Viy(t)
Vix (t )  0.452  Viy (t ) : (0.252,0.652)

n(t) :(-0.2,0.2) One is uncertain about the first decimal place !!

n(t): (-0.2,0.2)

Vo2(t)=4 (3.8,4.2) 4
Vi(t) = 0.452  0.45
Converter
Converter Circuit Decision Circuit
Circuit

Vo1(t)=5 (4.8,5.2) 5

n(t): (-0.2,0.2)
Loss in accuracy
Overall higher accuracy
n(t): (-0.2,0.2)

Vo3(t)=4 (3.8,4.2) 4

Vi(t) = 0.452
Vo2(t)=5 5
Converter Circuit  Converter
Decision Circuit
(4.8,5.2) Circuit 0.452
Vo1(t)=2

(1.8,2.2) 2

n(t): (-0.2,0.2)

One can get the desired accuracy using larger number of digits
Accurate Processing ?
Suppose we would like to multiply a signal by a factor of 2

1K
Because of tolerances etc, we would not
get a gain of 2. Suppose the gain is 1.9.
1K

For Vi = 0.44, we would get 0.836 instead


VO
vi of 0.88V.

7.6 8

4 1.9

4 0.88
0.44
8
1.9 7.6

Processing of digital signals is often much simpler if numbers are represented


properly !
Digital circuits allow much more complex information processing

Deep Blue was a chess-playing computer developed by IBM. On May 11, 1997, the machine
won a six-game match by two wins to one with three draws against world champion Garry
Kasparov Kasparov accused IBM of cheating and demanded a rematch, but IBM declined
and dismantled Deep Blue. Kasparov had beaten a previous version of Deep Blue in
1996….wikipedia
Analog signal Processing

R2

R
R1
vO(t)

vS j L L VO

 j C C VS
Digital signal Processing
Converting signals into a sequence of numbers and vice-versa

2
x(t )  0.5  0.5  sin( 3 t )
10

Step-1: Sampling
x(t)

t
Sample at intervals of T/12

T
x[n ]  [0.5, 0.75, 0.93,1, 0.93, 0.75, 0.5, 0.25, 0.067, 0, 0.067, 0.25, 0.5....]
12

x(t) x[nT/12]
Example

x(t) x[n]

x(t)

t Sample and Hold


One can recover the original waveform by low pass filtering the sampled
waveform

x[n]
x(t) Low pass filter x(t)

C
Converting sampled waveform into a sequence of numbers

Quantization:

x[n] 1
x(t)
N-digit
Quantizer
2 { N-digit word
N

1-digit quantizer: [0,1,3,5,4,3,2,0,1,3,5……..]

2-digit quantizer: [00,12,32,57,42,31,22,00,12,32,57……..]


Quantization:
2V 2V 9
18/10
8
16/10
x[n] 7
1-digit 14/10
x(t) Quantizer 6
12/10
5
10/10
4
8/10
3
6/10
2
4/10
0 1
2/10
0
2V 0
9
18/10
8
16/10
7
14/10 It is obvious that quantization
6
12/10 introduces errors !
5
10/10
4
8/10
3
6/10
2
4/10
1
2/10
0
0
Quantization: 2
x(t )  0.5  0.5  sin( 3 t ) Sample at intervals of T/12
10
T
x[n ]  [0.5, 0.75, 0.93,1, 0.93, 0.75, 0.5, 0.25, 0.067, 0, 0.067, 0.25, 0.5....]
12

Voltage Range Number Analog Voltage Digital


voltage or
(Volts)
Number
0-0.2 0 0.5 2
0.2-0.4 1 0.75 3

0.4-0.6 0.93 4
2
1 5
0.6-0.8 3
0.93 4
0.8-1.0 4 0.75 3
1.0-1.2 5 0.5 2
0.25 1
1.2-1.4 6
0.067 0
1.4-1.6 7 0 0
1.6-1.8 8 0.067 0
1.8-2.0 9 0.25 1
0.5 2
Analog Voltage Digital
2
x(t )  0.5  0.5  sin( 3 t ) voltage or
10
Number
0.5 2
x[n]
1-digit 0.75 3
x(t) Quantizer
0.5 2 0.93 4
1 5
0.93 4
0.93 4
0.75 3
0.5 2
0.25 1
0.067 0
0 0
0.067 0
0.25 1
0.5 2
2-digit Quantization:

2V 2V 99
198/100
98
196/100
97
194/100
x[n]
2-digit
x(t) Quantizer

03
6/100
02
4/100
01
2/100
00
0 0
2-digit Quantization: 2
x(t )  0.5  0.5  sin( 3 t ) Sample at intervals of T/12
10

Analog Voltage Number


Voltage Range Number
(Volts) 0.5 25
0-0.02 00 0.75 37
0.93 46
0.02-0.04 01
1 50
0.04-0.06 02
0.93 46
- - 0.75 37
- - 0.5 25
- - 0.25 12
1.92-1.94 96 0.067 03
0 00
1.94-1.96 97
0.067 03
1.96-1.98 98
0.25 12
1.98-2.0 99 0.5 25
Analog Voltage Number
2
x(t )  0.5  0.5  sin( 3 t ) 0.5 25
10
0.75 37
x[n] 2 4 0.93 46
0.93 2-digit
x(t) Quantizer 5 6
0.5 1 50
0.93 46
0.75 37
0.5 25
0.25 12
0.067 03
0 00
0.067 03
0.25 12
0.5 25
Converting numbers back to signals

2
x(t )  0.5  0.5  sin( 3 t ) x( n)  [2, 3, 4, 5, 4,3, 2,1, 0, 0, 0,1, 2....]
10

Environment

Sensor Actuator
A/D Converter D/A Converter

x[n] y[n]

Arithmetic and Logical Operations

Electronic System

Suppose we do not carry out any processing. Y[n] = x[n]. Are we able to
regenerate the original signal?
Digital to Analog Converter x( n)  [2, 3, 4, 5, 4,3, 2,1, 0, 0, 0,1, 2....]
Voltage Range Number Original Analog Digital New Analog
(Volts) Voltage voltage or Voltage
0-0.2 0 Number
0.5 2 2 x 0.2= 0.4
0.2-0.4 1
0.75 3 3 x 0.2=0.6
0.4-0.6 2 0.93 4 0.8
0.6-0.8 3 1 5 1.0
0.8-1.0 4 0.93 4 0.8
0.75 3 0.6
1.0-1.2 5
0.5 2 0.4
1.2-1.4 6 0.25 1 0.2
1.4-1.6 7 0.067 0 0
1.6-1.8 8 0 0 0
0.067 0 0
1.8-2.0 9
0.25 1 0.2
0.5 2 0.4
Digital to Analog Converter Analog Voltage Number New Analog
Voltage
0.5 25 25 x 0.02 =
Voltage Range Number 0.5
(Volts) 0.75 37 37 x 0.02
=0.74
0-0.02 00
0.93 46 0.92
0.02-0.04 01
1 50 1.0
0.04-0.06 02 0.93 46 0.92
- - 0.75 37 0.74
- - 0.5 25 0.5
- - 0.25 12 0.24
1.92-1.94 96 0.067 03 0.06
0 00 0
1.94-1.96 97
0.067 03 0.06
1.96-1.98 98 0.25 12 0.24
1.98-2.0 99 0.5 25 0.5
Processing of numbers in decimal system is cumbersome !

Circuits for processing numbers in binary system are much easier to


implement
Processing of numbers in decimal system is cumbersome !

2R

How do we add 2+5


R

R VO

2V
R R
5V

2R

R
How do we add 23+45?
R VO

3V
R R
2 3 5V

4 5 2R
6 8
R

R VO

2V
R R
4V
How do we add 23+58 ? 1

2 3
5 8
8 1

3 S=1
Adder
8 Cout=1

Cin
2 S=8
Full Adder
5 Cout=0

It is not easy to design circuits to carry out this operations using decimal system

A Binary number system is more convenient !


Converter circuits for binary number system

A/D converter

D/A converter

You might also like