Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

machine organization 3. Write a machine code (Os and 1s) program for all the following problems. Test to make sure that they work in LC3.

image text in transcribed

machine organization

3. Write a machine code (Os and 1s) program for all the following problems. Test to make sure that they work in LC3. It's best to complete each step and test before moving onto the next. No credit if you write code in assembly. Your machine code file name must be named, Multiply.bin a. The LC-3 has no multiply instruction. You must write code to allow for multiplication of two numbers. These numbers must be loaded into the registers R3 and R4 from memory. Load R3 with contents of memory from x3100 and R4 from x3101. In other words, someone running this code will place the data in these two memory locations. b. Write machine code to multiply the contents of R3 with the contents of R4. The result must be stored in R5. In other words, R5 = R3 R4. c. You must also store the result at memory location x3102. The best way to store at an address is to specify the address in your instructions at the end where data goes. d. Modify your code to change the contents of register R2 based on the final result stored in R5. If R5 is greater than 0, R2 must be set to 1 If R5 is less than 0, R2 must be set to - 1 If R5 is equal to 0, R2 must be set to O Start your program at x3000 so that it will be easier to grade it. Each program must include a header comment that has your name(s) and a brief description of the program. Make sure to comment logic of your program by using inline comments. You will be graded on comments. Did you test your program for different values? Positive, Negative, Zero? Submission guidelines: If you are working with another student, only one of you should submit this work. If working in pairs, submit learning logs. If working alone, there's no need to submit learning logs. Submit your homework on Canvas before the due date and time as neumannhw3.doc or docx or pdf, Multiply.bin. You may scan your handwritten homework and upload as a single pdf document but it must be legible. You must show your work wherever it is applicable to get full credit. Make sure to read the entire question and answer all parts of the question. Pair Submission guidelines: Each member in the pair must submit their learning logs at the submission link. The format is below for your convenience. You may choose to have multiple of these in a single document for each

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

Database Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago