This preview shows pages 1–3. Sign up to view the full content.
1
ECE 15A
Fundamentals of Logic Design
Lecture 15
Malgorzata MarekSadowska
Electrical and Computer Engineering Department
UCSB
2
Number systems
•Everyday arithmetic: decimal number system.
•Number: a string of digits.
•Each digit position determines the integer value of power that 10
is raised to.
1
0
1
2
10
3
10
6
10
5
10
8
3
.
856
:
−
⋅
+
⋅
+
⋅
+
⋅
=
Example
Convention: Write digits and deduce the corresponding powers of 10
from their positions.
General form of a decimal number:
L
L
2
1
0
1
2
3
4
5
−
−
A
A
A
A
A
A
A
A
Each
}
9
,
8
,
7
,
6
,
5
,
4
,
3
,
2
,
1
,
0
{
∈
i
A
Here, the
base
or
radix
is 10.
3
Binary system
•Base: 2.
Digits: 0,1 (called bits)
•Each number is a string of 0s and 1s.
•Binary  decimal conversions
• Expand the string of bits into a power series with
a base 2.
Example:
(?)
10101
2
=
=
⋅
+
⋅
+
⋅
+
⋅
+
⋅
)
2
1
(
)
2
0
(
)
2
1
(
)
2
0
(
)
2
1
(
0
1
2
3
4
16+0+4+0+1 = 21
4
Example: Convert
to binary
)
13
(
10
Check:
10
2
)
13
(
1
1
2
0
4
1
8
1
)
1101
(
=
⋅
+
⋅
+
⋅
+
⋅
=
1
6
2
13
+
=
0
3
2
6
+
=
1
1
2
3
+
=
1
0
2
1
+
=
Step 1
Step 2
Step 3
Step 4
1
1
0
1
5
Example: Convert
to binary
10
)
31
.
0
(
62
.
0
62
.
0
2
31
.
0
+
=
=
⋅
24
.
1
24
.
1
2
62
.
0
+
=
=
⋅
48
.
0
48
.
0
2
24
.
0
+
=
=
⋅
96
.
0
96
.
0
2
48
.
0
+
=
=
⋅
92
.
1
92
.
1
2
96
.
0
+
=
=
⋅
84
.
1
84
.
1
2
92
.
0
+
=
=
⋅
68
.
1
68
.
1
2
84
.
0
+
=
=
⋅
step1
step2
step3
step 4
step 5
step 6
step 7
2
10
0100111
.
0
)
31
.
0
(
=
6
Octal number system
Base: 8, digits: 0,1,2,3,4,5,6,7
Example
10
0
1
2
3
8
)
533
(
5
16
0
512
)
8
5
(
)
8
2
(
)
8
0
(
)
8
1
(
)
1025
(
=
+
+
+
=
⋅
+
⋅
+
⋅
+
⋅
=
Example
Convert
to octal
10
)
189
(
5
23
8
189
+
=
7
2
8
23
+
=
2
0
8
2
+
=
2
7
5
8
10
)
275
(
)
189
(
=
189
5
56
128
1
5
8
7
64
2
8
5
8
7
8
2
0
1
2
=
+
+
=
⋅
+
⋅
+
⋅
=
⋅
+
⋅
+
⋅
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document2
7
Hexadecimal system
Base: 16, digits: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
Example
10
0
1
2
3
)
15042
(
2
192
2560
12288
)
16
2
(
)
16
12
(
)
16
10
(
)
16
3
(
2
This is the end of the preview. Sign up
to
access the rest of the document.
 Winter '08
 M

Click to edit the document details