Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
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