Half subtractor is a combinational circuit that performs subtraction of two bits. It accepts two binary digits as input and produces two binary digits, a difference and a borrow, in its output. The logic symbol of half subtractor is given below.

Expressions for Difference and Borrow can be derived from the following truth table and K-Map.

A | B | D | B_{out} |
---|---|---|---|

0 | 0 | 0 | 0 |

0 | 1 | 1 | 1 |

1 | 0 | 1 | 0 |

1 | 1 | 0 | 0 |

Observe that the value of D is 1 when inputs A and B are at different logic levels. This can be expressed as XOR of two variables.

Now the value of Bout is 1 only when input A is 0 and input B is 1. That is Bout can be expressed as

From these equations, we can implement the logic circuit required as follows.

D is generated with an XOR gate with two inputs A and B, and the B_{out} is generated with an inverter and an AND gate.

**Click Here for Computer Organization and Architecture Malayalam Video Lessons**