Presentation is loading. Please wait.

Presentation is loading. Please wait.

Electronic Homework Submission and Grading

Similar presentations


Presentation on theme: "Electronic Homework Submission and Grading"— Presentation transcript:

1 Electronic Homework Submission and Grading
What you do: Prepare assignment in Word, ppt, Notepad, or any program you like Or write on paper and scan it in to by the deadline What Nitin does: Convert electronic submission to images Use image editor to insert comments and grades graded assignments back in pdf format Creates and posts an audio-video solution file on the web site, that explains the answers to the problems step by step.

2 Benefits Don’t have to submit in person.
Faster turnaround time. Get graded assignments back in 2 days (Nitin commits to this ). No worries about lost assignments. There is an electronic trail/copy. Save paper. Uses computers to (hopefully) improve how things are done traditionally.

3 Memory

4 Memory The logic and arithmetic circuits we’ve seen so far have no memory. They just transform input to output. Can we make circuits that remember?

5 The Stubborn Guy Matt really likes Sue, but he doesn’t like changing his mind… So: Matt decides to go to the party if Sue decides to go OR if he (Matt) had already planned to go.

6 He Needs Feedback (from Himself)
Matt decides to go to the party if Sue decides to go OR if he (Matt) had already planned to go. Two inputs to Matt’s decision: Sue, and his own state Sue OR Matt Feedback Wire

7 The Stubborn Guy: Feedback
Matt decides to go to the party if Sue decides to go OR if he (Matt) had already planned to go. If Sue decides to go... 1 Sue OR Matt

8 The Stubborn Guy: Feedback
Matt decides to go to the party if Sue decides to go OR if he (Matt) had already planned to go. If Sue decides to go, Matt will go. 1 Sue OR 1 Matt 1

9 The Stubborn Guy: Feedback
Matt decides to go to the party if Sue decides to go OR if he (Matt) had already planned to go. If Sue changes her mind… Sue OR 1 Matt 1

10 The Stubborn Guy: Feedback
Matt decides to go to the party if Sue decides to go OR if he (Matt) had already planned to go. If Sue changes her mind, Matt will still go! Once he decides to go, we can’t get him to change his mind Sue OR 1 Matt 1

11 Enter Rita Matt doesn’t like Rita
Matt decides to go to the party if Sue decides to go OR: If he (Matt) had already planned to go AND Rita decides NOT to go.

12 Enter Rita Matt doesn’t like Rita
Matt decides to go to the party if Sue decides to go OR: If he (Matt) had already planned to go AND Rita decides NOT to go. Sue OR Matt AND Rita Feedback Wire

13 Enter Rita Matt doesn’t like Rita
Matt decides to go to the party if Sue decides to go OR: If he (Matt) had already planned to go AND Rita decides NOT to go. Sue OR Matt 1 AND Rita

14 Enter Rita Matt doesn’t like Rita
Matt decides to go to the party if Sue decides to go OR: If he (Matt) had already planned to go AND Rita decides NOT to go. Sue 1 OR Matt 1 AND Rita

15 Enter Rita Matt doesn’t like Rita
Matt decides to go to the party if Sue decides to go OR: If he (Matt) had already planned to go AND Rita decides NOT to go. Sue 1 OR 1 Matt 1 AND 1 Rita 1

16 Enter Rita Matt doesn’t like Rita
Matt decides to go to the party if Sue decides to go OR: If he (Matt) had already planned to go AND Rita decides NOT to go. Sue OR 1 Matt 1 AND 1 Rita 1

17 Enter Rita Matt doesn’t like Rita
Matt decides to go to the party if Sue decides to go OR: If he (Matt) had already planned to go AND Rita decides NOT to go. Sue 0 – nothing changes: Sue can make Matt go, but cannot make him not go OR 1 Matt 1 AND 1 Rita 1

18 Enter Rita Matt doesn’t like Rita (maybe together they can make him not go) Matt decides to go to the party if Sue decides to go OR: If he (Matt) had already planned to go AND Rita decides NOT to go. Sue OR 1 Matt 1 AND 1 Rita 1 1

19 Enter Rita Matt doesn’t like Rita
Matt decides to go to the party if Sue decides to go OR: If he (Matt) had already planned to go AND Rita decides NOT to go. Sue OR 1 Matt AND 1 Rita 1 1

20 Enter Rita Matt doesn’t like Rita
Matt decides to go to the party if Sue decides to go OR: If he (Matt) had already planned to go AND Rita decides NOT to go. Sue OR 1 Matt AND Rita 1 1

21 Enter Rita Matt doesn’t like Rita
Matt decides to go to the party if Sue decides to go OR: If he (Matt) had already planned to go AND Rita decides NOT to go. Sue OR Matt AND Rita 1 1

22 Enter Rita Matt doesn’t like Rita
Matt decides to go to the party if Sue decides to go OR: If he (Matt) had already planned to go AND Rita decides NOT to go. Sue OR Matt AND Rita 1

23 Enter Rita Matt doesn’t like Rita
Matt decides to go to the party if Sue decides to go OR: If he (Matt) had already planned to go AND Rita decides NOT to go. Sue OR Matt AND Rita

24 Enter Rita Matt doesn’t like Rita
Matt decides to go to the party if Sue decides to go OR: If he (Matt) had already planned to go AND Rita decides NOT to go. Sue OR Matt 1 AND Rita - no change

25 What Sue and Rita Can Do Sue can make Matt go, but cannot make him not go Rita can make Matt not go, but cannot make him go

26 The (SR) Flip-Flop OR AND M becomes 1 if Set is turned on
Reset M becomes 1 if Set is turned on M becomes 0 if Reset is turned on Otherwise (if both are 0), M just remembers its value

27 The (SR) Flip-Flop: Abstraction
M R M becomes 1 if Set is turned on M becomes 0 if Reset is turned on Otherwise (if both are 0), M just remembers its value

28 What We Really Want D M W Nothing happens unless Write = 1
If Write = 1, then M becomes set to D Once Write = 0 again, M just keeps its value. (It ignores D.) So, to set M to a value and store it as long as desired, set D to that value, then set W to 1 and then back to 0

29 The Data Flip-Flop AND S D Write M AND R
Nothing happens unless Write = 1

30 The Data Flip-Flop AND S D Write M AND R
Nothing happens unless Write = 1 If Write = 1, then M becomes set to D Once Write = 0 again, M just keeps its value. (It ignores D.)

31 Using a Data Flip-Flop AND S D Write 1 M AND R
S D Write 1 M AND R Initially, Write = 0. Let’s say M = 1.

32 Using a Data Flip-Flop AND S D Write 1 M AND R 1
S D Write 1 M AND R 1 Initially, Write = 0. Let’s say M = 1. First, set D to desired value, say 0.

33 Using a Data Flip-Flop AND S D Write 1 1 M AND R 1 1
S D Write 1 1 M AND R 1 1 Initially, Write = 0. Let’s say M = 1. First, set D to desired value, say 0. Then, set Write to 1.

34 Using a Data Flip-Flop AND S D Write 1 M AND R 1 1
S D Write 1 M AND R 1 1 Initially, Write = 0. Let’s say M = 1. First, set D to desired value, say 0. Then, set Write to 1. This causes M to be reset to 0. Note use of abstraction with regard to SR flip-flop

35 Using a Data Flip-Flop AND S D ? Write M AND R 1
S D ? Write M AND R 1 Initially, Write = 0. Let’s say M = 1. First, set D to desired value, say 0. Then, set Write to 1. This causes M to be reset to 0. Finally set Write back to 0. Now D is irrelevant.

36 The Data Flip-Flop D M Write
If Write = 0, M just keeps its value. (It ignores D.) If Write = 1, then M becomes set to D

37 Are We Done?

38 A Subtle Problem D M ?? Write When Write = 1, then M = D.
If we have some feedback between M and D, then circuit could go haywire.

39 A Subtle Problem ? D ? M 1 Write
NOT M 1 Write For example, suppose a NOT gate connects M and D. When Write = 1, M and D keep changing. We have no control.

40 A Subtle Problem ? D ? M 1 Write
NOT M 1 Write We want to control the feedback, so that each time we set Write to 1 and then back to 0, M stores only the last value of D (In this case, M should invert itself once each time we set Write to 1 and back to 0)

41 The “Airlock” Flip-Flop
“Outer door” “Inner door” M D D0 M0 D1 M1 Write W0 W1 Two-Stage System to prevent D ever passing through directly to M (W0,W1 connected by NOT, so never 1 at the same time)

42 The “Airlock” Flip-Flop
“Outer door” “Inner door” D M D0 M0 D1 M1 Write W0 W1 We start with Write = 0. Let’s say D is always NOT M; i.e. connected by NOT gate. Start with D = 0, M = 1.

43 The “Airlock” Flip-Flop
“Outer door” “Inner door” D 1 1 M D0 M0 D1 M1 1 Write W0 W1 We start with Write = 0. Let’s say D is always NOT M; i.e. connected by NOT gate Start with D = 0, M = 1.

44 The “Airlock” Flip-Flop
“Outer door” “Inner door” M D 1 1 D0 M0 D1 M1 Write 1 W0 W1 Want to store D in memory. Set Write to 1

45 The “Airlock” Flip-Flop
“Outer door” “Inner door” 1 M D D0 M0 D1 M1 Write 1 W0 W1 Want to store D in memory. Set Write to 1 “Outer” flip-flop sets M0 = D0 = 0 “Inner” flip-flop ignores D1 since W1 = 0

46 The “Airlock” Flip-Flop
“Outer door” “Inner door” 1 M D D0 M0 D1 M1 1 Write W0 W1 Now, set Write back to 0

47 The “Airlock” Flip-Flop
“Outer door” “Inner door” M D D0 M0 D1 M1 1 Write W0 W1 Now, set Write back to 0 Now “Inner” flip-flop sets M = D1 = 0

48 The “Airlock” Flip-Flop
“Outer door” “Inner door” 1 D M D0 M0 D1 M1 1 Write W0 W1 Because of feedback, D might change to (NOT M) , which is 1 But Write = 0, so “Outer” flip-flop ignores D, so M0 stays 0.

49 The “Airlock” Flip-Flop
“Outer door” “Inner door” 1 M D D0 M0 D1 M1 1 Write W0 W1 So memory does not change until we “toggle” Write. (“toggle” means change from 0 to 1 or vice versa)

50 The “Airlock” Flip-Flop
“Outer door” “Inner door” D M D0 M0 D1 M1 Write W0 W1 This is Real Memory!

51 Memory “Register”: 4 bits
Data1 D M W Data2 D M W Data3 D M W Data4 D M Write W

52 Review We have used the Universal method to build Next steps ALU
Memory Next steps State machines to computer with memory Building the computer Writing a program to use the computer

53 Our First Real System

54 On our way to building a computer…
Review On our way to building a computer… Logic Circuits: Universal Method Represent Info with 0’s & 1’s (aka bits) 0’s & 1’s Memory Circuits Computers We are here

55 The System Clock “500 Mhz Pentium III computer…”
What does “500 Mhz” mean? It refers to the speed of the System Clock. (actually this is only one of the clocks…) All digital systems have such “Clocks,” even traffic lights and elevator control systems.

56 Clocks: Some Terminology
Think of System Clock as a heart. How fast it beats is measured in Hertz (Hz) which means “cycles per second” Prefixes: Kilo = 1,000 Mega = 1,000,000 Giga = 1,000,000,000

57 The System Clock (cont.)
Rough idea: System takes a “step” every time the System Clock beats. We’ll see how this works in an example. In real life, Clock is a Quartz crystal, which sends out 0’s and 1’s on a wire. In every cycle, it changes from 0 to 1 and back to 0

58 The System Clock (cont.)
Rough idea: System takes a “step” every time the System Clock beats. We’ll see how this works in an example. In real life, Clock is a Quartz crystal, which sends out 0’s and 1’s on a wire. In every cycle, it changes from 0 to 1 and back to 0 1

59 The System Clock (cont.)
Rough idea: System takes a “step” every time the System Clock beats. We’ll see how this works in an example. In real life, Clock is a Quartz crystal, which sends out 0’s and 1’s on a wire. In every cycle, it changes from 0 to 1 and back to 0

60 The System Clock (cont.)
Rough idea: System takes a “step” every time the System Clock beats. We’ll see how this works in an example. In real life, Clock is a Quartz crystal, which sends out 0’s and 1’s on a wire. In every cycle, it changes from 0 to 1 and back to 0 1

61 The System Clock (cont.)
Rough idea: System takes a “step” every time the System Clock beats. We’ll see how this works in an example. In real life, Clock is a Quartz crystal, which sends out 0’s and 1’s on a wire. In every cycle, it changes from 0 to 1 and back to 0

62 The System Clock (cont.)
Rough idea: System takes a “step” every time the System Clock beats. We’ll see how this works in an example. In real life, Clock is a Quartz crystal, which sends out 0’s and 1’s on a wire. In every cycle, it changes from 0 to 1 and back to 0 1

63 The System Clock (cont.)
Rough idea: System takes a “step” every time the System Clock beats. We’ll see how this works in an example. In real life, Clock is a Quartz crystal, which sends out 0’s and 1’s on a wire. In every cycle, it changes from 0 to 1 and back to 0

64 The System Clock (cont.)
Rough idea: System takes a “step” every time the System Clock beats. We’ll see how this works in an example. In real life, Clock is a Quartz crystal, which sends out 0’s and 1’s on a wire. In every cycle, it changes from 0 to 1 and back to 0 1

65 The System Clock (cont.)
Rough idea: System takes a “step” every time the System Clock beats. We’ll see how this works in an example. In real life, Clock is a Quartz crystal, which sends out 0’s and 1’s on a wire. In every cycle, it changes from 0 to 1 and back to 0

66 Our System: A Traffic Light

67 A Traffic Light Intersection of two one-way roads

68 A Traffic Light Intersection of two one-way roads A B Car Sensors

69 Traffic Light System Clock
Traffic Lights don’t have to act very fast. Let’s say the System Clock only beats once every 4 seconds. This is 0.25 Hz. (about 10 Billion times slower than a PC)

70 Traffic Light Design How do we go about designing the Traffic Light?
First, let’s think about all the possible States of the traffic light.

71 Traffic Light Intersection of two one-way roads A B

72 Light A Light B

73 Possible States Light A Light B

74 Possible States Light A Light B

75 Possible States Light A Light B

76 Possible States Light A Light B

77 Actually Only 4 Possibilities
Light A Light B

78 Traffic Light Design We figured out some possible States of the Traffic Light. Next, we should think logically about how the Traffic Light should behave. For now, we will try to keep it simple. (Suppose these are infrequently used country roads.)

79 How should the Light behave?
Car Sensors B A Light A Light B

80 Traffic Light Behavior
IF A=1 AND B=0 Car Sensors B A

81 Traffic Light Behavior
Otherwise IF A=1 AND B=0 Car Sensors B A

82 Traffic Light Behavior
Otherwise IF A=1 AND B=0 Always Car Sensors B A

83 Traffic Light Behavior
Otherwise IF A=1 AND B=0 Always Car Sensors B A IF A=0 AND B=1 Otherwise

84 Traffic Light Behavior
Otherwise IF A=1 AND B=0 Always Always Car Sensors B A IF A=0 AND B=1 Otherwise

85 A B Traffic Light Behavior Otherwise Note: Clock beats
every 4 sec. So Light is Yellow for 4 sec. IF A=1 AND B=0 Always Always Car Sensors B A IF A=0 AND B=1 Otherwise

86 A B Traffic Light State Machine Otherwise Note: Clock beats
every 4 sec. So Light is Yellow for 4 sec. IF A=1 AND B=0 Always Always Car Sensors B A IF A=0 AND B=1 Otherwise


Download ppt "Electronic Homework Submission and Grading"

Similar presentations


Ads by Google