Logic and Function: A half adder takes two binary inputs (usually labelled A and B) and produces two outputs:
Sum (S): The result of the addition in the current column.
Carry (C): The value that "carries over" to the next most significant bit.
Truth Table: The operation follows standard binary addition:
| A | B | S | C |
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
In this circuit the red led represent the sum ( S ) and the green led represent carry ( C )