Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 2: Subtraction with Two's Complement Note: the inputs should be two 2-bit positive numbers (greater than 0). You should only use 2 bits to

image text in transcribed

Question 2: Subtraction with Two's Complement Note: the inputs should be two 2-bit positive numbers (greater than 0). You should only use 2 bits to represent both 2-bit inputs. This will cause problem for representing negative number such as -3. If we can use 3 bits, then -3 will be 101 in two's complement. But we can use only 2 bits for inputs, then we need to use 01 as -3. In other words, the magnitude of the result will be correct, but the most significant bit will not be correct. For question 2 in the lab, you need to construct a 2-bit adder/subtractor using the 4-bit chip. The adder part is easy, you just need to connect the more significant bits of the inputs to O appropriately. For the subtraction, the idea is using 2s complement. To compute A -B, we compute A (B) 1, where (B) means inverting each bit of input B. To compute A B, we compute AB as normal. Let CO be the toggle between doing add and subtract, .e. when co = 1, we do subtract, and when CO-O, we do add. Then we can have the following logic: irc0-1, we compute A + ~(B) + CO-A + ~(B) + 1 If CO 0, we compute ABCO AB+0 The remaining problem is inverting bits of B when CO 1, and keeping bits of B as usual when CO 0. Solve this problem and you will have a 2-bit adder/subtractor. For this question, do the following Explain how you manipulate the bits of B to do both add and subtract. Draw the logic diagram (not circuit diagram) of the 2-bit adder/subtractor. For the adder chip, use the logic symbol in the first page

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_2

Step: 3

blur-text-image_3

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

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions

Question

(2) How much recognition do people gain for doing a good job?

Answered: 1 week ago

Question

What do they not do so well?

Answered: 1 week ago