Half Subtractor :
A combinational circuit that performs the subtraction of two bits is called half subtractor. It needs two input bits that are to be subtracted and produces two output bits that are difference and borrow.
The truth table for half subtrator is:
Tips:- Here borrow bit is 0 unless x<y.
We can derive simplified boolean function for half subtractor with the above truth table as :
D = x'y+xy' = x⊕y
B = x'y
The logic diagram for this implementation is as below: