Professional Documents
Culture Documents
1/43
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
2/43
1 0 0 1 0 0 0 1 1 0 1 1
0V
time
l
3/43
voltage
Analog signal
time
sample
voltage
Digital
signal
quan1ze
time
time
4/43
5/43
Example - switches
l
6/43
Example - switches
l
IF {car running
AND [car in driveway OR
(car in garage AND NOT garage door closed) ]
}
THEN car can back out
7/43
EEE 21. A. Ballesil, R. Ocampo, J. Pedrasa
Inputs
xn-1
xn-2
x1
x0
Combinational
Logic
zm-1
zm-2
z1
z0
Outputs
8/43
Inputs
:
Combinational
Logic
Current
State
zm-1
z0 Outputs
Next
State
Memory
l
Sequential systems
l
10/43
NUMBER SYSTEM
11
Cardinality
l
12/43
Number representation
|D|n-1 k |D|n
13/43
Number representation
l
14/43
Number representation
l
15/43
Number representation
l
16/43
Number representation
l
|D|n = 24 = 16 values
These are 0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111,
1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111
EEE 21. A. Ballesil, R. Ocampo, J. Pedrasa
17/43
Number representation
l
A digit's
position
in the number
18/43
Number representation
l
= 24
= 16 values
These are 0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111,
1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111
EEE 21. A. Ballesil, R. Ocampo, J. Pedrasa
19/43
20/43
1234.567
EEE 21. A. Ballesil, R. Ocampo, J. Pedrasa
21/43
fractional part
n-1
an-1an-2...a1a0.a-1a-2...a-m = ai x ri
i = -m
22/43
Base conversion
l
= 46.37510
23/43
Base conversion
l
24/43
Example: 1234.567810
l
l
In general
l
l
25/43
Base conversion
l
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...
EEE 21. A. Ballesil, R. Ocampo, J. Pedrasa
26/43
Base conversion
l
0.710 = (.a-1a-2a-3a-4a-5)2
(0.7)(2) = 1. 4 = (a-1. a-2a-3a-4a-5...)2
(0.4)(2) = 0.8 = (a-2.a-3a-4a-5...)2
(0.8)(2) = 1.6 = (a-3.a-4a-5...)2
(0.6)(2) = 1.2 = (a-4.a-5...)2
(0.2)(2) = 0.4 = (.a-5...)2
0.710 (0.10110)2
a-1 = 1
a-2 = 0
a-3 = 1
a-4 = 1
a-5 = 0
27/43
Base conversion
l
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
EEE 21. A. Ballesil, R. Ocampo, J. Pedrasa
28/43
Base conversion
l
29/43
Base conversion
l
a0 = 2
a1 = D
a2 = 4
30/43
31/43
Examples
11011.012 = ( ? )10
11011.012 = 27.2510
32
Examples
56.710 = ( ? )2
0.710 = ( ? )2
5610 = ( ? )2
2 /56
2 /28
2 /14
2 /7
2 /3
2 /1
0
2 * .7 = 1.4
2 * .4 = 0.8
2 * .8 = 1.6
2 * .6 = 1.2
2 * .2 = 0.4
.
0
0
0
1
1
1
1
0
1
1
0
0.710 = 0.101102
5610 =1110002
56.710 = 111000.101102
33/43
Binary
000
001
010
011
100
101
110
111
Example:
34
Binary
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
Example:
E25A61716 =
1110 0010 0101 1010 0110 0001 0111 2
From EEE 11
35
36/43
Binary arithmetic
l
Addition
0+0=0
0+1=1
1+0=1
1 + 1 = 0 carry 1
111
1
(carry)
00011001
+ 00101101
01000110
EEE 21. A. Ballesil, R. Ocampo, J. Pedrasa
37/43
Binary arithmetic
l
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.
38/43
Codes
Other ways of representing quantities or objects
l
39/43
Codes
Other ways of representing quantities or objects
l
40/43
Codes
3-bit Gray code
Start with 2-bit Gray code
000
001
011
010
110 Reflect
111
101
100
41/43
Codes
Error-correcting and error-detecting codes
l
Even parity:
11010111
Odd parity:
01010111
parity bit
42/43
Codes
Character codes: (Example) ASCII (American
Standard Code for Information Interchange)
l
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
l
[Wikipedia] 43/43