Professional Documents
Culture Documents
Continuous in amplitude
and discrete in time
Discrete in amplitude
and discrete in time
4 5 4 3 4 6 7 5 3 3 4 4 3
1 0 0 1 0 0 0 1 1 0 1 1
2.
Conversion
Analog signal
Quantize to specified
levels
sample
Digital signal
quantize
Anastacia B. Alvarez
EEE 21
Switches
Boolean algebra / equations
Truth tables
Gates / circuits
Block diagrams
Waveforms / timing diagrams
State diagrams
Hardware description languages
Example - switches
Example - switches
IF {car running
AND [car in driveway
OR (car in garage AND NOT garage door closed)]}
THEN car can back out
zm-1
zm-2
z1
z0
Inputs
Current
State
Combinational
Logic
Next
State
Memory
Sequential systems
Number systems
Cardinality
Number representation
Number representation
With n = 2, you can only form the numbers 00, 01, 10 and 11
With n = 3, you can form the numbers
000, 001, 010, 011, 100, 101, 110 and 111
Number representation
Number representation
Number representation
Number representation
A digit's
position
in the number
Number representation
= 24 = 16
These are 0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111,
1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111
1234.567
fractional part
an-1an-2...a1a0.a-1a-2...a-m =
radix point: separates
the integer from
fractional part
n-1
i
a
r
i
i = -m
Base conversion
Base conversion
Example: 1234.567810
In general
Base conversion
F = (.a-1a-2...a-m)r
(F)(r) = (a-1.a-2...a-m)r
(F)(r) = some integer + fraction F'
Therefore, (a-1)r = integer
Repeat using F' and (.a-2a-3...a-m)r.
Sometimes this process does not terminate...
Base conversion
0.710 = (.a-1a-2a-3a-4a-5)2
(0.7)(2) = 1.4 = (a-1.a-2a-3a-4a-5...)2
a-1 = 1
a-2 = 0
a-3 = 1
a-4 = 1
a-5 = 0
0.710 (0.10110)2
Base conversion
D = (an-1an-2...a1a0)r
D/r = (an-1an-2...a1.a0)r
D/r = some integer D' + (remainder)/r
Now (.a0)r = a0/r = remainder/r
Therefore
a0= remainder
Base conversion
a1= remainder
Base conversion
a0 = 2
77/16 = 4 remainder 13
a1 = D
4/16 = 0 remainder 4
a2 = 4
Base conversion
Binary arithmetic
Addition
0+0=0
0+1=1
1+0=1
1 + 1 = 0 carry 1
111
1
(carry)
00011001
+ 00101101
01000110
Binary arithmetic
Multiplication
Each bit in the multiplier (starting from the least significant
bit or LSB) is multiplied to each bit of the multiplicand in
much the same way that decimal numbers are multiplied.
Codes
Other ways of representing quantities or objects
Codes
Other ways of representing quantities or objects
Codes
3-bit Gray code
Start with 2-bit Gray code
000
001
011
010
110 Reflect
111
101
100
Codes
Error-correcting and error-detecting codes
Even parity:
11010111
Odd parity:
01010111
parity bit
Codes
Character codes: (Example) ASCII (American
Standard Code for Information Interchange)
Oct
100
101
102
103
104
105
106
107
110
Dec
64
65
66
67
68
69
70
71
72
Hex
40
41
42
43
44
45
46
47
48
Glyph
@
A
B
C
D
E
F
G
H
[Wikipedia]