Difference between revisions of "CSC103 2011 Take-Home Final Exam"
(→Problem #1: Boolean Logic (25 points)) |
|||
(17 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
<br \>[[File:UnderConstruction.jpg|300px]] | <br \>[[File:UnderConstruction.jpg|300px]] | ||
</center--> | </center--> | ||
− | + | ||
− | + | <onlydft> | |
<tanbox> | <tanbox> | ||
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 '''noon''' on Friday March 11, 2011. | 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 '''noon''' on Friday March 11, 2011. | ||
− | You cannot discuss the details of this exam with anyone except your prof. The TAs are not allowed to help you out with exam material in any way. Questions will only be answered in two ways: in person, in class only. Outside class time, only via email. If you have questions regarding the exam and cannot wait until the next class time, or if the last class has already been given, then you should send your question(s) via email to [mailto:thiebaut@cs.smith.edu thiebaut@cs.smith.edu], and the question and its answer will be broadcast back to the | + | The work has to be done individually, not in a group. You cannot discuss the details of this exam with anyone except your prof. The TAs are not allowed to help you out with exam material in any way. Questions will only be answered in two ways: in person, in class only. Outside class time, only via email. If you have questions regarding the exam and cannot wait until the next class time, or if the last class has already been given, then you should send your question(s) via email to [mailto:thiebaut@cs.smith.edu thiebaut@cs.smith.edu], and the question and its answer will be broadcast back to the whole 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].''' | '''The exam is given under the rules of the Smith College [http://www.smith.edu/sao/handbook/socialconduct/honorcode.php Honor Code].''' | ||
Line 19: | Line 19: | ||
<br /> | <br /> | ||
<br /> | <br /> | ||
+ | |||
=Problem #1: Boolean Logic (25 points)= | =Problem #1: Boolean Logic (25 points)= | ||
− | The three equations below represent three different logic expressions using '''and''', '''or''' and '''not''' gates of | + | The three equations below represent three different logic expressions using '''and''', '''or''' and '''not''' gates of two boolean variables A, B. A boolean variable can take only one of two possible values: True or False. |
− | Which of the two expressions are identical, meaning that for any combination of A | + | Which of the two expressions are identical, meaning that for any combination of A and B they are both True or both False. |
Line 31: | Line 32: | ||
* Expression 2: (A and (not B)) and ( B and ( not A )) | * Expression 2: (A and (not B)) and ( B and ( not A )) | ||
− | * Expression 3: (A or B ) and ( not ((A and B )) | + | * Expression 3: (A or B ) and ( not ((A and B ))) |
− | In your answer explain how you figure out which expression is different (in terms of its output given the same combination of A, B | + | In your answer explain how you figure out which expression is different (in terms of its output given the same combination of A, and B from the other two. |
− | Remember that you have a nice circuit simulator available to you to check circuits (See [[CSC103_Lab_1_2011 | Lab #1]) | + | Remember that you have a nice circuit simulator available to you to check circuits (See [[CSC103_Lab_1_2011 | Lab #1]]) |
=Problem #2: Assembly (25 points)= | =Problem #2: Assembly (25 points)= | ||
− | |||
− | + | Write an assembly language program that uses ten memory locations (variables) filled with 0, starting at Address 30, and that stores the values 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, and 22 in them. Your program will store 2 at Address 30, 4 at address 31, 6 at address 32, etc. | |
+ | |||
+ | |||
+ | Your program should contain the following lines to initialize the ten memory locations | ||
+ | |||
@30 | @30 | ||
Line 57: | Line 61: | ||
0 | 0 | ||
− | + | ||
− | + | Your program must use a loop. | |
− | + | ||
+ | Use the [[CSC103_2011_Homework_3_Solution | solution programs]] for Homework #3 as examples of good formats and good documentation. | ||
+ | |||
+ | You are encouraged to use labels, as they make the programs more readable, but if you prefer not to use labels, you will not be penalized. | ||
=Problem #3: Javascript (25 points)= | =Problem #3: Javascript (25 points)= | ||
− | + | Write a '''javascript''' program that computes the sum of all the even numbers between 0 and 100, 100 included, and stores the result in a variable called '''sumEven'''. The same program will also compute the sum of all the multiples of 5 between 0 and 100, 100 included. This second number will be stored in a variable called '''sum5'''. | |
− | + | Use the programs from the [[CSC103_Lab_4_Solution_2011| Lab 4 solution]] page for inspiration in terms of organization and documentation. | |
=Problem #4: Essay (25 points)= | =Problem #4: Essay (25 points)= | ||
Line 87: | Line 94: | ||
(Even for the most technical document, these 3 sections are always a good source of information, even for the lay person.) | (Even for the most technical document, these 3 sections are always a good source of information, even for the lay person.) | ||
+ | |||
Make sure as well that you know when the article was published (it shouldn't be more than a couple month old) as well as where it was written (computer research lab, university or other). | Make sure as well that you know when the article was published (it shouldn't be more than a couple month old) as well as where it was written (computer research lab, university or other). | ||
+ | |||
Write a '''one-page, single-spaced summary''' of the news article, where you will state: | Write a '''one-page, single-spaced summary''' of the news article, where you will state: | ||
Line 93: | Line 102: | ||
* what aspect of computing it is supposed to enhance, or what problem it is supposed to solve, | * what aspect of computing it is supposed to enhance, or what problem it is supposed to solve, | ||
* in which way it connects to Moore's law, or to the von Neumann architecture, if at all, and | * in which way it connects to Moore's law, or to the von Neumann architecture, if at all, and | ||
− | * what outcome | + | * what outcome is expected from this new discovery/research effort. |
+ | |||
You should also make sure that you include references | You should also make sure that you include references | ||
Line 112: | Line 122: | ||
Good luck! | Good luck! | ||
− | + | </onlydft> | |
<br /> | <br /> | ||