{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

mt2-02-1-ans

mt2-02-1-ans - CMPT 250 Midterm 2 Answers You have 50...

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

CMPT 250 Midterm 2 March 15, 2002 Answers You have 50 minutes to complete this exam. Answer all questions in an answer booklet. Hand in your question sheet with your booklet. There is a total of 40 points on this exam; points for each question are indicated. Read through the entire exam before you begin. There are 6 pages ( not counting this page); make sure you have them all. No books, calculators or any other aids are allowed. Where appropriate, clarity and simplicity of your solutions count, as well as correctness. All “Figures” are at the back of the exam. Surname: Given Name(s):

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

View Full Document
CMPT 250 Midterm 2, Mar. 15, 2002 Student Number: Student number: 2
CMPT 250 Midterm 2, Mar. 15, 2002 1. [10 points] For each assembly instruction below, convert it to a register transfer statement (eg. “ R 1 R 2” is a register transfer statement). A table of the addressing modes used can be found in Figure 1. Where an accumulator is used, it should be called ACC . (a) LD R1, 800 [ R 1 M [800] ] (b) ADD (400) [ ACC M [ M [400]] ] (c) ADD R1, #400 [ R 1 R 1 + 200 ] (d) LD [100] [ ACC M [ M [100]] ] (e) LD 300 (R2) [ ACC M [ R 2 + 300] ] (a) LD R1, #800 [ R 1 800 ] (b) ADD \$400 [ ACC M [ PC + 400] ] (c) ADD R2, 400 [ R 2 R 2 + M [400] ] (d) LD (R1) [ ACC M [ R 1]] ] (e) LD 600 (R1) [ ACC M [ R 1 + 600] ] 2. [10 points] Have a look at the datapath in Figure 2. This datapath will use the function unit in Figure 3. The outputs of the function unit are described in Figure 4.

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