halfadder
A half-adder is a simple digital logic circuit that adds two single-bit binary numbers. It has two inputs, A and B, and two outputs, sum (S) and carry (C). The sum is the XOR of the inputs (S = A XOR B), and the carry is the AND of the inputs (C = A AND B). The sum is 1 when exactly one input is 1, while the carry is 1 only when both inputs are 1. For the input pairs 00, 01, 10, and 11, the sum outputs are 0, 1, 1, 0 respectively, and the carry outputs are 0, 0, 0, 1 respectively.
Half-adders are implemented from basic gates, typically an XOR gate for the sum and an AND gate
In digital arithmetic, the half-adder serves as a foundational component in arithmetic logic units, calculators, and