Question: For your programs in problems 1 : write the binary LC - 3 instruction and the corresponding RTL or assembly in the following format: Note
For your programs in problems : write the binary LC instruction and the corresponding RTL or assembly
in the following format:
Note how bits are arranged in groups that correspond to instructionspecific operands.
If you are not sure about the RTL format of a certain instruction, you can refer to Appendix A of your Patt &
Patel text or read sections and Try to make your program as simple and intuitive as you can.
LC Programming in machine language
Short programs in LC binary code
For each of the following tasks, systematically decompose the problem to the level of LC instructions, then write LC instructions to implement your
solution. Turn in your flow chart and LC instructions in binary. For credit, each instruction must be annotated with a comment in RTL or assembly.
Assuming that write a program that determines if the value stored in is even. If is even, store in the value otherwise store the value
To receive credit, you can only modify the contents of R and no other register, and your solution should have no more than lines of code.
Assuming that R contains a positive value less than put the value into To receive credit, you can only modify the contents of and
and no other register and your solution should have no more than lines of code.
Write a program that adds each of the negative numbers stored in memory locations M through M inclusive, and stores the result in register R
Assume that address can be found in register R and address M can be found in register R To receive credit, you can only modify the contents of
R R R R and no other registers, and your solution should have no more than lines of code. Note: You do not need to consider the case when
M is greater than M
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
