MSE7_1

pdf

School

University of West Georgia *

*We aren’t endorsed by this school

Course

5

Subject

Computer Science

Date

Dec 6, 2023

Type

pdf

Pages

7

Uploaded by ExtrmNrd

Report
8/13/23, 9:48 PM Module 7 Summary Exercises: COMPUTER ARCH & ASSEM LANGUAGE (CS_271_400_U2023) https://canvas.oregonstate.edu/courses/1923269/quizzes/2877677 1/7 Module 7 Summary Exercises Due Aug 13 at 11:59pm Points 31 Questions 14 Available Aug 5 at 12am - Aug 13 at 11:59pm Time Limit 1,440 Minutes Allowed Attempts 2 Instructions Attempt History Attempt Time Score LATEST Attempt 1 53 minutes 31 out of 31 Score for this attempt: 31 out of 31 Submitted Aug 13 at 6:48pm This attempt took 53 minutes. Instructions These exercises are based on the concepts introduced in Module 7. I encourage you to attempt these exercises twice, especially as a learning and study aid. You will have two attempts, each of which will last for 24 hours, and only the top score will be counted. You are allowed any resources (including explorations, Ed Discussions, Teams, classmates, the internet, etc...). Good luck! Take the Quiz Again 2 / 2 pts Question 1 Which of the following string primitives will copy a BYTE from the memory location pointed to by ESI to the AL register? CMPSB
8/13/23, 9:48 PM Module 7 Summary Exercises: COMPUTER ARCH & ASSEM LANGUAGE (CS_271_400_U2023) https://canvas.oregonstate.edu/courses/1923269/quizzes/2877677 2/7 MOVSB STOSB LODSB Correct! Correct! SCASB 2 / 2 pts Question 2 Which of the following string primitives will modify the EDI register? Check all that apply. SCASB Correct! Correct! CMPSB Correct! Correct! STOSB Correct! Correct! MOVSB Correct! Correct! LODSB 2 / 2 pts Question 3 If the string direction flag is not set, string operations will move backward through the string. True False Correct! Correct!
8/13/23, 9:48 PM Module 7 Summary Exercises: COMPUTER ARCH & ASSEM LANGUAGE (CS_271_400_U2023) https://canvas.oregonstate.edu/courses/1923269/quizzes/2877677 3/7 2 / 2 pts Question 4 The REP prefixes may be used with most instructions ( MOV , CMP , ADD , etc...). True False Correct! Correct! 2 / 2 pts Question 5 Which of the following would be appropriate to scan through one string, stopping when a character in AL is successfully matched to a character in the string? Assume AL , ECX , ESI , and EDI have already been set appropriately (if necessary). REPE CMPSB REPNE SCASB Correct! Correct! REPNE CMPSB REPE SCASB 2 / 2 pts Question 6 Which structure is the following true for? _________ may have LOCAL labels.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
8/13/23, 9:48 PM Module 7 Summary Exercises: COMPUTER ARCH & ASSEM LANGUAGE (CS_271_400_U2023) https://canvas.oregonstate.edu/courses/1923269/quizzes/2877677 4/7 Procedures Both Macros and Procedures Correct! Correct! Macros Neither Macros Nor Procedures 2 / 2 pts Question 7 Which structure is the following true for? For _________, the entire code is substituted for each call. Both Macros and Procedures Procedures Neither Macros Nor Procedures Macros Correct! Correct! 2 / 2 pts Question 8 Which structure is the following true for? _________ have a calling mechanism involving the EIP. Both Macros and Procedures Macros Procedures Correct! Correct!
8/13/23, 9:48 PM Module 7 Summary Exercises: COMPUTER ARCH & ASSEM LANGUAGE (CS_271_400_U2023) https://canvas.oregonstate.edu/courses/1923269/quizzes/2877677 5/7 Neither Macros Nor Procedures 3 / 3 pts Question 9 Suppose that a program's data and executable code require 1,024 bytes of memory. A new section of code must be added; it will be used with various values 42 times during the execution of a program. When implemented as a macro, the macro code requires 65 bytes of memory. When implemented as a procedure, the procedure code requires 104 bytes (including parameter-passing, etc.), and each procedure call requires 14 bytes. How many bytes of memory will the entire program require if the new code is added as a procedure? 1,716 Correct! Correct! 1,716 orrect Answer orrect Answer 2 / 2 pts Question 10 Convert the following infix expression to postfix: a + ((b * c) - d) / (e + f) a b c * d - e f + / + Correct! Correct! orrect Answers orrect Answers bc* d- ef+ / a+ a b c * d - e f + / + a b c* d- e f+/+ bc*d-ef+/a+ abc*d-ef+/+ b c * d - e f + / a +
8/13/23, 9:48 PM Module 7 Summary Exercises: COMPUTER ARCH & ASSEM LANGUAGE (CS_271_400_U2023) https://canvas.oregonstate.edu/courses/1923269/quizzes/2877677 6/7 2 / 2 pts Question 11 Which of the following infix expressions corresponds to the given postfix expression? 3 4 - 3 2 4 2 - + ^ - (3 - 4 - 3) ^ (2 + 4 - 2) (3 - 4) - (3 ^ (2 + (4 - 2))) Correct! Correct! 3 - 4 - (3 ^ (2 + 4)) - 2 3 - (4 - 3) ^ (2 + 4 - 2) 4 / 4 pts Question 12 Find the decimal value of the postfix (RPN) expression. Round answers to one decimal place (e.g. for an answer of 13.45 you would enter 13.5): 3 2 ^ 6 4 - / 5 * 22.5 Correct! Correct! 22.5 margin of error +/- 0.2 orrect Answer orrect Answer 2 / 2 pts Question 13 0-address FPU instructions have how many memory operands?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
8/13/23, 9:48 PM Module 7 Summary Exercises: COMPUTER ARCH & ASSEM LANGUAGE (CS_271_400_U2023) https://canvas.oregonstate.edu/courses/1923269/quizzes/2877677 7/7 0-2 none Correct! Correct! 1-2 2 / 2 pts Question 14 Which of the following infix notations corresponds to the given FPU manipulations? FINIT FLD A FLD B FDIV FLD C FLD D FSUB FMUL FLD E FSUB FSTP Z Z = A / B * (C - D - E) Z = A / B * C - D - E Z = A / B * (C - D) - E Correct! Correct! Z = A * B / (C - D) - E Quiz Score: 31 out of 31