Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Solved Questions for Exam 1 - Computer Organization | CSCI 2150, Exams of Computer Architecture and Organization

Material Type: Exam; Professor: Tarnoff; Class: Computer Organization; Subject: Computer & Information Science (CSCI); University: East Tennessee State University; Term: Fall 2008;

Typology: Exams

Pre 2010

Uploaded on 08/18/2009

koofers-user-1l8
koofers-user-1l8 🇺🇸

5

(1)

10 documents

1 / 11

Toggle sidebar

Related documents


Partial preview of the text

Download Solved Questions for Exam 1 - Computer Organization | CSCI 2150 and more Exams Computer Architecture and Organization in PDF only on Docsity! Points missed: _____ Student's Name: _________________________________ Total score: _____ /100 points East Tennessee State University – Department of Computer and Information Sciences CSCI 2150 (Tarnoff) – Computer Organization TEST 1 for Fall Semester, 2008 Read this before starting! The total possible score for this test is 100 points. This test is closed book and closed notes Please turn off all cell phones & pagers during the test. You may NOT use a calculator. Leave all numeric answers in the form of a formula. You may use one sheet of scrap paper that you must turn in with your test. Please draw a box around your answers. This is to aid the grader. Failure to do so might result in no credit for answer. Example: 1 point will be deducted per answer for missing or incorrect units when required. No assumptions will be made for hexadecimal versus decimal versus binary, so you should always include the base in your answer. If you perform work on the back of a page in this test, indicate that you have done so in case the need arises for partial credit to be determined. Statement regarding academic misconduct from Section 5.7 of the East Tennessee State University Faculty Handbook, June 1, 2001: "Academic misconduct will be subject to disciplinary action. Any act of dishonesty in academic work constitutes academic misconduct. This includes plagiarism, the changing of falsifying of any academic documents or materials, cheating, and the giving or receiving of unauthorized aid in tests, examinations, or other assigned school work. Penalties for academic misconduct will vary with the seriousness of the offense and may include, but are not limited to: a grade of 'F' on the work in question, a grade of 'F' of the course, reprimand, probation, suspension, and expulsion. For a second academic offense the penalty is permanent expulsion." Basic Rules of Boolean Algebra OR AND XOR Combined w/0 AA 0 00A AA 0 Combined w/1 11A AA 1 AA 1 Combined w/self AAA AAA 0AA Combined w/inverse 1AA 0AA 1AA Other rules ABAA BABAA CBACABA )()( DeMorgan's Th. BABA BABA Short-ish Answer (2 points each unless otherwise noted) 1. For a system to reliably capture the frequency range from 250 Hz to 500 Hz, the system's sampling rate must be greater than __________. a.) 250 samples/sec. b.) 500 samples/sec. c.) 750 samples/sec. d.) 1000 samples/sec. The Nyquist rate is the minimum frequency required to sample a signal at in order to capture a desired frequency. The theorem states that you must sample at least twice as fast as the highest frequency you wish to capture. In this case, the highest frequency is 500 Hz which means that the sampling rate must be 2×500Hz = 1000 samples per second. 2. What is the frequency of the signal show to the right? (Note: 1 millisecond = 1 × 10 -3 seconds) Frequency is the inverse of the period, so the first thing we need to do is determine the period. The period is equal to the time of a full cycle, which in the figure to the right is 6 milliseconds plus 2 milliseconds. This gives us a measurement for the period of 8 milliseconds or 0.008 seconds. Therefore, the answer is: You could have left your answer as 1/(0.008) Hz if you wanted to, but I wanted to see the units of Hz to be sure that you knew the units for frequency. 3. The duty cycle for the previous problem is: a.) 25% b.) 33% c.) 40% c.) 50% d.) 66% e.) 75% f.) 100% Before doing this mathematically, let's look at this by beginning with the definition of duty cycle. The duty cycle is the percentage of time that a signal is high, i.e., a logic 1. Looking at the diagram for this problem we see that the signal is high only a quarter of the time or 25%. Therefore, A should be the answer. We can also look at it using the equation that represents duty cycle. Officially, the expression used to determine the duty cycle is: [ time high (th) / period (T) ] × 100% Since during a single period, the signal from the problem is high 0.002 seconds and low 0.006 seconds, then the duty cycle is (0.002 seconds ÷ (0.002 + 0.006 seconds) × 100% = 25%. 4. True or False: The frequency of a periodic signal can be calculated using only the duty cycle. Duty cycle is only a percentage of time that the signal is high. It doesn't refer to the rate at which the signal is changing back and forth between high and low. Therefore, the answer is FALSE. 2 milliseconds 6 milliseconds frequency = 1 1 period 0.008 seconds 125 cycles/seconds = 125 Hz = = 12. True or False: If the addition above is considered 8-bit unsigned, an overflow has occurred. False. A non-zero carry out of an unsigned binary addition is the indicator of an overflow. 13. In the boolean expression below, circle the single operation that would be performed first. DCBA )( It is the OR inside of the parenthesis that is executed first. It is executed even before the inversion, so if you selected the inversion too, you actually identified two operations and lost a point. 14. Multiply the 16-bit value 00001110111010002 by 8. Leave your answer in 16-bit binary. (Hint: Remember the shortcut!) Since 8 is a power of two, i.e., 8 = 2 3 , then the multiplication can be performed by simply shifting the binary number left 3 positions. This is the same thing as adding three zeros to the right hand side of the number. The additional bits are shown below in red. Note that the processor has a fixed size for storing the value, so three zeros were discarded from the left side. 01110111010000002 If you want to do things the hard way, you could have converted the numbers. 00001110111010002 equals 2 11 + 2 10 + 2 9 + 2 7 + 2 6 + 2 5 + 2 3 = 2048 + 1024 + 512 + 128 + 64 + 32 + 8 = 381610. Multiplying 381610 by 8 gives us 6105610. Wow! Okay, reversing the conversion process gives us 61056 = 2 14 + 2 13 + 2 12 + 2 10 + 2 9 + 2 8 + 2 6 which in binary is 011101110100000002. 15. Convert 11010000110111110111011112 to hexadecimal. Create the conversion table between binary and hex. (That table is shown to the right.) Next, partition the number to be converted into nibbles. You must do this starting from the right side with the least significant bits. Starting from the left might leave you with a partial nibble on the right side. The correct result is shown below: 0001 1010 0001 1011 1110 1110 11112 Notice that three leading zeros (in red) needed to be added to the left side. Each of these nibbles corresponds to a pattern from the table to the right. Now it just becomes a straight conversion. 1A1BEEF16 Binary Hexadecimal 0 0 0 0 0 0 0 0 1 1 0 0 1 0 2 0 0 1 1 3 0 1 0 0 4 0 1 0 1 5 0 1 1 0 6 0 1 1 1 7 1 0 0 0 8 1 0 0 1 9 1 0 1 0 A 1 0 1 1 B 1 1 0 0 C 1 1 0 1 D 1 1 1 0 E 1 1 1 1 F 16. Convert the unsigned binary value 0101002 to its corresponding 6-bit binary Gray code. (3 points) From page 39 of the textbook, we have the conversion sequence which says to begin by adding a leading zero to the number to be converted. For each boundary between bits, place a 1 if the bits on either side of the boundary are different and place a 0 if the bits on either side of the boundary are the same. Therefore, the answer is 011110. Medium-ish Answer (4 points each unless otherwise noted) 17. Convert the 32-bit IEEE 754 floating-point number 00111110110101100000000000000000 to its binary exponential format, e.g., –1.001010 x 2 -12 , (which, by the way, is not the answer). Begin by dividing up the floating-point number into its components. S E F 0 01111101 = 64 + 32 + 16 + 8 + 4 + 1 = 125 10101100000000000000000 Substituting into the expression +1.F x 2 (E-127) gives us our answer. +1.F 2 (E-127) = +1.101011 2 (125 – 127) = 1.101011 2 –2 = 0.01101011 = 0.41796875 The last step, converting to 0.01101011 = 0.41796875 was not necessary. 18. Convert 1011.1012 to decimal. (You may leave your answer in expanded form if you wish.) Remember that binary digits to the right of the point continue in descending integer powers relative to the 2 0 position. Therefore, the powers of two are in order to the right of the point 2 -1 = 0.5, 2 -2 = 0.25, 2 -3 = 0.125, and 2 -4 = 0.0625. (Note that 2 -4 is not needed for this problem.) Therefore, the answer is: 2 3 + 2 1 + 2 0 + 2 –1 + 2 –3 = 8 + 2 + 1 + 1/2 + 1/8 = 11 5/8 = 11.625 You could have left your answer in any of these forms in order to receive full credit. 2 4 2 3 2 2 2 1 2 0 2 -1 2 -2 2 -3 2 -4 0 1 0 1 1 1 0 1 0 0 1 0 1 0 0 Add zero to left- most side of the value to convert 0 1 1 1 1 Adjacent bits that are different generate a 1. Adjacent bits that are the same generate a 0 in the Gray code. 0 0 19. Draw the circuit exactly as it is represented by the Boolean expression CBBA . 20. Prove that 1AA . (Remember that is the XOR or exclusive-OR) For full credit, please show all steps in detail. The table below is all that is needed to prove the expression is true. The important part is that both the columns for A ~A and ~A (~A represents "not A") are both shown so that the data sources are obvious. Basically, anything exclusive-OR’ed with its inverse results in 1. A ~A A ~A 0 1 0 1 = 1 1 0 1 0 = 1 21. In the space to the right, create the truth table for the circuit shown below. (6 points) 22. Write the Boolean expression for the circuit shown in the previous problem. Do not simplify! The answer below is simply copied from the truth table above where the Boolean expression was derived. CBBA A B C A BA B CB CBBA 0 0 0 1 0 1 0 0 0 0 1 1 0 1 1 1 0 1 0 1 1 0 0 1 0 1 1 1 1 0 0 1 1 0 0 0 0 1 0 0 1 0 1 0 0 1 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 A B C X A B C X 26. Fill in the blank cells of the table below with the correct numeric format. For cells representing binary values, only 8-bit values are allowed! If a value for a cell is invalid or cannot be represented in that format, write "X". (7 points per row) Decimal 2's complement binary Signed magnitude binary Unsigned binary Unsigned BCD –112 10010000 11110000 X X –58 11000110 10111010 X X 198 X X 11000110 0001 1001 1000 or X Negative values: Let's take care of the negative values first. Note that the first row is clearly a negative value, i.e., –112. Therefore, there should be X's in the unsigned binary and unsigned BDC columns for this row. Second, the 2's complement value in the second row, 11000110, begins with a 1. This is the sign bit meaning that this row also is negative and X's should be placed in the unsigned binary and unsigned BCD columns for this row. Wow, that's 6 points off the bat. Out of range values: The last column has an unsigned binary value of 11000110. This value uses the MSB for magnitude and therefore cannot be used as a 0 (positive) sign bit for either of the signed representations, i.e., twos complement and signed magnitude. Therefore, X's must go in these two columns for this row. Unsigned binary values: The third row contains a simple unsigned binary value. To convert this to decimal, simply add up the powers of two represented by each of the 1's in the binary value. These are 2 7 , 2 6 , 2 2 , and 2 1 . Adding these up gives us 2 7 + 2 6 + 2 2 + 2 1 = 128 + 64 + 4 + 2 = 19810. For this same column, we could convert to unsigned BCD. There were two possible answers for this column. First, if you noted that the limit was 8 bits for this column and since 198 would take three nibbles in BCD, the value is outside of the range, i.e., put an X in this column. If, however, you wanted to make sure that I knew you could convert to BCD, you could have used the hexadecimal to binary conversion table you developed earlier in this test to convert 198 to 0001 1001 1000. I accepted either answer. Converting from negative decimal: Conversion for any negative value must begin first with the positive representation. Therefore, begin converting –112 to binary by starting with 112. Breaking 112 into its powers of 2 components gives us 112 = 64 + 32 + 16 = 2 6 + 2 5 + 2 4 . Therefore, the binary value we get is the one shown in the table below. Since the MSB is 0, the magnitude of 112 is small enough to be converted to 8-bit twos complement and signed magnitude. 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 0 1 1 1 0 0 0 0 For the 2's complement representation, we take the positive magnitude, and do the bit-flippy thing. This is shown in the table below where the blue numbers are just copied down and the red numbers are the inverted bits. So the final 2's complement value is 100100002. To convert 011100002 to signed magnitude, simply flip the MSB (sign bit) to get 111100002. Converting from negative 2's complement: Once again, converting any negative value must begin first with the positive representation. Therefore, we must take the negative 2's complement value and turn it into a positive (unsigned binary) using the bit-flippy thing. This is shown in the table below where the blue numbers are just copied down and the red numbers are the inverted bits. This means that the unsigned binary value (absolute value) of the twos complement value 110001102 is 001110102. To convert 001110102 to negative signed magnitude, simply flip the MSB (sign bit) to get 101110102. To convert twos complement value 110001102 to decimal, first figure out what the unsigned value of 001110102 is, then add a negative sign. 001110102 has ones in the 2 5 , 2 4 , 2 3 , and 2 1 positions. Therefore, its decimal value is 2 5 + 2 4 + 2 3 + 2 1 = 32 + 16 + 8 + 2 = 58. Therefore, the twos complement value 110001102 is equal to –5810. 112: 0 1 1 1 0 0 0 0 –112: 1 0 0 1 0 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 0 1 0
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved