Question: Add Sub Extra Credit Problem Preliminaries The Add / Sub circuit you studied in practice problem 1 0 , week 3 , is shown below.

Add Sub Extra Credit Problem
Preliminaries
The Add/Sub circuit you studied in practice problem 10, week 3, is shown below. It adds two 4-bit numbers x and Y. Now, let's assume that the user has two numbers x and Y that are both positive signed numbers, one of the following four scenarios might occur:
If the required is x+Y, then the user inputs x to the A input and Y to the B input and set the circuit to ADD (i.e.S=0).
If the required is x-Y, then the user inputs x to the A input and Y to the B input and set the circuit to SUB (i.e.S=1).
If the required is -x+Y, then the user inputs the 2's complement of x to the A input and Y to the B input and set the circuit to ADD (i.e.S=0).
If the required is -x-Y, then the user inputs the 2's complement of x to the A input and the 2's complement of Y to the B input and set the circuit to ADD (i.e.S=0).
Note the following two facts:
In the 3rd and 4th scenario, taking the 2''s complement is done by hand first (i.e. the user has to take the 2's complement before feeding the number to the circuit).
In the third scenario, while the user could avoid taking the 2's complement (by converting -x+Y to Y-x and thus applying the second scenario), taking the two's complement is inevitable in the fourth scenario.
 Add Sub Extra Credit Problem Preliminaries The Add/Sub circuit you studied

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 Databases Questions!