Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions