Question: For this assignment, you will take what you now know of the 8 - bit Logisim computer's ISA and opcodes, and write a program that
For this assignment, you will take what you now know of the bit Logisim computer's ISA and opcodes, and write a program that performs poweroftwo division in software using LSR that you implemented in the previous assignment Your program should be able to take a number that is evenly divisible by a power of two and an operand that is a power of two and divide the appropriate number of times by right shifting Your program should support all valid power of two operands that fit in the register. Dont worry about negative values, or register overflows. For example, your program should be able to correctly divide by and have an answer of Additionally, your program should be able to correctly divide by and have the answer of without any modifications to your program other than the operand changethe same should apply to any power of two operands. The final correct answer only needs to reside in the Shift Register. Your program must work with the Logisim computer you submitted for the first assignment.
The larger of the two operands must come first and be loaded only in the th byte of memory x using zerobased indexing The second operand, the smaller one, must be loaded in the th byte of memory x using zerobased indexing This is how I will test your program. Your program must support all powers of two from to for both operands without changing the program in any way other than bytes x and x The value of the shift register when the program counter reaches xFF will be the answer to the division computation. Any solutions that don't support the above will receive zero credit for this part of the assignment. This part of the assignment is worth points. The Logisim bit computer cannot be further modified other than what was specified in Assignment #
All current opcodes on this machine:
LDX
LDY
LDA
ADC
SEC
BCS
CLC
TAX
JMP b
STA c
d loads shift register f shifts right by
e loads the rotate register a rotates right by
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
