Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer all 5 questions thanks Question 1 ARMs literature often describes its assembly language instruction syntax in BNF notation. Suppose an instruction is described

Please answer all 5 questions thanks
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
Do Question 3.12 in Clements: (note: only do b and c. a and d are optional.)
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, LSL r2 (OPTIONAL)
MOV r3,r1, LSR r2
MVN r3,r1, LSL r2
MVN r3,r1, LSR r2 (OPTIONAL)
Question 3
Do Question 3.17 in Clements. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 31st International Conference Dexa 2020 Bratislava Slovakia September 14 17 2020 Proceedings Part 1 Lncs 12391

Authors: Sven Hartmann ,Josef Kung ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

303059002X, 978-3030590024

More Books

Students also viewed these Databases questions