Transcript chapter 1

Continuous vs. Discrete
Analog: Continuous
1000.00 mV
0.00 mV
Analog corresponds to real.
0
1
2
3
Digital: Discrete
Digital corresponds to symbolic.
Seattle Pacific University
EE 1210 - Logic System Design
DigitalSystems-1
From Analog to Digital
0
1
2
3
125
375
625
875
0.00 mV
250.00
500.00
750.00
1000.00 mV
• Our analog signal had an infinite range of values in between
0.00 mV and 1000.00 mV
• The new digital signal has only four values: 0,1,2,3
• ‘0’ corresponds to all values from 0 mV to 250 mV, but is
represented by the value 125 mV
• Likewise for 1,2, and 3
Seattle Pacific University
EE 1210 - Logic System Design
DigitalSystems-2
The issue of Noise
125
0.00 mV
625
375
250.00
500.00
875
750.00
Digital
Analog
Sent
150
624
429
987
223
Received
156.2
613.5
401.3
992.1
223.1
1000.00 mV
Sent
125
625
375
875
125
Received
131.2
614.5
347.3
880.5
125.1
Becomes
125
625
375
875
125
Noise Margin - The amount of noise that can be added to a digital
signal without changing the result. (Above example: +/- 125mV)
Seattle Pacific University
EE 1210 - Logic System Design
DigitalSystems-3
Finite representation
125
0.00 mV
625
375
250.00
500.00
875
750.00
1000.00 mV
Analog signal
1000
750
mV
500
Digital signal
250
0
Seattle Pacific University
time
EE 1210 - Logic System Design
DigitalSystems-4
Tradeoffs
• Digital signals are limited (finite) - Analog signals
are continuous (infinite)
• We can always make the analog-to-digital
conversion finer-grained
• Analog signals are very susceptible to noise Digital signals can tolerate noise
• The finer-grained the analog-to-digital conversion is,
the smaller the noise margins
• Noise beyond the noise margins does really bad
things to digital signals
Seattle Pacific University
EE 1210 - Logic System Design
DigitalSystems-5
Other reasons for using Digital Systems
• Computers use digital logic
• Computers must be spoken to in their own language
- digital systems are the way to go
• Digital systems are easier to understand
• Functions are defined by easy-to-understand binary
logic instead of complex differential equations
Seattle Pacific University
EE 1210 - Logic System Design
DigitalSystems-6
Binary Systems
• Binary systems have two
values
• Zero and One
• Binary numbers are easy to
represent using physical
phenomena
• All numbers can be
represented in binary as
well as in any other base
Seattle Pacific University
Zero
‘0’
False
Off
Low V
0V
Current
EE 1210 - Logic System Design
One
‘1’
True
On
High V
5V
No Current
DigitalSystems-7
Waveforms
Digital data can vary over time, making a digital waveform
H
L
Time
Rising Edge
Falling Edge
100%
90%
A Real
Waveform
50%
10%
0%
Rise Time
Seattle Pacific University
Fall Time
EE 1210 - Logic System Design
DigitalSystems-8
Clocks
Regular Periodic waveforms are called Clock Signals
Period
TH
TL
Period is measured in seconds
Frequency = 1/Period, measured in Hertz
Example: TH = 3ns, TL = 2ns. What are period and frequency?
Period = TH+TL = 5ns
Seattle Pacific University
Frequency = 1/5ns = 200MHz
EE 1210 - Logic System Design
DigitalSystems-9
Using a Clock
Consider this waveform, carrying digital data:
What data does it carry? 101010?
1
0
0
1
0
1
1
0
Apply a clock to it to understand the waveform.
Sample it at each falling edge: 10010110
Warning: The sample clock must be the same frequency as the
clock that was used to generate the waveform
If the second clock was used, we’d have 1100001100111100
Seattle Pacific University
EE 1210 - Logic System Design
DigitalSystems-10
Timing Diagrams
A binary function, F(A,B,C), shown as a timing diagram
A
B
C
F
A
B
C
F
1
1
1
1
0
1
1
0
1
0
1
0
0
0
1
1
1
1
0
0
0
1
0
1
1
0
0
1
0
0
0
1
Note: This “timing” diagram doesn’t have a time scale – we’ll get to
that later
Seattle Pacific University
EE 1210 - Logic System Design
DigitalSystems-11
Number Systems
123410 = 1 x 103 + 2 x 102 + 3 x 101 + 4 x 100
10102 = 1 x 23 + 0 x 22 + 1 x 21 + 0 x 20
=1x8 + 0x4 + 1x2 + 0x1
= 810 + 210 = 1010
n
D   Pi  B
i
i0
Seattle Pacific University
Decimal
Binary
General formula for converting
an n-digit number from base B
to decimal (Pi is the ith digit of the
number)
EE 1210 - Logic System Design
DigitalSystems-12
Binary numbers
• Binary: Base 2
• Decimal: Base 10
• Hexadecimal: Base 16
• It takes 4 binary digits (bits)
to represent the numbers 015
• Each group of 4 binary digits
corresponds to exactly one
hex digit
Seattle Pacific University
Decimal Binary
0
0000
1
0001
2
0010
3
0011
4
0100
5
0101
6
0110
7
0111
8
1000
9
1001
10
1010
11
1011
12
1100
13
1101
14
1110
15
1111
EE 1210 - Logic System Design
Hexadecimal
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
DigitalSystems-13
Binary-to-Decimal Conversion
Each bit in a binary number
refers to a power of two:
1010011
26 2 5 24 23 22 21 20
64+0+16+0+0+2+1 = 83
Seattle Pacific University
20
21
22
23
24
25
26
27
28
29
210
211
212
213
214
215
216
1
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32768
65536
EE 1210 - Logic System Design
1K
2K
4K
8K
16K
32K
64K
DigitalSystems-14
Decimal-to-Binary Conversion
Start with decimal number N: 25
Subtract largest power of two N
25 - 24 = 25 - 16 = 9
Subtract largest power of two  remainder = 9
9 - 23 = 9 - 8 = 1
Repeated
Subtraction or
sum-of weights
method
Subtract largest power of two remainder = 1
22=4 is too large - skip
Subtract largest power of two remainder = 1
21=2 is too large - skip
Subtract largest power of two remainder = 1
1 - 20 = 1 - 1 = 0
Now, we see 2510 = 24 + 23 + 20 = 1 1 0 0 12
Seattle Pacific University
EE 1210 - Logic System Design
DigitalSystems-15