Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 1 ARMs literature often describes its assembly language instruction syntax in BNF notation. Suppose an instruction is described in BNF as having the syntax:
Question 1
ARMs literature often describes its assembly language instruction syntax in BNF notation. Suppose an instruction is described in BNF as having the syntax:
This|That{B}{S}{,P|Q}
Give 5 examples of possible legal instructions using this format.
Question 2
If r1 = 0FFF16, and r2 = 4, what is the value of r3 after each of the following instructions has been executed (assume that each instruction uses the same data).
MOV r3,r1, LSR r2
MVN r3,r1, LSL r2
Question 3
Additionally, encode the number 5768 (0b1011010001000) as accurately as possible using ARM's 12-bit literal. What is the percent error in this encoding?
ARM instructions have a 12bit literal. Instead of permitting a word in the range 0 to 2 12 1, the ARM uses an 8bit format for the integer and a 4bit alignment field that allows the integer to be shifted in steps of 2. What are the advantages and disadvantages of this mechanism in comparison with a straight 12bit integer?
Question 4
For each of the following instructions indicate what the result will be, and give the binary encoding of the instructions (in hex format). Show your work and explain your result. Feel free to consult an assembly website or use Keil to verify your work.
a) RSB r1,r0,LSL#2
b) MLA r1,r0,r0,r1
c) STR r0,[r2,r3,ROR #3]!
Question 5
Look through the instructions on the U of R ARM sheet, and try to find a combination of condition, opcode, and S flag which makes a dictionary word in English (or another language), or some close approximation of a word. The only point of this question is to make you download the sheet, look at it, and look through the opcode/condition pairs.
What does your instruction do?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started