Question

Q5. For two numbers A=a3a2a1a0 and B=b3b2b1bo, use a few full adders, some gates, and one control wire (=1 means subtraction), to implement a circuit that can do both addition

and subtraction. Please construct a component to generate overflow too.

Fig: 1