Half Adder Chip
1. Half Adder Chip
The chip used to add two n-bit numbers is known as Adder, also known as n-bit Adder. Half Adder chip is used to add 2-bits.
2. Truth Table
| a | b | sum | carry |
|-----|-----|-----|-------|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
3. Implementation (Logisim)
Representation of the Half Adder Chip in the logisim software using the previous gates.
4. Implementation (HDL)
The function in the above abstraction can help in the implementation of Half Adder Chip:
sum = a XOR b
carry = a AND b
(Representation of the Half Adder Chip in HDL using previous gates.)
CHIP HalfAdder {
IN a, b; // 1-bit inputs
OUT sum, // Right bit of a + b
carry; // Left bit of a + b
PARTS:
Xor(a=a, b=b, out=sum);
And(a=a, b=b, out=carry);
}