Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Add the following features: i. Operation 3 should multiply the two inputs. Before doing this task, study carefully how the adder (+) works in the

Add the following features: i. Operation 3 should multiply the two inputs. Before doing this task, study carefully how the adder (+) works in the existing ALU. When you highlight the adder, you will see that the data bits setting is set to 8. The inputs to the adder come from the two data inputs to the ALU (ACC to ALU and Inp to ALU). The output from the adder goes to the multiplexer (MUX) input corresponding to number 1. The multiply operation should be built in the same way as the adder. Select the Logisim built-in multiplier from the Arithmetic tools. The inputs to the multiplier should be the same as for the adder and the output needs to go to the MUX input corresponding to number 3 (remember that numbering starts from 0). To test operation 3, take a copy of the program used previously that added four numbers and change it to multiply those four numbers together. Use the guidance from the assignment pack on Moodle to make sure that you know which of the hex digits in the instruction are for the ALU operation. Note that starting from zero and multiplying will always give zero. You could add the first number (from data address 0) to the accumulator and then multiply by the remaining digits. You should have at least three tests, one that contains a zero in the four digits (because anything multiplied by zero is zero), one that has four numbers that when multiplied together give an answer that can fit into the data memory and one where multiplying the digits gives a number that is too big for the storage available. One of those tests must be the digits from your student id. For each test, create an image of the CPU that shows the result of the program running (with the final instruction f000 highlighted). If your halt instruction works, you might want to run the program continuously by going to Simulation and choosing Ticks enabled. Choose a low frequency so you can watch the simulation working. To stop the simulation, go back to Simulation and clicking Ticks enabled again. For the tests without a zero, multiply the numbers separately in decimal (on a calculator) and add the results to your report. Convert those results to hexadecimal and show that result as well so that you can check that the output of the CPU is correct (remember that the CPU output will be shown in hex at address 4 in the data memory). Give a statement as to whether the result in the simulation is what you expected from your calculations. 6 ii. Operation 4 should invert the value from the accumulator. To make this amendment inside the ALU sub-circuit, remember that a NOT gate is also called an inverter and has only one input which in this case should come from ACC to ALU. The data bits will need to be set appropriately for the NOT gate and its output connected to the appropriate input to the MUX in a similar way to above. To test operation 4, you should make a copy of the program that you used for the multiplication task and add an additional command to the program to invert the value from the accumulator after the multiplication is complete but before the final result is copied to address 4 in the data memory. This operation does not need other data from the instruction or data memory, but you should set the CPU operation to 1 and the immediate value to 00. Test your circuit with one of the inputs that you used for the multiplication test above that did not give a result of zero and take an image of your simulation when the final instruction f000 is highlighted, as before. In your report, give the hex value of the previous output, followed by that value converted to binary. Invert the binary value (change all ones to zeros and all zeros to ones) and convert back to hex to check the result given by running the program. Give a statement in your report indicating whether the result of the simulation was what you expected.

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

Hands On Database

Authors: Steve Conger

1st Edition

013610827X, 978-0136108276

More Books

Students also viewed these Databases questions

Question

Define and measure service productivity.

Answered: 1 week ago