Computer Organization and Design: The Hardware/Software Interface

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

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 32-bit 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 bug-free version. CS152 Prerequisite Quiz ID: 3 2. For the following two's complement 16-bit 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 sum-of-products 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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern