A combinational circuit that performs subtraction between two input bits is called full subtractor. It consist of three input bits and two output bits .
The truth table for full subtractor is:
Here x ,y and z are minuend, subtrahend, and previous borrow, respectively. The two output B and D represents borrow and difference , respectively.
We can derive simplified boolean function for full subtractor with the above truth table as :
D = x'y'z+x'yz'+xy'z'+xyz = (x⊕y)⊕z
B = x'y+x'z+yz
The logic diagram for this implementation is as below: