



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The midterm exam for cda 3100, a computer architecture course, held in spring 2008. The exam consists of multiple choice questions on topics such as binary representation and mips instructions. Students are required to select one answer for each question by circling the index of the answer and write a short explanation. The exam lasts for one hour and fifteen minutes.
Typology: Exams
1 / 6
This page cannot be seen from the preview
Don't miss anything!
Instructions:
Please select one answer for each question by circling the index of the answer. Six points for each question. You may also write down a short sentence in the provided space to explain your choice. If your choice is wrong but your explanation is partially correct, partial credit will be given.
(a) 0000111111111111 (b) 0001111111110011 (c) 1001100111110011 (d) None of the above.
(a) 01101101 (b) 11010101 (c) 11010100 (d) None of the above
(a) 1 00000100 010 0000 0000 0000 0000 0000 (b) 1 10000011 010 0000 0000 0000 0000 0000 (c) 1 10000011 010 0100 0000 0000 0000 0000 (d) None of the above
(b) 0x (c) 0x (d) None of the above
(a) slt $at, $t1, $t bne $at, $0, L (b) slt $at, $t0, $t bne $at, $0, L (c) sub $at, $t0, $t beq $at, $0, L (d) None of the above
if (a > b) c = a - b; else c = b - a;
and suppose a, b, c are in $t0, $t1, and $t2, respectively. Which of the following is the correct translation to MIPS? (Hint: for the meaning of bgt please refer to the previous problem.)
(a) bgt $t0, $t1, L sub $t2, $t0, $t L1: sub $t2, $t1, $t
(b) bgt $t0, $t1, L j L L1: sub $t2, $t0, $t L2: sub $t2, $t1, $t
(c) bgt $t0, $t1, L j L L1: sub $t2, $t1, $t L2: sub $t2, $t0, $t
(d) None of the above
(a) When this function is called, the stack will grow exactly 100 bytes. (b) When this function is called, the stack will grow exactly 400 bytes.. (c) When this function is called, the stack will grow no less than 404 bytes. (d) None of the above.