Question: 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

 Note: the inputs should be two 2-bit positive numbers (greater than

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 2's 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; i.e. when CO 1, we do subtract, and when CO 0, we do add. Then we can have the following logic: 1fc0-1, we compute A + ~(B) + C0-A + ~(B) + 1 If CO 0, we compute A B+CO A B+0 The remaining problem is inverting bits of B when Co - 1, and keeping bits of B as usual when CO- Solve this problem and you wll 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

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!