This circuit implements a two-bit adder, where each input has one bit.
`A + B + Cin = S with Cout`
While there is an OR gate in the design, there are several other [logic gates](/digital_design/logic_gates) too. **Using the truth table below, can you make sense of the other logic gates?**
| Cin | A | B | S | Cout |
|---------|---------|--------|--------|--------|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
**Extra credit: using this circuit, can you build a four-bit full adder?** This circuit needs to accept two two-bit values, A and B, and a carry-in bit. It needs to output a two-bit value, S, and a carry-out bit.
Feel free to play around to try to figure it out. You can always return to the [logic gate tutorial](/digital_design/logic_gates) if you need a refresher.
You can also check out the [**solution**](https://wokwi.com/projects/344249305917293138).
Loading
tt-block-input
tt-block-input
Loading
tt-block-output
tt-block-output
A
B
Cin
S
Cout
A
B
Cin