Exam1b

Exam1b - CSE/EEE 230 Fall 2007 Exam 1b 5 questions at 20...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE/EEE 230 Fall 2007 Name ______________________________ Exam 1b 5 questions at 20 points each Score ______/100 Question 1: Circle the correct answer – 2 points each Use the code below for questions 1 and 2 top: bne $s1, $s2, end addi $s1, $s1, 1 end: j top Assume top has the value of 0x1000 0008 1. What is the displacement in the bne instruction? a. 1 b. 2 c. 3 d. 4 2. What is the value in the jump instruction (j top)? a. 0x1000 0008 b. 0x1000 0002 c. 0x000 0002 d. 0x000 0008 Use the declarations below for questions 3 and 4. int nums [20]; 3. If an integer is 1 word, how many bytes are needed for the array nums? a. 20 b. 40 c. 80 d. Cannot be determined 4. If nums[0] is at address 0x100000000, what is the address of num[10]? a. 0x10000000 b. 0x1000000A c. 0x10000014 d. 0x10000028 5. The 16 bit displacement in a beq instruction is a. used to access memory directly b. added to the PC to obtain the address c. shifted left by 2 and added to the PC d. shifted left by 4 and added to the PC 6. To allocate space on the runtime stack to save 4 registers, use a. addi $sp, $sp, -4 b. addi $sp, $sp, -16 c. addi $sp, $sp, 4 d. addi $sp, $sp, 16 7. What does this instruction do? lw
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

Exam1b - CSE/EEE 230 Fall 2007 Exam 1b 5 questions at 20...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online