Question: F 2 4 CSCI 1 1 3 Assignment 7 , 2 5 pts due: 1 0 / 2 8 ( M ) Booth's Multiplier simulation

F24 CSCI 113 Assignment 7,25 pts due: 10/28(M)
Booth's Multiplier simulation programming
Build a simulator for the Booth's 2's complement number multiplier.
In this practice, we use 16-bit operands for the multiplication, i.e.,16-bit multiplicand, 16-bit multiplier, and 32-bit product. This simulator should have a subcomponent, 16bit_ALU, which performs addition and subtraction operations.
Suggested steps of building the simulator:
Check and fix your 1-bit ALU simulator that you built in Assignment 5 for the correctness;
Write a simulation function for the 16-bit ALU, which uses 1-bit ALU as a subcomponent;
Write a simulation function for the Booth's multiplier, which uses 16 bit ALU as a subcomponent; This module should also have the following subcomponents:
registers MD, AC, MQ (16 bits each), and 4-bit cycle_counter (initialized with binary "1111")
This module is responsible for displaying the contents of the registers at each cycle and returns product.
You should write a driver (i.e., main function), which accesses two input operands (16 bit binary each) from keyboard or data file, calls the Booth's multiplier by passing the operands as arguments, and displays the product returnd from the Booth's multiplier.
In the Booth's multiplier module (function), you should implement the followings:
Initialization step:
Set cycle_counter to binary "1111";
Clear AC (16-bit) with binary "0000000000000000";
Put multiplier into register MQ (16-bit);
Put multiplicand into register MD (16-bit);
Repeat while cycle_counter 0
MQ0MQ-1, Action on MQ0?? initial MQ-1=0
01,1, Add MD (AC larrAC+MD)//by calling 16-bit ALU for add
10, Sub MD (AC larrAC-MD)//by calling 16-bit ALU for sub
11 None )//by calling 16-bit ALU for add
arithmetic-shift ACMQMQ-1>1;
cycle-counter -- ;
Input:
16-bit multiplicand and 16-bit multiplier (2's complement binary numbers) from keyboard or data file; Please use (have to use) the following three sets of testing data, i.e., run your program three times.Output:Show contents of registers step by step, e.g.,
Submission:
Source code (e.g., assign7.cpp) showing all your codes. Please include a good global documentation and each function head documentation in your source code (before compilation).
Run your simulation program three times with the given data (3 sets) and submit the run-time output, e.g., output file or screenshots (png or pdf).
F 2 4 CSCI 1 1 3 Assignment 7 , 2 5 pts due: 1 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!