(a) Design a half-subtractor circuit with inputs X and Y andoutputs D and B. The circuit subtracts the bits X-Y and places the difference in D and the borrow in B.
(b) Design a full-subtractor circuit with three inputs X,Y,Zand two outputs D and B. The circuit subtracts X-Y-Z, where Z is the input borrow, B is the output borrow, and D is the difference.