Administrivia - PowerPoint PPT Presentation

About This Presentation
Title:

Administrivia

Description:

Administrivia. Any new students? Has everyone been to the course web site? ... Nails, screws, bolts, pipes, ... How do we model the process ... – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 72
Provided by: davidd5
Category:

less

Transcript and Presenter's Notes

Title: Administrivia


1
Administrivia
  • Any new students?
  • Has everyone been to the course web site?
  • First assignment ready pick it up on web
  • Labs to begin Monday
  • Location 007 Friend
  • Details Pick up lab on web, read it, do it
  • Laptops or desktops?
  • Questions??

2
Building a computer
3
Why build a computer?
  • Curiosity
  • What really happens when I hit a key?
  • Necessity
  • Prerequisite to parts of the course
  • Breadth
  • Should understand whats changing the world

4
Why NOT build a computer?
  • Computers seem really complicated !
  • Pentium III has over 28 MILLION components
  • How can we hope to understand them ?

5
Questions in building a house
  • What are the basic components
  • 2x4s, I-beams, plasterboard, ..
  • Light fixtures, plumbing,
  • What is glue for combining them
  • Nails, screws, bolts, pipes,
  • How do we model the process
  • Architectural drawings, building codes,

6
Questions in building a computer
  • What are the basic components
  • Logic gates
  • What is glue for combining them
  • Wires to build circuits
  • How do we model the process
  • Architectural drawings, design rules,
  • Mathematical formulation

7
Details
  • Wires are made of silicon or chemicals
  • Crossing wires make transistors
  • Electrons either do or dont flow in wires
  • Think of light switches turning current on or off
  • Wire thickness currently about .135 micron
  • 1 micron 10-6 meters
  • Can fit 28 million transistors in less than 1x1
  • Design must follow fabrication rules
  • Non-crossing wires cant get too close
  • Mathematical abstraction Boolean algebra

8
What is Abstraction?
  • Ignoring / Hiding details to capture essential
    common features
  • Example for us Well ignore whether were
    talking about
  • A Pentium II or a Pentium III
  • A Mac or a PC
  • Instead, well focus on what really makes a
    computer a computer.

9
Abstraction (cont.)
  • Real Life Example Brush your teeth
  • Here, we ignore
  • What kind of toothbrush
  • What kind of toothpaste
  • What youre wearing
  • etc.
  • These things arent important!
  • Often called hand waving

10
Abstraction (cont.)
  • Abstraction allows us to understand things in a
    Modular fashion.
  • If we had to spell out everything we did, our
    lives would seem really complicated.
  • Same is true for computers.To understand them,
    we use abstraction.
  • Working bottom up.

11
Layers of Abstraction
  • Build more and more powerful tools out of simpler
    ones.

Really Simple Stuff
Computers
12
Layers of Abstraction (cont.)
  • Each layer corresponds to a beautiful Big Idea
    of computer science.
  • These ideas are the foundation for the digital
    revolution that everyone talks about.

13
Layers of Abstraction (cont.)
  • For Computers, What is theReally Simple Stuff?
  • Answer 0s and 1s

14
The secret lives of 0s and 1s
15
A Simple Logic Puzzle
  • Frank will go to the party if Ed goes
    AND Dan does NOT.
  • Dan will go if Bob does NOT go OR if Carole goes.
  • Ed will go to the party if Alice AND Bob go.
  • Alice and Bob decide to go,but Carol stays home.
  • Will Frank go to the party?

16
A Simple Logic Puzzle
  • Frank will go to the party if Ed goes
    AND Dan does NOT.
  • Dan will go if Bob does NOT go OR if Carole goes.
  • Ed will go to the party if Alice AND Bob go.
  • Alice and Bob decide to go,but Carol stays home.
  • Will Frank go to the party?
  • Answer YES

17
Using 0s and 1s
  • What do 0s and 1s mean?
  • For now, well take Natural meanings
  • For example, if we have a variable Alice
    forwhether Alice goes to the party,
  • If Alice goes, we write Alice 1
  • If Alice doesnt, we write Alice 0

0 False
1 True
18
Logic Gates
  • Computers are circuits made of Logic Gates.
  • Logic gates manipulate 0s and 1s (False and
    True) by letting electrons flow or not.
  • Well look at three types of Logic Gates
  • AND are all inputs true?
  • OR is one input true?
  • NOT flip the truth value

19
AND Gate
  • Zac will go to the party if Xena AND Yanni go.

X
Z
Y
X Y Z F F F F T F T F F T T
T
Truth Table
20
AND Gate (cont.)
  • Zac will go to the party if Xena AND Yanni go.

X
Z
Y
X Y Z 0 0 0 0 1 0 1 0 0 1 1
1
Truth Table
21
AND Gate (cont.)
  • AND Gate is a circuit that allows output current
    to flow if both inputs are flowing.

22
AND Gate (cont.)
X
is shorthand for
W
Z
X
Y
23
AND Gate (cont.)
W X Y Z 0 0 0 ? 0 0 1 ? 0 1 0 ? 0 1
1 ? 1 0 0 ? 1 0 1 ? 1 1 0 ? 1 1 1 ?
24
AND Gate (cont.)
W X Y Z 0 0 0 0 0 0 1 0 0 1 0 0 0 1
1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1
25
OR Gate
  • Zac will go to the party if Xena OR Yanni go.

X
Z
Y
X Y Z F F F F T T T F T T T
T
Truth Table
26
OR Gate (cont.)
  • Zac will go to the party if Xena OR Yanni go.

X
Z
Y
X Y Z 0 0 0 0 1 1 1 0 1 1 1
1
Truth Table
27
OR Gate (cont.)
  • OR Gate is a circuit that allows output current
    to flow if either input is flowing.

28
OR Gate (cont.)
W
Z
X
Y
is shorthand for
W
Z
X
Y
29
OR Gate (cont.)
W
Z
W X Y Z 0 0 0 ? 0 0 1 ? 0 1 0 ? 0 1
1 ? 1 0 0 ? 1 0 1 ? 1 1 0 ? 1 1 1 ?
X
Y
30
OR Gate (cont.)
W
Z
W X Y Z 0 0 0 0 0 0 1 1 0 1 0 1 0 1
1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1
X
Y
31
NOT Gate
  • Yanni will go to the party if Xena does NOT go.

Y
X
Shorthand
X
Y
X Y 0 1 1 0
Truth Table
32
NOT Gate (cont.)
  • NOT Gate is a circuit that reverse the sense of a
    flow.
  • Logical complement.

33
A Simple Logic Puzzle
  • Frank will go to the party if Ed goes
    AND Dan does NOT.
  • Dan will go if Bob does NOT go OR if Carole goes.
  • Ed will go to the party if Alice AND Bob go.
  • Alice and Bob decide to go,but Carol stays home.
  • Will Frank go to the party?

34
Logic Puzzle Circuit
Ed
Frank
Dan
Frank will go to the party if Ed goes
AND Dan does NOT.
35
Logic Puzzle Circuit (cont.)
Ed
Frank
Dan
Frank will go to the party if Ed goes
AND Dan does NOT.
36
Logic Puzzle Circuit (cont.)
Alice
Ed
Frank
Bob
Dan
Ed will go to the party if Alice AND Bob go.
37
Logic Puzzle Circuit (cont.)
Alice
Ed
Frank
Bob
Dan
Carole
Dan will go if Bob does NOT go OR if Carole goes.
38
Logic Puzzle Circuit (cont.)
1
Alice
Ed
Frank
1
Bob
Dan
0
Carole
Alice and Bob decide to go,but Carol stays home.
39
Logic Puzzle Circuit (cont.)
1
1
Alice
Ed
Frank
1
1
Bob
0
Dan
0
0
Carole
Evaluation
40
Logic Puzzle Circuit (cont.)
1
1
Alice
Ed
1
Frank
1
1
Bob
0
Dan
0
0
Carole
Evaluation
41
Logic Puzzle Circuit (cont.)
1
1
Alice
Ed
1
Frank
1
1
Bob
0
Dan
0
0
0
Carole
Evaluation
42
Logic Puzzle Circuit (cont.)
1
1
Alice
Ed
1
1
Frank
1
1
Bob
0
1
Dan
0
0
0
Carole
Evaluation
43
Logic Puzzle Circuit (cont.)
1
1
Alice
Ed
1
1
1
Frank
1
1
Bob
0
1
Dan
0
0
0
Carole
Evaluation Complete! Answer Frank goes to the
party.
44
Logic Puzzle Circuit (cont.)
1
Alice
Ed
Frank
1
Bob
Dan
1
Carole
What if Alice, Bob, and Carol all go to the
party?
45
Logic Puzzle Circuit (cont.)
1
1
Alice
Ed
1
1
0
Frank
1
1
Bob
0
0
Dan
1
1
1
Carole
What if Alice, Bob, and Carol all go to the
party?
Answer Frank does NOT go to the party!
46
Intermission
  • Is it all clear?
  • Should/Could we do another such problem?
  • Light controllers
  • Light fixture has 3 switches
  • Light is on if an odd number of the switches are
    on

47
Building Circuits
  • Suppose someone gives us an arbitraryTruth
    Table.
  • Can we build a circuit which satisfiesexactly
    that Truth Table?

48
Our Logic Puzzle
  • Frank will go to the party if Ed goes
    AND Dan does NOT.
  • Dan will go if Bob does NOT go OR if Carole goes.
  • Ed will go to the party if Alice AND Bob go.
  • Suppose we made the truth table forthis puzzle.

49
Logic Puzzle Circuit
Alice
Ed
Frank
Bob
Dan
Carole
The full circuit for the Logic Puzzle.
50
Logic Puzzle Circuit (cont.)
Alice Bob Carole Frank 0 0 0 0 0 0 1 0 0
1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 1 1
1 1 0
Note Frank goes only if AB1 and
C0
Truth Table for Logic Puzzle
51
Recall AND Gate
A B C F 0 0 0 0 0 0 1 0 0 1 0 0 0 1
1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1
52
Modified AND Gate
A
F
A B C F 0 0 0 0 0 0 1 0 0 1 0 0 0 1
1 0 1 0 0 0 1 0 1 0 1 1 0 1 1 1 1 0
B
C
53
Modified AND Gate
A
F
A B C F 0 0 0 0 0 0 1 0 0 1 0 0 0 1
1 0 1 0 0 0 1 0 1 0 1 1 0 1 1 1 1 0
B
C
Note Frank goes only if AB1 and
C0. The modified AND also solves the
Logic Puzzle!
54
Modified AND Gate
A
F
A B C F 0 0 0 0 0 0 1 0 0 1 0 0 0 1
1 0 1 0 0 0 1 0 1 0 1 1 0 1 1 1 1 0
B
C
?
55
Sure
A
F
A B C F 0 0 0 0 0 0 1 1 0 1 0 0 0 1
1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 0
B
C
56
Similarly
A
F
A B C F 0 0 0 0 0 0 1 0 0 1 0 1 0 1
1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 0
B
C
Similarly,we can makea circuit for any Truth
Tablewith only a single1 in its output.
57
Given Any Truth Table
First, make circuitsfor each row in Truth Table
witha 1 in the output.
A B C F 0 0 0 0 0 0 1 1 0 1 0 1 0 1
1 0 1 0 0 0 1 0 1 0 1 1 0 1 1 1 1 0
58
Any Truth Table (cont.)
A
A B C F 0 0 0 0 0 0 1 1 0 1 0 1 0 1
1 0 1 0 0 0 1 0 1 0 1 1 0 1 1 1 1 0
B
C
A
B
C
A
B
C
59
Any Truth Table (cont.)
A
Finally, combine themwith an OR gate.
B
C
A
F
B
C
A
B
C
60
Any Truth Table (cont.)
A
B
C
A
F
B
C
  • The only way for F1 is if at least ONE of
    AND gates outputs 1.
  • But each AND gate corresponds to a row
    in the Truth Table with a 1 in the output!

A
B
C
61
Any Truth Table (cont.)
A B C F 0 0 0 0 0 0 1 1 0 1 0 1 0 1
1 0 1 0 0 0 1 0 1 0 1 1 0 1 1 1 1 0
62
Another Example
First, make circuitsfor each row in Truth Table
witha 1 in the output.
A B C X 0 0 0 1 0 0 1 0 0 1 0 0 0 1
1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1
63
Another Example (cont.)
A
A B C X 0 0 0 1 0 0 1 0 0 1 0 0 0 1
1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1
B
C
A
B
C
64
Another Example (cont.)
A
Finally, combine themwith an OR gate.
B
C
X
A
B
C
65
Another Example
A B C X 0 0 0 1 0 0 1 0 0 1 0 0 0 1
1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1
66
Universality
  • Note same idea works no matter how manyinput
    variables.
  • So for ANY Truth Table we can write down,we can
    make a circuit for it using only 3 Logic Gates
    AND, OR, NOT
  • This gives us a very powerful tool !
  • Our first technical use of abstractionMake a
    circuit for that Truth Table.is something we
    can abstract and understand.

67
Further Issues
  • Some issues to think about on your own
  • We know that AND,OR, and NOT are universal we
    can make a circuit for any Truth Table using just
    these gates ! What else is universal?
  • Surprising answer There is a single gatecalled
    NAND which is universal all by itself !

68
NAND Gate
X
Z
Y
X
Z
Y
X Y Z 0 0 1 0 1 1 1 0 1 1 1
0
Truth Table
69
NOT from NAND Gate
X
Z
Fix Y at 1
Y
X
Z
X Y Z 0 0 1 0 1 1 1 0 1 1 1
0
1
X Y Z
0 1 1
1 1 0
Truth Table
Truth Table
70
Further Issues (cont.)
  • Some issues to think about on your own(if you
    want)
  • We saw two circuits for the Logic Puzzlethat
    both worked but one (the modified AND) was much
    simpler than the other.
  • Can you come up with methods for simplifying
    circuits?
  • This is important for efficiency when you are
    dealing with very very large Truth Tables (which
    we will be in the future).

71
Next Time Why are 0s and 1s allwe need?
Write a Comment
User Comments (0)
About PowerShow.com