- half adder is a logic circuit that adds 2 bits.
- the computers are sum and carry.
- the boolean equation for these outputs are
- sum= a symmetric difference carry=A*b
- the sum output is A nor B.the carry output is Aand B.therefore sum is a when A and B are diffrent. carry is a 1 when A and B are 1s.
- Truth table:
A | B | Sum | Carry |
0 | 0 | 0 | 0 |
0 | 1 | 1 | 0 |
1 | 0 | 1 | 0 |
1 | 1 | 0 | 1 |
- this circuit is used to add two bits and the output is given as sum and carry.two gates used to construct half adder are and x-or gate. the logic circuit for half adder is as shown below:
- case-1:if A=0 and B=0according to the condition of and gate the output will be false because both the inputs are low and thus our carry bit remailns 0.and for x-or gate as both the inputs are law output is also law.
- case-2:if A=0 and B=1then the output for the and gate will be false because one of the input is law so carry=0.according to the truth table of x-or gate if both the inputs are diffrunt so the output will be high thus sum=1.
- case=3:if A=1 and B=0 then the output for the and gate will be false because one of the input is law so carry=0.according to the truth table of x-or gate if both the inputs are diffrunt so the output will be high thus sum=1.
- case=4:of A=1 and B=0 then the output for the and gate will be high as both the inputs are high so carry=1 and as both the inputs are same so according to the x-or truth table the output will be low so sum=0