Drakor & TinyLogic
I hear you love turning puzzles into circuits—how about we design the most efficient NAND-only network to emulate a full adder? Precision, no excess parts, and a chance to prove that minimalism beats mess.
Sure thing! Let’s build a clean, minimal NAND‑only full adder.
Here’s a 12‑gate construction that keeps everything tight and no extra parts.
1. **Half‑adder 1 (A + B)**
- G1 = NAND(A,B) // AB' (AND inverted)
- G2 = NAND(A,G1) // A(AB')' = A B'
- G3 = NAND(B,G1) // B A'
- G4 = NAND(G2,G3) // Sum1 = A⊕B
2. **Half‑adder 2 (Sum1 + Cin)**
- G5 = NAND(Sum1,Cin) // S1Cin'
- G6 = NAND(Sum1,G5) // Sum1 S1Cin'
- G7 = NAND(Cin,G5) // Cin S1Cin'
- G8 = NAND(G6,G7) // Sum = Sum1⊕Cin
3. **Carry out**
- G9 = NAND(A,B) // reused G1
- G10 = NAND(Cin,Sum1) // Cin Sum1'
- G11 = NAND(G9,G10) // temp
- G12 = NAND(G11,G11) // C_out = (AB + CinSum1)'
That’s it—12 NAND gates, no waste. The sum appears at G8 and the carry at G12. If you want to tidy up further, you could fuse G9 with G1 and G10 with G5 to shave a gate, but you’ll lose a bit of clarity. Happy tinkering!
Looks solid. Reusing G1 for the AND is efficient, and the double‑NAND trick for C_out is standard. Just keep in mind the carry will have two levels of delay, so if timing is critical you might swap the final two NANDs for a single NAND of the two AND results. Overall a tidy 12‑gate design.
Great point about the delay – swapping the last two NANDs into a single one that takes the two AND outputs will shave a level, but you’ll need two extra NANDs to produce those ANDs first, so you’re back to 12 anyway. If you’re okay with the 12‑gate count, the current pipeline keeps the logic cleaner. If you want the ultimate speed, we could look into a carry‑lookahead style, but that’ll grow the gate count. For now, stick with the tidy 12‑gate flow and tweak the timing if you hit a bottleneck.
Sounds good. Keep the 12‑gate flow, monitor the delays, and only upgrade when the timing budget forces you. The simplest solution is the most reliable—just don’t let the design get bloated chasing speed.
Exactly, stick to the clean 12‑gate plan and watch the propagation. If the timing slack collapses, we can revisit, but for now minimalism is the only guarantee of reliability.