CPS 1 - Spring, 1997 - Ramm 3/14/97 #24
Chapter 9. Machine Architecture
- Looping Example
-
summer.as
- Factorial Example (Iterative)
-
fact.as
- Fancier Architecture (it would be nice to have ...)
- (Actually can do everything with these few instructions!)
- Need for more registers
- Dealing with tables (arrays): Indexing
Chapter 6. Electric Circuits
- Levels of a Computer System
- Pascal on down...
- Machine Architecture
- Electric Circuits
- Circuits: Water Model
- reservoir
- pump
- paddle wheel/turbine
- Circuits: the real thing = electrons
- battery
- generators
- heat -> light
- motors
- Circuits With Switches (e.g. knife switch)
- Logic/Truth Tables
- and: z = x and y
| x | y | | z
|
|---|
| 0 | 0 | | 0
|
| 0 | 1 | | 0
|
| 1 | 0 | | 0
|
| 1 | 1 | | 1
|
- or: z = x or y
| x | y | | z
|
|---|
| 0 | 0 | | 0
|
| 0 | 1 | | 1
|
| 1 | 0 | | 1
|
| 1 | 1 | | 1
|
- not: z = not x
- Implementing Logic with Switches
- Logical (Boolean) Expression
- Equivalence of:
- Circuit with Switches
- Truth Tables
- Boolean Expression
- Example: Truth table for f(x,y,z)
- f(x, y, z)
| x | y | z | | f
|
|---|
| 0 | 0 | 0 | | 0
|
| 0 | 0 | 1 | | 1
|
| 0 | 1 | 0 | | 1
|
| 0 | 1 | 1 | | 0
|
| 1 | 0 | 0 | | 1
|
| 1 | 0 | 1 | | 0
|
| 1 | 1 | 0 | | 0
|
| 1 | 1 | 1 | | 0
|
- F = X'*Y'*Z + X'*Y*Z' + X*Y'*Z'