Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For problems that require development of a program test the solutions with data

ID: 3825118 • Letter: F

Question

For problems that require development of a program test the solutions with data values selected to cover the widest possible range of situations. For problems which require the development of only part of a program devise a test program with additional instructions to enable the partial program to be fully tested. When ADD r3, r5, r12 is executed what happens to the value that was in r3? What is the effect (result) of executing ADD r3, r5, r5? What is the effect (result) of executing ADD r3, r3, r3? When MOV r11, r2 is executed what happens to the value that was in r11? What is the effect (result) of executing MOV r4, #28? What is the effect (result) of executing MOV r3, r3? Prepare a program to add together the numbers 127 decimal, 0xe45ad hexadecimal and 2_10101110010 binary (ARM assembly language uses prefix 2_to indicate a number in base 2). Using a development system, assemble your program, repeatedly correct it and assemble again until there are no errors. Test that the program behaves correctly. What is the total obtained? Assume that register r2 holds the value 0x0f45, what is the value in register r5 after the execution of the instruction SUB r5, r2, #209? Assume that register r2 holds the value 0x045, what is the value in register r5 after the execution of the instruction RSB r5 r2 209 2, c) What problems arise when register r2 holds 0x0 and the instruction RSB r5, R2, #209 is executed? What will be the value in register r5 after the execution of this instruction? What is the value in register r8 after the execution of the instruction MVN r8, #0xf4? Assume that register r3 holds the value 0x045 and r10 holds 0xffff; what is the value in register 13 after the execution of the instruction ADD r3, r3, r10? Describe the form of the value that will be in register r6 after the execution of the instruction ADD r6, r6, #1?

Explanation / Answer

4.1)

   a) r3 stores the value of the summation of the values stored in r5 and r12 i.e r3=r5+r12

   b)r3 stores the value of summation of the values stored in r5 twice i.e it stores the value of expression 2*r5
   r3= r5+r5 = 2* r5
  
   c)r3 stores the value of summation of its own value with it's own value i.e r3=r3+r3 = 2*r3

4.2)
   a) MOV r11, r2 copies the value of r2 into r11 .Now , the value of r11 gets the value stored in r2
  
   b)now register r4 will store value 28 in it.As, the command allows the register to store the immediate value

   c)No change in anything.Just causes delay in program

4.4)

   a) SUB r5,r2,#209
       => r5 = r2 - (209)10
           = 0x0f45 - (209)10
           = (3909)10 - (209)10
           = 3700 = 0x0E74
  
   b)RSB r5,r2,#209
       => r5 = (209)10 - r2
           = (209)10 - 0x045
           = (209)10 - (69)10
           = (140)10 = (8C)16

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote