Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

LC3 Question Problem 4 (12 points) Consider an algorithm which takes the absolute value of a 2's complement number stored in memory location 0x4022 and

LC3 Question

image text in transcribed

Problem 4 (12 points) Consider an algorithm which takes the absolute value of a 2's complement number stored in memory location 0x4022 and writes the result to the memory location 0x4023. (Note: The example, the absolute value of -5 is 5, and the absolute value of 15 is 15 itself.) We can represent the algorithm as the flowchart below by decomposing it into its basic constructs. Fill in the missing instructions for each block. (5) a. Start Yes No Halt b. Convert the above algorithm to an LC-3 program. Write the program in LC-3 binary code with comment. The program should start at memory address x3000. (Hint: use LDI and STI to access memory locations and you can store 0x4022 and 0x4023 in memory 0x3006 and 0x3007 to use) (7)

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

1 2 3 Data Base Techniques

Authors: Dick Andersen

1st Edition

0880223464, 978-0880223461

More Books

Students also viewed these Databases questions