Hey guys, I'm currently studying Software Engineering and I've been handling this section of the course pretty well up until now; this question has stumped me in an assignment. I'll paste the previous question along with it so you can understand what's going on.
Incase the GateWork deinitions are something that my teacher has made up in an attempt to aid learning, you can see they're pretty straight forward; ! is an output line, / | \ and ^ are all wiring and the [TEXT] are gates filled accordingly. I'm not asking for the answer or any help in that form; a circuit diagram would be wonderful or a few pointers on how I'd manage to add 1 to the decimal value of the binary input once I've flipped the bits using not gates.
Thanks for your time.
Rich (BB code):
Remind me how to make a half-adder. Give your answer as a
GateWork definition in the bracket below. You may use none, some, or all of 0,
1, [and], [or], [not], [nand], [nor], [xor], [xnor]. Hint: "none" is a
bad choice.
[
hadd :: 2 -> 2
A B
| |
^ ^
/ % \
/ / \ \
[and] [xor]
| |
! !
]
(5 marks)
Now that you have your half-adder, please construct a circuit whose
output is the arithmetic negation of its input in 4-bit two's
complement arithmetic. (You can do this with four [hadd]s and four
[not]s, but you might need to fix a 0 or 1 to some input lines
and use ! to absorb some unwanted outputs.)
[
negate4 :: 4 -> 4
]
(20 marks)
Thanks for your time.