Unformatted text preview: University of California, Berkeley College of Engineering Computer Science Division  EECS Spring 1998 J. Wawrzynek Prerequisite Quiz January 29, 1998 CS152 Computer Architecture and Engineering Your Name: ID Number:
This prerequisite quiz will be used in determining class admissions. The use of calculators or notes is not allowed during this quiz. Please put your name SID on each page. Good luck! CS152 Prerequisite Quiz ID: 2 1. The following MIPS program tries to sum together all the elements of a memory array holding a set of 32bit two's complement integers. The register $a0 is initialized to the address of the array, the register $a1 is initialized to the number of integers in the array, and all other registers are uninitialized.
doit: lw add addi addi bltz $t0, 0($a0) $v0,$v0,$t0 $a0,$a0,1 $a1,$a1,1 $a0,doit # # # # # Read next element Add to sum Advance pointer to next source Decrement Counter Repeat until done There are multiple bugs in this MIPS program x them and write below a bugfree version. CS152 Prerequisite Quiz ID: 3 2. For the following two's complement 16bit integers, convert: 710 to base 2: C15216 to base 2: 4210 to base 16: 800016 to base 10: CS152 Prerequisite Quiz ID: 4 3. Given the following boolean function:
F = bc + bc + bc (a) Write the truth table for F: a 0 0 0 0 1 1 1 1 b 0 0 1 1 0 0 1 1 c F 0 1 0 1 0 1 0 1 (b) Write F in sumofproducts form: (c) Draw a schematic for the function G = ab + cd, using AND and OR gates: (d) Draw a schematic for the function G above using only NAND gates: (e) Extra Credit: Is there a simplier expression for F above? What is it? CS152 Prerequisite Quiz ID: 5 4. For the following circuit built from positive edge triggered d ip ops and a single XOR gate, draw the ideal waveforms at the nodes a, b, c, and d. a CLK b c d CLK a 0 b 1 c 0 d 1 ...
View
Full Document
 Spring '04
 Kubiatowicz
 Computer Architecture, Binary numeral system, J. Wawrzynek, Prerequisite Quiz, Berkeley College of Engineering Computer Science Division

Click to edit the document details