Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Custom Problem #3: Summing Up Numbers For this problem, you will once again use the Enhanced Processor w/PC Tester Circuit shown in the slides. This

Custom Problem #3: Summing Up Numbers\ For this problem, you will once again use the Enhanced Processor w/PC Tester Circuit\ shown in the slides. This time you will create the algorithm that you will implement:\ Your algorithm will take as input an unsigned number: ?. It must then compute the sum\ of all the numbers from 1 up to and including ?, storing that sum into variable ?.\ As an example, if ? = 5, your algorithm will compute ? = 15 by adding:\ 1 + 2 + 3 + 4 + 5\ You may assume (as we have in all previous algorithms) that the input ? is\ already loaded in your register file, as well as any other numbers you require.\ You may assume that the input ? > 0 when writing your algorithm.\ You must use a loop to implement your algorithm.\ a) Write out your algorithm in pseudocode as shown in Custom Problem #2. Use the\ same variable names ?, ?, and ? in your algorithm.\ b) Show a flowchart of your program, similar to the one shown in the slide that is titled\ Multiply Algorithm: Flow Chart / State Diagram in the segment on\ Programming a CPU with Machine Language - The Setup.\ c) Show a memory contents table, similar to the one shown in the slides that are titled\ Multiply Algorithm: Control Memory Contents, listing the values of the control\ signals necessary to implement the algorithm above. Your table should be in\ binary, except for your registers and X values. Use the same register allocations:\ ?0 = 0, ?1 = 1, ?2 = ?, ?3 = ?, ?4 = ?\ d) Show an Execution Trace, similar to the one shown in the slides that are titled\ Multiply Execution Trace segment for your program in step (c), including the\ control signals. Your table should be in decimal except for X values. For your\ trace, assume ? = 3.\ e) Take into account the limits of our processor: determine the largest value for the\ unsigned integer ? that your algorithm will still compute the correct answer.

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

Intelligent Information And Database Systems 12th Asian Conference ACIIDS 2020 Phuket Thailand March 23 26 2020 Proceedings

Authors: Pawel Sitek ,Marcin Pietranik ,Marek Krotkiewicz ,Chutimet Srinilta

1st Edition

9811533792, 978-9811533792

More Books

Students also viewed these Databases questions