Question: Suppose r = 0 5 6 7 8 9 ABC, find the result of the following operations. These operations run independently. ( 1 ) RBIT

Suppose r=056789ABC, find the result of the following operations. These
operations run independently.
(1) RBIT r1, re
(2) REV r1,r
(3) REV16r1,r
(4) REVSH r1, r0
Translate the following C statement into an assembly program, assuming 16-bit
signed integers x,y and z(i.e., signed short) are stored in 32-bit register r0, r1, and
r2, respectively.
x=x**y+z-x
Translate the following C statement into an assembly program, assuming 16-bit
unsigned integers x and y (i.e., unsigned short) are stored in register r 0, and r 1,
respectively.
x=x%y
Write an assembly program that calculates the value of the following given
polynomial, assuming signed integers x and y are stored in register r0 and r1,
respectively.
y=3x3-7x2+10x-11
Write an assembly program that calculates the remainder of the division between two
unsigned 32-bit integers.
Explain why Cortex-M processors do not provide any left rotation instructions. They
only offer ROR (rotate right) and RRX (rotate right extended).
Explain the difference between the Barrel shifter's role in the following instructions:
(1) ANDS r1,r2,r3, LSL #3
(2) ADDS r1, r2, r3, LSL #3
Write an assembly program that reverses the byte order of a register without using
the REV instruction.
Write an assembly program that swaps the upper halfword and the lower halfword
of a register.
Implement the BIC (bitwise clear) instruction by using other assembly instructions.
Suppose Mask =000000F0F and P=0ABCDABCD. What are the results of the
following bitwise operations?
Suppose r = 0 5 6 7 8 9 ABC, find the result of

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!