What are Half and Full Adders?
Full and half adders are the basic elements of digital logic used to perform addition operations in a binary system.
What is Half Adder?
Half Adder is a combinational logic circuit that is designed by connecting one XOR gate and one AND gate. The half-adder circuit has two inputs: A and B, which add two input digits and generate a carry and a sum.
Now, let's build a truth table for half adder.
What is Full Adder?
A Full Adder is an extension of the half adder that adds two single-bit binary numbers along with an additional Carry-in (Cin) from a previous stage. It produces:
- Sum (S): The sum of the inputs and the carry-in.
- Carry-out (Cout): The carry-out from the addition.
In simple terms, the Full Adder consists with 2 Half Adders and one logic gate OR.
Now, let's build the truth table for Full Adder values.
Conclusion:
- Half Adder adds two bits.
- Full Adder adds two bits and a carry-in, handling the carry distribution between bits in multi-bit addition.
Now, let's move on to Half and Full subtractor.
What is Half Subtractor?
A Half Subtractor is a digital circuit used to subtract two single-bit binary numbers. Like a half adder, it operates on two inputs, but instead of adding, it subtracts. The two outputs are:
- Difference (D): Represents the difference between the two bits.
- Borrow (B): Represents whether a "borrow" is required for the subtraction.
And again, build the truth table.
A half subtractor cannot handle the borrow from a previous stage, making it unsuitable for multi-bit subtraction.
What is Full Subtractor?
A Full Subtractor is an extension of the half subtractor. It subtracts two single-bit binary numbers along with an additional Borrow-in (Bin) from a previous stage. It produces:
- Difference (D): The difference between the inputs and the borrow-in.
- Borrow-out (Bout): The borrow generated if needed for further subtraction. The circuit diagram for a full subtractor usually consists of two half-subtractors and an additional OR gate to calculate the borrow-out bit.
And the truth table
Conclusion:
- Half Subtractor: Subtracts two bits, gives the difference and a borrow.
- Full Subtractor: Subtracts two bits with a borrow-in, handling multi-bit subtraction by distributing the borrow across stages.