Difference between revisions of "CSC103 Final Exam"
(→Question 1) |
|||
(21 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | <onlydft> | ||
+ | '''This final exam is take-home'''. It is open-books, open-notes, and open-Web. ''' It is due''' a week after it is made available, '''at 9:00 a.m.''' on Wed. '''October 15''', 2008. | ||
+ | |||
+ | '''You cannot discuss the details of this exam with anyone except your instructor'''. The TAs are not allowed to help you out in any way. No question will be answered in person after 10:20 a.m. on 10/08/08. Instead, if you have questions regarding the exam, you are to send them via email to [mailto:thiebaut@cs.smith.edu thiebaut@cs.smith.edu], and the question and its answer will be broadcast back to the hole class via email. | ||
+ | |||
+ | '''The exam is given under the rules of the Smith College [http://www.smith.edu/sao/handbook/socialconduct/honorcode.php Honor Code].''' | ||
+ | |||
+ | Make sure you reference all work/resources you use to answer the questions below. | ||
+ | <br /> | ||
+ | <br /> | ||
+ | <br /> | ||
+ | <br /> | ||
+ | <br /> | ||
+ | <br /> | ||
+ | |||
==Problem #1== | ==Problem #1== | ||
===Question 1=== | ===Question 1=== | ||
Line 7: | Line 22: | ||
Your program should output the number of grains of rice on the 64th square '''only''', and their total volume expressed in''' cubic miles'''. Its output should look something like this: | Your program should output the number of grains of rice on the 64th square '''only''', and their total volume expressed in''' cubic miles'''. Its output should look something like this: | ||
+ | |||
+ | |||
+ | ::<font color="red">'''Important Note:'''</font> If you are working off campus, you can very easily do this problem without having to access your H: drive. Assuming you are working on a Windows machine, simply use Notepad and store your HTML file to your desktop. Then double-click on the new icon just created on your desktop, and your default browser should open up and display your HTML file. Just make sure that your browser is set to allow Javascript code inside html pages. | ||
+ | <br> | ||
+ | <br> | ||
+ | <br> | ||
+ | <br> | ||
[[Image:CSC103_Rice_Chessboar1.png]] | [[Image:CSC103_Rice_Chessboar1.png]] | ||
Line 34: | Line 56: | ||
Write a second javascript program (modifying the first one) that computes the volume of '''all''' the grains of rice that would have to be put on all 64 squares of the the chess board, that is the volume of the sum of the grain on the first square, plus the grains on the second square, third, fouth, etc., all the way to the 64th square. | Write a second javascript program (modifying the first one) that computes the volume of '''all''' the grains of rice that would have to be put on all 64 squares of the the chess board, that is the volume of the sum of the grain on the first square, plus the grains on the second square, third, fouth, etc., all the way to the 64th square. | ||
− | Again, your answer should be in | + | Again, your answer should be in cubic miles, and the output of your javascript program should look something like this: |
[[Image:CSC103_Rice_Chess_2.png]] | [[Image:CSC103_Rice_Chess_2.png]] | ||
Line 41: | Line 63: | ||
Cut and paste your javascript program in your Word document. | Cut and paste your javascript program in your Word document. | ||
+ | |||
+ | ===Helpful Hints:=== | ||
+ | |||
+ | * First make your program run with 5 or 6 squares, not 64. Do the computations on paper first, by hand, to check if your program outputs the correct information. | ||
+ | |||
+ | * Make sure you do the the complete [[CSC103 Lab 3 | Javascript lab]], and check the solutions at the end of the lab (highlight the blank boxes to reveal the code!) | ||
+ | |||
+ | ==Problem #2== | ||
+ | |||
+ | First watch the first 45 minutes (until the question/answers section) of the Google Video "[http://video.google.com/videoplay?docid=-6421374843129726982&ei=m2XrSI-8MKP0qAL46JXgDA When computers were human]" of a talk given by Prof. David Grier on ''human computers''. | ||
+ | |||
+ | Then answer the following questions: | ||
+ | |||
+ | # When people mention women who were key in the development of early computers, some names always come up: '''Ada Lovelace''' [http://en.wikipedia.org/wiki/Ada_lovelace] is one of them. '''Grace Murray Hopper''' [http://en.wikipedia.org/wiki/Grace_Hopper] another one. However, in his talk, Grier shows that women were involved with computing in different ways that have not been widely popularised. Expend on two different examples given by Grier illustrating how women have been instrumental in the area of "computing." <br /> | ||
+ | # What was the purpose of having human computers in the beginning of the 20th century?<br /> | ||
+ | # In what ways were human computers similar to electronic computers? I am thinking here about the behavior and ways of organizing work exhibited by the human computers. | ||
+ | |||
+ | Please limit your answers to a maximum of one page of typed information for both answers. | ||
+ | |||
+ | ==Problem #3== | ||
+ | |||
+ | The textbook for the class illustrates a 1-bit memory cell with a circuit containing an inverter, an AND gate, and an OR gate. The circuit below is similar, except that it contains an extra inverter between the AND and the OR gate. | ||
+ | |||
+ | The simplest description of a 1-bit memory is that it is a circuit with two inputs that are normally in a predefined state, say both of the inputs are set to 1. When we change one of the inputs and switch it to 0, say, then the 1-bit circuit remembers this change so that when the input in question goes back to 1, the circuit ''remembers'' which input was last activated. | ||
+ | |||
+ | Does the circuit below behave as a 1-bit memory? In other words, can we activate one of the inputs to "store a 1" in the memory, and force its output to 1, and can we activate the other input to "store a 0" in the memory, and force its output to 0? | ||
+ | Another way of phrasing this question could be: Does the circuit remember what input signal was last energized? | ||
+ | |||
+ | Clearly explain why you think this circuit is a memory bit, or why you think it cannot be used as one. | ||
+ | |||
+ | [[Image:CSC103_MemoryBitOption.png]] | ||
+ | |||
+ | </onlydft> |