The Axe Dude
Senior Member
Hi, I have a task I am busy doing for uni, but it has really stumped me!
Exercise 2 (Advanced)
The adder presented in class adds two binary numbers. Without changing the 1/2 adders in the
adder, perform the appropriate modifications so that it can perform the following functions:
a. Receive as input a “subtract bit'' and a “shift bit'', such that
* when the subtract bit is 1, it subtracts the second binary number from the first.
* when the shift bit is 1, it shifts left the first number (and ignores the second).
b. The shift and subtract bits cannot be 1 at the same time, but you don't have to check for
that in your design.
Note: You can do each modification separately or you can do both together.
I'm not really bothered about the shifting of the digits, just the subtractions. I understand that I would need a control signal, which when has a value of '1', it swaps all of the digits in the second number.
I just can't think of a way to do this using gates...
The best idea I can come up with is an 'if-statement' of sorts, except I don't know how to present it graphically...
BTW: Here is the "adder presented in class"
http://mybroadband.co.za/photos/showphoto.php?photo=3150&size=big&cat=500
Thanks,

Edit: Can a mod change cirucit to circuit please?
Exercise 2 (Advanced)
The adder presented in class adds two binary numbers. Without changing the 1/2 adders in the
adder, perform the appropriate modifications so that it can perform the following functions:
a. Receive as input a “subtract bit'' and a “shift bit'', such that
* when the subtract bit is 1, it subtracts the second binary number from the first.
* when the shift bit is 1, it shifts left the first number (and ignores the second).
b. The shift and subtract bits cannot be 1 at the same time, but you don't have to check for
that in your design.
Note: You can do each modification separately or you can do both together.
I'm not really bothered about the shifting of the digits, just the subtractions. I understand that I would need a control signal, which when has a value of '1', it swaps all of the digits in the second number.
I just can't think of a way to do this using gates...
The best idea I can come up with is an 'if-statement' of sorts, except I don't know how to present it graphically...
BTW: Here is the "adder presented in class"
http://mybroadband.co.za/photos/showphoto.php?photo=3150&size=big&cat=500
Thanks,
Edit: Can a mod change cirucit to circuit please?
Last edited: