Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

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

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions

Question

What are the limitations of forward markets?

Answered: 1 week ago

Question

1. What are your creative strengths?

Answered: 1 week ago

Question

What metaphors might describe how we work together?

Answered: 1 week ago