Name:__________Answer key ______________ ID: ___________________________________ ECS 15: Introduction to Computers Sample Midterm You can complete this exam and turn it in as a .doc or .docx file via smartsite for extra credit. The deadline is 11pm on Tues, Feb 14. I highly recommend you work on your own: your midterm will obviously have to be solo work. You may ask questions on smartsite chatroom about how to approach problems. Indicate your answer to a multiple-choice question by changing the text to red for that option in this Word document. For instance: 0) Which of the following is not a requirement for ECS15: a. Understand the basics of how computers work b. Learn critical thinking and critical scientific writing c. Build a programming language from scratch d. Learn how to write a computer program -----------------------------------------------------------------Notes: 1) The midterm is open book, open notes. 2) Please write your name at the top right of each page you turn in! 3) Please, check your work! If possible, show your work when multiple steps are involved. Part I (these questions are multiple choices; in each case, find the most plausible answer) 1) An operating system is: a. a maintenance program should the computer crash b. the firmware stored on ROM to boot the system c. the software that manages the sharing of the resources of a computer d. another name for the manual that explains how to use the computer 2) How much memory is one kilobyte? a. 1000 bytes b. One million bytes c. 210 = 1024 bytes. d. About 100,000 bytes 3) How many machine cycles can execute per second on a modern computer? a. One cycle per second b. 100,000 cycles per second c. Billions of cycles per second d. Exactly two cycles per second 1 Name:__________Answer key ______________ ID: ___________________________________ 4) What is source code? a. The original programs written when computers were invented, that still serve as source to all current programs b. The first hardcopy ever made of a program c. Code specifically written for the operating system d. A text file written by a programmer containing instructions usually written in a high level language 5) Which of these would not usually be on a motherboard? a. Memory b. Power supply unit (a connector for the unit is on the motherboard but not the unit itself) c. CPU d. PCI bus 6) A computer’s BIOS does not: a. Shutdown the computer b. Identify component hardware c. Prepare the computer so that other programs can load and execute d. Be loaded first when the computer is turned on 7) Python is: a. an operating system b. a compiled language c. a firmware d. an interpreted language 8) Current hard drive sizes are expressed in: a. kilobytes (KB) b. gigabytes (GB) c. megabytes (MB) d. millibytes (MLB) 9) A computer program that converts an entire program into machine language is called a/an a. Commander b. Simulator c. Compiler d. Interpreter 10) Which of the following will happen when data is entered into a memory location? a. It is added to the current content at the location b. It is ignored, and the current content is maintained c. It is subtracted to the current content at the location d. It will erase and replace the previous content 2 Name:__________Answer key ______________ ID: ___________________________________ 11) The difference between memory and storage is that memory is …. and storage is ….. a. Permanent, temporary b. Temporary, permanent c. Slow, fast d. Hardware, software Part II Short answer 12) Consider the binary number 1110010. What is its hexadecimal equivalent? 1110010 in binary = 64+32+16+2=114 in base 10. 114 in base 10 = 72 in base 16. Answer: 72 13) Assume the human heart beats at 60 beats per minute. What is the rate of beating expressed in Hz? (60 beats/min)x(1 min/60 sec) = 1 beat/sec = 1 Hz 14) To get a correct measurement of a human heart’s dynamics, at what rate do you sample? (Express the answer in Hz.) Nyquist says sample at twice the highest frequency, so 2 Hz 15) Assume you have 8 bits for quantization, how many bits would be needed to record an hour of measurements from the human heart? (8bits)x(2/sec)x(60 min/hour)x(60 sec/min) = 57,600 bits (Note this equals 7,200 bytes) 3 Name:__________Answer key ______________ ID: ___________________________________ Part III A. For the next portion, examine the statement, indication if it is or is not a proposition. If it is a proposition, indicate its truth value (otherwise indicate N/A). Statement Proposition (Y or N) Y Y N Y N Y N 1+5=6 1+5=10 X+5=10 It is raining outside Is it raining outside? The moon is made of cheese This statement is false Part III B. T or F or N/A T F N/A F (at the moment) N/A F N/A Logical implications Consider the following propositions: P = You learn the basics of computers Q = You get a good job Assume the implication P -> Q is True. Assess whether the following statement is logically correct or logically flawed. 1) You have a good job, so you learned the basics of computers. a. Logically correct b. Logically flawed (it is trying to claim q therefore p) 2) You do not have a good job so you did not learn the basics of computers. a. Logically correct (not q therefore not p) b. Logically flawed 3) You did not learn the basics of computers so you do not have a good job. a. Logically correct b. Logically flawed (it is trying to claim not p therefore not q) 4 Name:__________Answer key ______________ ID: ___________________________________ Part IV 4.1 Look carefully at the logical circuit below, and complete the table. Remember: an input of 0 means switch off and no current flows, while an input of one means switch on and current flows. Output Input A Input B Input A Input B Output 1 1 1 1 0 1 0 1 1 0 0 0 4.2 What type of gate this is? ___________OR gate (1 if A or B) _______________ 5 Name:__________Answer key ______________ ID: ___________________________________ Part V The table below lists on the left devices that can be found inside a computer. For each of these devices, give their purpose (center column), and list in the right column what could happen if they would stop working. Device Purpose Possible problem Bus between the CPU and RAM Transport electronic signals from the Central Processing Unit (which executes all the commands) to the Random Access Memory where data to be operated upon is stored. Would not be able to get any new data to the CPU (only the data in cache would be accessible). Power supply Provides the electrical energy necessary for all components of the computer to operate. The computer would shut down and not operate. (If there were a battery backup, like in a laptop, it would operate until the battery was drained, then die.) BIOS EPROM chip This (read only) chip stores the firmware code (provided by the manufacturer) with all the instructions for the computer to initiate and run the boot up process. The computer would not boot up. 6