Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

subject: computer arch and orgnization 1. Write ARM instructions to find the 1. 1's complement and 2's complement of a 32 bit number in location

subject: computer arch and orgnization
image text in transcribed
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 , Hi. I'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. LI's complement and 2's complement (32-bit) a) assume the location 'X' is 1000, and operand is C00000341 b) assume the output locations for I's complement and Z'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 RZ FOXC0000034 STR 2. R11 Load data into [RO). LDR RO.RU Complement the data and put it in RS). MVN RS.RO ADD R6, RS, HOO! Add i to data to generate 2's complement and store the result in (R53 Set base pointer to memory location 7000H MOV R7, Ox7000 Store CRS) in memory and increment pointer to next available memory. STR RS, R71, 004 Store (R6) in memory STR RS, R7] End END Page 1 of 3 TSN1101 - Computer Architecture and Organisation Lab 8-04 II. 1's complement and 2's complement (64-bit) Assume that X 6300H Input to program: If we want to find the 2's complement of the 64-bit number FFOO 0000 COOO 0034H, then (63001) = 0xC0000034 (lower order of the 64-bit number) (6304H) =0xFF000000 (higher order of the 64-bit number) Output of program: Assume result is stored in 6400H and 6408H (lower order followed by higher order) (6400H) 0xFFFFFCB (6404H) = 0x00FFFFFF (6408H)=0x3FFFFFCC (640CH) - OxO0FFFFFF 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 , Hi. I'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. LI's complement and 2's complement (32-bit) a) assume the location 'X' is 1000, and operand is C00000341 b) assume the output locations for I's complement and Z'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 RZ FOXC0000034 STR 2. R11 Load data into [RO). LDR RO.RU Complement the data and put it in RS). MVN RS.RO ADD R6, RS, HOO! Add i to data to generate 2's complement and store the result in (R53 Set base pointer to memory location 7000H MOV R7, Ox7000 Store CRS) in memory and increment pointer to next available memory. STR RS, R71, 004 Store (R6) in memory STR RS, R7] End END Page 1 of 3 TSN1101 - Computer Architecture and Organisation Lab 8-04 II. 1's complement and 2's complement (64-bit) Assume that X 6300H Input to program: If we want to find the 2's complement of the 64-bit number FFOO 0000 COOO 0034H, then (63001) = 0xC0000034 (lower order of the 64-bit number) (6304H) =0xFF000000 (higher order of the 64-bit number) Output of program: Assume result is stored in 6400H and 6408H (lower order followed by higher order) (6400H) 0xFFFFFCB (6404H) = 0x00FFFFFF (6408H)=0x3FFFFFCC (640CH) - OxO0FFFFFF

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_2

Step: 3

blur-text-image_3

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 Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions

Question

Write a note on Quality circles.

Answered: 1 week ago

Question

Describe how to measure the quality of work life.

Answered: 1 week ago