Half SubtractorThe half subtractor is also a building block for subtracting two binary numbers. It has two inputs and two outputs. This circuit is used to subtract two single bit binary numbers A and B. The 'diff' and 'borrow' are two output states of the half subtractor. Block diagramTruth TableThe SOP form of the Diff and Borrow is as follows: Diff= A'B+AB' In the above table,
Construction of Half Subtractor CircuitIn the block diagram, we have seen that it contains two inputs and two outputs. The carry and sum are the output states of the half subtractor. The half subtractor is designed with the help of the following logic gates:
1. 2input ExclusiveOR Gate or ExOR GateThe Diff bit is generated with the help of the ExclusiveOR or ExOR gate. The above is the symbol of the EXOR gate. In the above diagram, 'A' and 'B' are the inputs, and 'Diff' is the final outcome after performing the XOR operation of both numbers. The truth table of the EXOR gate is as follows: From the above table, it is clear that the XOR gate gives the result 1 when both of the inputs are different. When both of the inputs are the same, the XOR gives the result 0. To learn more about the XOR gate, click here. 2. 2input AND gate:The XOR gate is unable to generate the carry bit. For this purpose, we use another gate called AND gate. The AND gate is not enough to give the correct result of 'Borrow'. We will use the NOT gate with the 'AND' gate to get the correct result. The above is the symbol of the AND gate. In the above diagram, 'A' and 'B' are the inputs, and 'OUT' is the final outcome after performing AND operation of both numbers. There is the following truth table of AND gate: From the above table, it is clear that the AND gate gives the result 1 when both of the inputs are 1. When both of the inputs are different and 0, the AND gates gives the result 0. To learn more about the AND gate, click here. 3. NOT or Inverter Gate:The NOT gate is used to get the inverse output. We can combine the 'AND' and 'NOT' gates in order to get the combinational gate 'NAND'. By inverting the input 'A' using 'NOT' gate and then use the output of the 'NOT' gate as the input of the 'AND' gate, we can get the 'Borrow' bit. HalfSubtractor logical circuitSo, the Half Subtractor is designed by combining the 'XOR', 'AND', and 'NOT' gates and provide the Diff and Borrow. The Boolean expression of the Half Adder circuit is given below: Diff= A XOR B (A⊕B) Borrow= notA AND B (A'.B)
Next TopicFull Subtractor

Kivy
A. Anywhere
Ext.js
UiPath
Arduino
Digital E.
Adwords
MySQL
Python
Smartsheet
Affiliate M.
Testing
Proc*C
SMM