fa96 midterm1 solution

# Computer Organization and Design: The Hardware/Software Interface

This preview shows pages 1–4. Sign up to view the full content.

Name: 1 Feb 21, 1996 University of California College of Engineering Computer Science Division -EECS Fall 1996 D.E. Culler CS 152 Midterm I Your Name:_______________________________________________________ ID Number:_______________________________________________________ Discussion Section:__________________________________________________ You may bring one double-sided pages of notes and you may use a calculator, but no book or computer. Please print your name clearly on the cover sheet and on every page. Show your work. Write neatly and be well organized. It never hurts to make it easy to grade. Good luck. Mean: 69, Max 97 Distribution: 100 - 85 (11), 84 - 70 (21), 69 - 55 (24), 54 - 40 (7), 39 - (2) Problem Possible Score 1 25 2 20 3 25 4 20 5 10 Total 100

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Name: 2 Feb 21, 1996 Problem 1 (25 points) 1a [5] State the five major components of a computer (according to Patterson and Hennes- sey). 1. Processor datapath 2. Processor Control 3. Memory 4. Input 5. Output 1b [5 ]: Assemble the following MIPS instruction into its binary machine representation XORI \$15, \$0, 0x8000 answer: op(6) rsrtimmediate 001110 00000 01111 1000 0000 0000 0000 1c [5 ]: Decode your answer to 1b as a 32-bit 2’s-complement integer a) b) c) d) answer: b) 0011 1000 0000 1111 1000 0000 0000 0000 1d [5 ]: Decode your answer to 1b as an single precision IEEE floating-point number a) b) c) d) answer: c) 0 01110000 000 1111 1000 0000 0000 0000 Grading: 1a) 1 point for each component; 1b) 1 point for each field; 1c), 1d) hit or miss for multiple choice. 2 29 2 28 2 27 2 20 + + + 2 30 2 27 31 2 15 × + 7 2 27 × 31 2 20 × + 14 2 27 × 31 2 15 × + 2 71 31 256 -------- × 2 15 31 256 -------- × 2 15 287 256 -------- × 2 112 287 256 -------- ×
Name: 3 Feb 21, 1996 1e[5] What are the four basic addressing modes supported by the MIPS R3000 instruction set? Draw a diagram of each. (Do not include the special cases that arise from setting one of the operands to zero.) register-addressing: value is contained in a register specified in the instruction base (or displacement) addressing immediate addressing: value is contained in the instruction PC-relative addressing: PC <- PC + sign_ext(Imm16) Points: 1 for each type. -2 for lack of diagrams, or lack of description. Other

This preview has intentionally blurred sections. Sign up to view the full version.

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

{[ snackBarMessage ]}

### What students are saying

• 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.

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

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

Jill Tulane University ‘16, Course Hero Intern