Question: Custom Problem #2: Integer Division: From the slide titled Enhanced Processor w/PC Tester Circuit from the lecture segment titled Programming a CPU with Machine Language

Custom Problem #2: Integer Division: From the slide titled "Enhanced Processor w/PC Tester Circuit" from the lecture segment titled Programming a CPU with Machine Language - The Execution, implement the following division algorithm: C = 0; do { A = A-B; C = C + 1; } while (A >= 0); C = C-1; NOTE: this algorithm uses a "do-while loop. It is slightly different than a normal while loop. The computer will always go through the loop once, and then check the condition before it performs it again. This differs from a while loop that will only perform the loop IF the condition is first met. a) Show a Flow Chart, like the one shown in the previous segment, Programming a CPU with Machine Language - The Setup, this will help you break the program into its various "states." b) Show a table like the one shown on the slide titled Multiply Algorithm: Control Memory Contents from the lecture segment Programming a CPU with Machine Language - The Execution, listing the values of the control signals necessary to implement the algorithm above. You may assign registers any way you like to hold your variables and necessary data, but state it up front! c) Show an Execution Trace (like the one shown in the same lecture segment) for your program in step (b). For your trace, assume A=5 and B=2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
