Question: 1. Write ARM instructions to find the 1. 1's complement and 2's complement of a 32 bit number in location 'X' and store the result

 1. Write ARM instructions to find the 1. 1's complement and

1. Write ARM instructions to find the 1. 1's complement and 2's complement of a 32 bit number in location 'X' and store the result in memory. ii. 1's complement and 2's complement of a 64-bit number in locations 'X' and "X+1' (lower order first followed by higher order) and store the result in consecutive memory locations. i. 1's complement and 2's complement (32-bit) a) assume the location 'X' is 1000, and operand is C0000034H. b) assume the output locations for 1's complement and 2's complement of a 32 bit number are 7000 and 7004. Set pointer to data in memory. STORE DATA TO MEMORY MOV R1, #0x1000 MOV R2, #OXC0000034 STR R2, (R1) Load data into [RO). LDR RO, (R1) Complement the data and put it in [R5]. MVN R5, RO ADD R6, R5, #0X01 Add 1 to data to generate 2's complement and store the result in [6] Set base pointer to memory location 7000H MOV R7, #0x7000 Store (R5) in memory and increment pointer to next available memory. STR RS, [R7], #Ox04 Store [R6] in memory STR R6, (R7] End. END

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 Databases Questions!