ECE 20B, Winter 2003.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Introduction to Electrical Engineering, IIInstructor: Andrew B. Kahng (lecture)Email: abk@ece.ucsd.eduTelephone: 8588224884 office, 8583530550 cellOffice: 3802 AP&MLecture: TuThu 3:30pm – 4:50pm, HSS, Room 2250Discussion: Wed 6:00pm6:50pm, Peterson Hall, 108 Class Website: http://vlsicad.ucsd.edu/courses/ece20b/wi03 Login: ece20b Password: b02ece
Discrete
Discrete
Information
Inputs
Discrete
Processing
Outputs
System
System State
Synchronous sequential system
Asynchronous sequential system
UP
0
0
1
3
5
6
4
RESET
Asynchronous
(Time)
Synchronous
SignalsThreshold Region
5 x 103 = 5,000
+ 6 x 102 = 600
+ 3 x 101 = 30
+ 4 x 100 = 4 5,634
The radix.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
0, 1, …, r1.
Given a number of
radix
r of
“n” integer digits an1,…,a0
n
and
“m” fractional digits a1,…,am
written as
:
an1 an2 an3 … a2 a1 a0 . a1 a2 … am
has value:
(
)
(
)
i=
n1
j =1
+
i
j
a
r
a
r
(Number)
=
i
j
r
j = m
i = 0
(Integer Portion)
+
(Fraction Portion)
Name
Radix
Digits
Binary
2
0,1
Octal
8
0,1,2,3,4,5,6,7
Decimal
10
0,1,2,3,4,5,6,7,8,9
Hexadecimal
16
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
(= 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
N10 = 1 × 24 + 1 × 23 + 0 × 22 + 1 × 21 + 0 × 20
= 26
Why does this work?
This works because, the remainder left in the division is always
is the coefficient of the radix’s exponent.
Why does this work?
To convert fractional part, it should be divided by reciprocal of radix, which is same as multiplying with radix.
46/2 = 23 remainder = 0
23/2 = 11 remainder = 1
11/2 = 5 remainder = 1
5/2 = 2 remainder = 1
2/2 = 1 remainder = 0
1/2 = 0 remainder = 1
Read off in reverse order: 1011102
0.6875 * 2 = 1.3750 int = 1
0.3750 * 2 = 0.7500 int = 0
0.7500 * 2 = 1.5000 int = 1
0.5000 * 2 = 1.0000 int = 1
0.0000
Read off in forward order: 0.10112
6 3 5 . 1 7 7 8
= 110011101 . 001111111 2
= 110011101 . 001111111(000)2 (regrouping)
= 1 9 D . 3 F 816(converting)
Color
000
Red
001
Orange
010
Yellow
011
Green
100
(Not mapped)
101
Blue
110
Indigo
Violet
111
Nonnumeric Binary Codesbinary code
for the seven
colors of the
rainbow
8,4,2,1
Excess3
8,4,

2,

1
Gray
0
0000
0011
0000
0000
1
0001
0100
0111
0100
2
0010
0101
0110
0101
3
0011
0110
0101
0111
4
0100
0111
0100
0110
5
0101
1000
1011
0010
6
0110
1001
1010
0011
7
0111
1010
1001
0001
8
1000
1011
1000
1001
9
1001
1
100
1111
1000
Binary Codes for Decimal Digits8,4,2,1
Gray
0
0000
0000
1
0001
0100
2
0010
0101
3
0011
0111
4
0100
0110
5
0101
0010
6
0110
0011
7
0111
0001
8
1000
1001
9
1001
1000
Gray CodeCarries 0000001100
Augend 01100 10110
Addend +10001+10111
Sum 11101 101101
Z
1
0
1
0
0
1
1
0
X
X
0
0
0
0
1
1
1
1
BS
BS
11
0 0
1 0
1 1
0 1
0 0
0 0
1 1
 Y
 Y
0
0
1
1
0
0
1
1
Single Bit Binary Subtraction with BorrowBorrows0000000110
Minuend 10110 10110
Subtrahend 10010 10011
Difference 00100 00011
Odd Parity
Message
Parity
Parity
Message


000
000


001
001


010
010


011
011


100
100


101
101


110
110


111
111


3Bit Parity Code Example