3-Bit Binary Adder
Template: 3-Bit Binary Adder - Complex 3-bit adder with full carry propagation. Advanced arithmetic circuit demonstrating cascaded carry logic.
学べること
- Build a 3-bit adder from XOR, AND, OR gates without using full-adder primitives.
- Trace the gate-level critical path through 3 ripple stages.
- Compare gate-level and component-level views of the same circuit.
- Understand how carry-out is produced from a half-adder + OR pattern.
- Apply gate-level analysis to optimize for transistor count or speed.
仕組み
This 3-bit adder is built from individual gates (XOR, AND, OR) rather than packaged full-adder components. The internal structure is the same as the full-adder version, just with the per-stage logic exposed.
Each bit position uses the standard half-adder (XOR + AND) on the operand bits, plus an OR-of-carries pattern for the carry-out: - Sum bit: Si = (Ai ⊕ Bi) ⊕ Cini - Carry-out: Couti = (Ai · Bi) + ((Ai ⊕ Bi) · Cini)
Decomposing into gates makes the timing path visible: each full-adder's worst case is XOR (1) + AND (1) + OR (1) = ~3 gate delays. Across 3 bits that's ~9 gate delays worst case.
The educational benefit is seeing why the circuit produces correct binary addition — every gate's contribution to sum and carry is laid out. The cost is more wiring complexity than the component-based version.
真理値表
Same I/O as the component-based 3-bit adder. Selected key rows.
| 入力 | 出力 | |||||
|---|---|---|---|---|---|---|
| A2A1A0 | B2B1B0 | S3 | S2 | S1 | S0 | |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 + 0 = 0 |
| 1 | 1 | 0 | 0 | 1 | 0 | 1 + 1 = 2 |
| 1 | 1 | 1 | 0 | 0 | 0 | 4 + 4 = 8 |
| 1 | 1 | 1 | 1 | 1 | 0 | 7 + 7 = 14 (max) |
ブール式
Sum at bit i — XOR of all three.
Carry-out at bit i — AND of operand bits OR carry-in ANDed with the operand XOR.
順を追って試す
上の埋め込み回路で入力を設定し、期待される結果と一致するか確認しましょう。
- 1A = 111 B = 001期待値:
S = 1000観察ポイント: 7 + 1 = 8. Carry chain: bit 0 generates, bit 1 propagates, bit 2 propagates → S3 = 1. - 2A = 010 B = 010期待値:
S = 0100観察ポイント: 2 + 2 = 4. Bit 1 generates a carry that goes into bit 2, making S2 = 1. - 3A = 111 B = 111期待値:
S = 1110観察ポイント: Max sum. Each stage's carry adds another '1' at the top. - 4A = 101 B = 010期待値:
S = 0111観察ポイント: 5 + 2 = 7. No carry out of any stage; the inputs don't both have 1 at the same column.
使用コンポーネント
実世界での応用
Custom CPU adder cells. When designing your own ALU at the transistor level, you start from gate-level full-adder layouts to optimize for area, speed, or power.
FPGA carry chain logic. FPGAs pack gate-level full-adder cells into specialized carry-chain hardware that's faster than building from look-up tables.
Educational comparator with the component version. Side-by-side, the gate-level vs. component-level versions show abstraction layers — same function, different representation.
Timing analysis exercises. Identifying the critical path through the gate-level circuit teaches static timing analysis fundamentals.