Quiz7_2020-21

pdf

School

Western University *

*We aren’t endorsed by this school

Course

2208A

Subject

Computer Science

Date

Jan 9, 2024

Type

pdf

Pages

2

Uploaded by JusticeStar19063

Report
12/22/2020 OWL : COMPSCI 2208A 001 FW20 : Online Tests, Quizzes & Assignments https://owl.uwo.ca/portal/site/7a0fdb29-6a38-4330-adc3-7e8895544a8b/tool/1c394bc0-5806-499f-bc16-119cd7ad58dd/jsf/select/selectIndex 1/3 3.0/ 3.0 Points Quiz 07 Return to Assessment List Part 1 of 5 - 3.0/ 3.0 Points Question 1 of 5 Consider the following ARM assembly program AREA prog, CODE, READONLY ENTRY MOV R0, #250 MOV R1, #1 repeat ADD R1,R1,R0,ASR#3 TST R0,#1 SUBNE R0,#61 SUBEQ R0,#91 CMP R0,#0 BGT repeat halt B halt END What is the value of R0 and R1 after executing the above program (until reaching the B halt instruction)? R0 = 0x FFFFFFCA , R1 = 0x 0000003F How many times is the ADD instruction executed? 4 Answer Key: FFFFFFCA|-36, 3F|0000003F, 4 Part 2 of 5 - 0.0/ 1.0 Points In ARM assembly, a literal in a data processing instruction is encoded as an alignment code and a value from 0-to-255. COMPSCI 2208A 001 FW20 Online Tests, Quizzes & Assignments Online Tests, Quizzes & Assignments
12/22/2020 OWL : COMPSCI 2208A 001 FW20 : Online Tests, Quizzes & Assignments https://owl.uwo.ca/portal/site/7a0fdb29-6a38-4330-adc3-7e8895544a8b/tool/1c394bc0-5806-499f-bc16-119cd7ad58dd/jsf/select/selectIndex 2/3 0.0/ 1.0 Points 2.0/ 2.0 Points 7.0/ 7.0 Points 7.0/ 7.0 Points Question 2 of 5 If the align code is 0x7 and the 0-to-255 value is 0xEE, then the literal value in hexadecimal without any leading zeros will be 0x 3FC0000 . Answer Key: 3B80000 Part 3 of 5 - 2.0/ 2.0 Points In ARM assembly, a literal in a data processing instruction is encoded as an alignment code and a value from 0-to-255. Question 3 of 5 Click to see additional instructions If the literal value is 0xC8000003, then the align code in decimal will be 3 and the 0-to-255 value in decimal will be 242 . Answer Key: 3, 242 Part 4 of 5 - 7.0/ 7.0 Points Question 4 of 5 Encode the following ARM assembly instruction to ARM machine language code. MOVPL r2,#0xEE 0x 53A020EE Answer Key: 53A020EE Part 5 of 5 - 7.0/ 7.0 Points Question 5 of 5 Decode the following ARM machine language code to ARM assembly instruction. 0xB37000FF CMNLT r0, #0xFF Answer Key: CMNLT r0,#0xFF| CMNLT r0,#255|CMNLTS r0,#0xFF| CMNLTS r0,#255
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