A
half adder is a simple digital circuit that adds two single-bit binary numbers. It has two inputs and two outputs:
Inputs:
- A: The first bit (input).
- B: The second bit (input).
Outputs:
- Sum (S): This is the result of adding the two bits (A and B).
- Carry (C): This is the carry bit, which tells you if there’s an overflow when adding the two bits (like how 1 + 1 in decimal gives you a carry of 1).
Truth Table:
| A | B | Sum (S) | Carry (C) |
|---|---|---------|-----------|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
Explanation:
- When both inputs are 0 (A=0, B=0), the sum is 0, and there's no carry.
- When A is 0 and B is 1 (or vice versa), the sum is 1, and there's no carry.
- When both inputs are 1 (A=1, B=1), the sum is 0, but we get a carry of 1 (because 1 + 1 equals 2, which is written as 10 in binary, so 0 is the sum and 1 is the carry).
Logic Circuit:
- The Sum (S) is produced using an XOR (exclusive OR) gate:
\( S = A \oplus B \)
- The Carry (C) is produced using an AND gate:
\( C = A \land B \)
A half adder is a basic building block in digital electronics, and it's often used to build more complex adders like the
full adder.