class 13: digital logic

Post on 30-Nov-2014

664 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Shockley-can ValleyDescribing Functions with Truth TablesTuring Truth Tables into LogicMaking and3 and orQuiz 2 and Course Suggestions

TRANSCRIPT

Class 13: Digital Logic

cs1120 Fall 2011David Evans19 September 2011

2

Plan

Three-Bit AdderQuiz 2 Comments

3

The Only Magic: Transistors

control

source

output

Normal: Logical AND Inverted: Logical NOT

output = source control

control

source

output

always on

output = control

4

The Only Magic: Transistors

John Bardeen, Walter Brattain,William Shockley

Bell Labs, 1947Nobel Prize (Physics), 1956

5

Shockleycan Valley?

William Shockley (1910-1989)

Shockley Semiconductor(Mountain View, 1956)

1957: (Gordon Moore, Robert Noyce, 6 others)

1968: Gordon Moore,Robert Noyce, Arthur Rock

Intel sold 19,914,946,000,000,000 transistors in 2008!

(So, following Moore’s Law they probably sold 0.1 Quintillion this year)

391 San Antonio Road, Mountain View, California

6

Three-Bit Adder

10

1 1 0

A

R1 R0

B

C

Digital LogicAND NOT

7

“Truth Table”A B C R1 R0

How many different functions are there from 3 binary inputs to 2 binary outputs?

8

“Truth Table”A B C R1 R0

0 0 0 0 00 0 1 0 10 1 0 0 10 1 1 1 01 0 0 0 11 0 1 1 01 1 0 1 01 1 1 1 1

9

A B C R1 R0

0 0 0 0 00 0 1 0 10 1 0 0 10 1 1 1 01 0 0 0 11 0 1 1 01 1 0 1 01 1 1 1 1

R1 = (or (and (not A) B C) (and A (not B) C) (and A B (not C)) (and A B C))

R2 = (or (and (not A) (not B) C) (and (not A) B (not C)) (and A (not B) (not C)) (and A B C))

10

Course Aside

If you understand the last slide, you have satisfied the cs2330 (Digital Logic Design)

prerequisite for cs3330!

If you want to learn how to produce more efficient logic from a table like this, take cs2330.

11

A B C R1 R0

0 0 0 0 00 0 1 0 10 1 0 0 10 1 1 1 01 0 0 0 11 0 1 1 01 1 0 1 01 1 1 1 1

R1 = (or (and3 (not A) B C) (and3 A (not B) C) (and3 A B (not C)) (and3 A B C))

control

source

output

output = source control

output

control

output = control

12

A B C R1 R0

0 0 0 0 00 0 1 0 10 1 0 0 10 1 1 1 01 0 0 0 11 0 1 1 01 1 0 1 01 1 1 1 1

R1 = (or (and3 (not A) B C) (and3 A (not B) C) (and3 A B (not C)) (and3 A B C))

control

source

output

output = source control

B

A

C

(and3 A B C)

(and A B) (not A)

(and3 (not A) B C)

(and (not A) B)

13

A B R

0 0 00 1 11 0 11 1 1

B

A

C

(and3 A B C)

(and A B) (not A)

(and3 (not A) B C)

(and (not A) B)

How to make (or a b)?

14

(or a b) (not (and (not a) (not b)))

Augustus De Morgan (1806-1871)Did Ada know this?

15

“The mathematician and logician Augustus De Morgan, a friend of Babbage and of Lady Byron, became Ada’s teacher by post. He sent her exercises. She sent him questions and musings and doubts (…). Despite her naïveté, or because of it, he recognized a “power of thinking…so utterly out of the common way for any beginner, man or woman.” She had rapidly mastered trigonometry and integral and differential calculus, and he told her mother privately that if he had encountered “such power” in a Cambridge student he would have anticipated “an original mathematical investigator, perhaps of first rate eminence.”

James Gleick, The Information

16

Quiz 2, Question 2

According to Chapter 4 of The Information, August Ada Byron King: (check all that are true)

___ Was a mathematical prodigy who studied Euclid in her youth___ Was obsessed with a pegboard puzzle game (similar to the

one described at the end of Chapter 5 of the course book)___ Wrote the first published computer program___ Found programming to be easy and effortless___ Devised a recursive algorithm to compute Bernoulli numbers

17

“How multifarious and how mutually complicated are the considerations which the working of such an engine involve…. To adjust each to every other, and indeed even to perceive and trace them out with perfect correctness and success, entails difficulties whose nature partakes to a certain extent of those involved in every question where conditions are very numerous and inter-complicated.” …“I am in much dismay at having got into so amazing a quagmire & botheration….”Nine days later: “I find that my plans & ideas keep gaining in clearness, & assuming more of the crystalline & less & less of the nebulous form.”

Ada (quotes in The Information)

18

As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.

Maurice Wilkes, 1949

19

Quiz 2 Results

1

2

3

4

5

0 2 4 6 8 10 12 14 16

Below 2

37 out of 51 appear to be sort of doing readings

20

Definition of a List

Only 30 got this correct! (21 did not)

This is kind of pathetic! You will have a hard time with all of your list procedures if you have not internalized this definition.

I will ask this as a graded question on the next quiz. If more than a handful of people get it wrong, I will make the exam closed book so I can ask it on the exam.

21

6. What one change would most improve the course?

Easily Actionable suggestions:• Put numbers on the slides• Post notes before class (to enable digital

notetaking)I’ll try this, but I recommend paper notetaking

• Explain terms on the notes for referenceI’ll try to do this

22

6. What one change would most improve the course?

Less Actionable suggestions:“Align lectures with problem sets”, “More problems in class similar to

problem sets”, “More examples like the problem sets”, etc. I think we spend about 70% of class time doing examples like those you are expected to do on the problem sets.

“More explanations behind logic of programming, instead of just repeated examples”, “More depth in explaining new concepts”I think these are the opposite of the previous ones, but ask that if the logic behind an example is unclear you will stop me and ask questions.

“Make the homework and class problems build up to more complicated ones - I feel like they progressed too quickly, I need to get help from office hours to solve them” I think needing help is not a bad thing.There is a quick ramp up for PS2 and PS3.“Good news”: PS4 will not introduce anything new

23

6. What one change would most improve the course?

Possibly Actionable suggestions:“more group work on example problems”“I feel like the group work we do in Rice has

been really helpful especially with the problem sets. If it were possible to combine group work with lecture interspersed, that might also be helpful.”

24

6. What one change would most improve the course?

24 people provided no suggestion at all!

I will provide useful feedback. I realize that cs1120 is an evolving course and it is important that I let the course staff know what they need to improve the course. I will not wait until the end of the course to make the course staff aware of any problems. I will provide feedback either anonymously or by contacting the course staff directly. I will fill out all course evaluation surveys honestly and thoroughly.

You can redeem yourself by either:(1) posting a suggestion on the course

blog(2) emailing me a suggestion privately(3) if you really think everything is

perfect, either (a) post a comment arguing against

other suggested changes(b) post a comment about the ElevenLearning on-line system

Yes, I do know who the 24 people are!

25

Quiz 2, Question 1The purpose of Charles Babbage’s Difference Engine (his first major machine described in Chapter 4 of The Information) was to: (check the one best answer): ___ Solve Differential Equations,

useful for computing ballistic tables___ Generate Logarithmic Tables,

important for calculations needed to navigate ships___ Generate Odds Tables, for use in horse racing betting___ Generate Taxation Tables,

important for the Treasury to collect revenues

26

Nevil Maskelyne5th English Astronomer Royal, 1765-1811

Image: National Maritime Museum, London

27

Image: Michael Daly, Wikimedia Commons

28

Input

Maskelyne’s Redundant ComputingData Diversity

“Anti-Computer”

“Computer”

“Comparer”

Data for computing

positions at noon

Data for computing

positions at midnight

Note: my research group has worked on doing this with modern computers.

29

Babbage’s Review

“I wish to God these calculations had been executed by steam.”Charles Babbage, 1821

top related