EECS 20 - PowerPoint PPT Presentation

1 / 58
About This Presentation
Title:

EECS 20

Description:

divide. divide: Nats2 Nats02 such that ... divide: Nats2 Nats02 such that x,y Nats, divide (x,y) = { (q,r) Nats02 | x = q y r r y } ... – PowerPoint PPT presentation

Number of Views:21
Avg rating:3.0/5.0
Slides: 59
Provided by: tomhen
Category:
Tags: eecs | divide

less

Transcript and Presenter's Notes

Title: EECS 20


1
Block Diagrams
EECS 20 Lecture 4 (January 24, 2001) Tom
Henzinger
2
1 Systems are functions 2 Signals are
functions
3
Systems as Functions
Input
Output
Domain set of possible inputs Range set
of possible outputs Graph set of pairs (
input, output )
4
Factorial System
Nats
Nats
!
5
Factorial System
Nats
Nats
!
3
6
6
Factorial System
Nats
Nats
!
4
24
7
Factorial System
Nats
Nats
!
4
24
Domain Nats Range Nats Graph (
1, 1 ), ( 2, 2 ), ( 3, 6), ( 4, 24 ),
8
Inverter System
Bools
Bools
?
9
Inverter System
Bools
Bools
?
true
false
10
Inverter System
Bools
Bools
?
false
true
11
Inverter System
Bools
Bools
?
false
true
Domain Bools Range Bools Graph
( true, false ), ( false, true )
12
Composition of Systems
Bools
Bools
Bools
?
?
true
true
false
13
Composition of Systems
Bools
Bools
Bools
?
?
false
false
true
14
This is again a system !
Bools
Bools
?
?
15
The Identity System
Bools
Bools
id
Domain Bools Range Bools Graph
( x, y ) ? Bools2 x y
16
System Composition is Function Composition
? ? ? id
because domain (? ? ?) domain (id)
range (? ? ?) range (id)
? x ? Bools, ( ? ? x ) id (x)
17
And System
Bools
?
18
And System
Bools2
Bools
?
19
And System
Bools
Bools2
?
(true, false)
false
20
And System
Bools
Bools
?
Bools
21
And System
Bools
Bools
true
?
false
false
Bools
22
-
Exponentiation System
Nats
Nats
2
exp
?
3
Nats
graph (exp) ( (x,y), z ) ? Nats2 ? Nats z
x y
23
Exponentiation System
Nats
Nats
2
1
exp
8
3
2
Nats
graph (exp) ( (x,y), z ) ? Nats2 ? Nats z
x y
24
Exponentiation System
Nats
Nats
2
2
exp
9
3
1
Nats
graph (exp) ( (x,y), z ) ? Nats2 ? Nats z
x y
25
Block Diagram
Bools
Bools
?
Bools
Bools
?
?
?
Bools
Bools
This cannot be written easily using ? .
26
Block Diagram
Bools
?
true
Bools
?
?
?
false
Bools
27
Block Diagram
Bools
false
?
true
Bools
?
?
?
false
true
Bools
28
Block Diagram
Bools
false
?
true
Bools
false
?
?
?
false
true
Bools
29
Block Diagram
Bools
false
?
true
Bools
false
?
?
true
?
false
true
Bools
30
Or System
?
Bools
?
Bools
?
?
?
Bools
domain (?) Bools2 range (?) Bools graph
(?) ( (x,y), z ) ? Bools2 ? Bools z x
? y
31
-
Or System
Bools
Bools
?
Bools
domain (?) Bools2 range (?) Bools graph
(?) ( (x,y), z ) ? Bools2 ? Bools z x
? y
32
Block Diagrams with Forks
?
?
?
?
33
Block Diagrams with Forks
?
?
true
?
?
false
34
Block Diagrams with Forks
f
?
?
true
?
?
false
35
Block Diagrams with Forks
f
t
?
?
true
?
?
false
f
36
Block Diagrams with Forks
f
t
?
?
true
?
true
?
false
f
37
Joins are illegal
?
?
?
38
Joins are illegal
?
true
?
?
false
39
Joins are illegal
f
?
true
?
?
?
false
t
40
Multiple Outputs
Nats
Nats0
f
Nats0
Nats
f Nats2 ? Nats02 such that ?x,y?Nats, f (x,y)
(q,r)?Nats02 x q y r ? r lt y
41
Division System
Nats
Nats0
quotient
1
1
divide
2
remainder
2
Nats0
Nats
divide Nats2 ? Nats02 such that ?x,y?Nats,
divide (x,y) (q,r)?Nats02 x q y r ?
r lt y
42
Division System
Nats
Nats0
7
1
1
divide
3
2
2
Nats0
Nats
divide Nats2 ? Nats02 such that ?x,y?Nats,
divide (x,y) (q,r)?Nats02 x q y r ?
r lt y
43
Division System
Nats
Nats0
7
2
1
1
divide
3
2
1
2
Nats0
Nats
divide Nats2 ? Nats02 such that ?x,y?Nats,
divide (x,y) (q,r)?Nats02 x q y r ?
r lt y
44
Division System
Nats
Nats0
3
1
1
divide
7
2
2
Nats0
Nats
divide Nats2 ? Nats02 such that ?x,y?Nats,
divide (x,y) (q,r)?Nats02 x q y r ?
r lt y
45
Division System
Nats
Nats0
3
0
1
1
divide
7
2
3
2
Nats0
Nats
divide Nats2 ? Nats02 such that ?x,y?Nats,
divide (x,y) (q,r)?Nats02 x q y r ?
r lt y
46
Division System
Nats
Nats0
9
3
1
1
divide
3
2
0
2
Nats0
Nats
divide Nats2 ? Nats02 such that ?x,y?Nats,
divide (x,y) (q,r)?Nats02 x q y r ?
r lt y
47
Many possible implementations
divide
Nats
Nats0
1
1
C program for Euclids algorithm
2
2
Nats0
Nats
divide Nats2 ? Nats02 such that ?x,y?Nats,
divide (x,y) (q,r)?Nats02 x q y r ?
r lt y
48
Many possible implementations
divide
Nats
Nats0
1
1
circuit
2
2
Nats0
Nats
divide Nats2 ? Nats02 such that ?x,y?Nats,
divide (x,y) (q,r)?Nats02 x q y r ?
r lt y
49
Block diagrams can hide outputs
Nats
1
1
divide
Bools
2
2
zerocheck
Nats
zerocheck Nats0 ? Bools such that ?x?Nats,
zerocheck (x) ? x 0 .
50
Block Diagrams can hide outputs
Nats
1
1
divide
Bools
2
2
zerocheck
Nats
zerocheck Nats0 ? Bools such that ?x?Nats,
zerocheck (x) ? x 0 .
51
Block Diagrams can hide outputs
Nats
1
Bools
divisible
2
Nats
divisible Nats2 ? Bools such that ?x,y?Nats,
divisible (x,y) ? ( ?q?Nats, x q y ) .
52
Hidden inputs are illegal, for now
?
53
Hidden inputs are illegal, for now
?
?
true
54
Constant functions have no inputs
true
?
55
Constant function
true
true
?
true
true
56
Cycles are illegal, for now
divide
57
Block Diagrams
-are nested, directed, acyclic graphs -allow
compositional, hierarchical system description
58
Quiz
1. ? set x, x ? P(x) 2. ? function f, x
? domain (f) x f(x) 3. ? n ? Nats, n
2 ? ( n, n1 ) ? 1, 2, 3 2 4. ? f ? Nats
? Nats, f(x) x 2
Write a Comment
User Comments (0)
About PowerShow.com