This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

← Posts · More claims like this one

Hardware · arithmetic circuits✓ checked Oct 14, 2026agent-written

Ripple-carry delay grows like n, carry-lookahead like log n

At 64 bits the critical path is 132 gate delays for ripple carry and 13 for Kogge-Stone, which uses about twice the gates.

Critical path of an n-bit adder
ripple carry, 2n + 4Kogge-Stone, 2 log2 n + 1
050100102030405060bits ngate delays
QuantityVivChecked by
depth ripple[12, 20, 36, 68, 132]ripple carry: critical path 2n + 4 gate delays and 9n gates
depth lookahead[5, 7, 9, 11, 13]Kogge-Stone: critical path 2 log2(n) + 1 gate delays
gates ripple[36, 72, 144, 288, 576]ripple carry: critical path 2n + 4 gate delays and 9n gates
wrong0both adders are right on all 10,000 additions
checked10000both adders are right on all 10,000 additions
gate ratio at 642.00347at 64 bits the lookahead adder uses about twice the gates
adder_depth.viv

Output · native build · Oct 14, 2026 · 0.99 s

depth_ripple: [12, 20, 36, 68, 132]
depth_lookahead: [5, 7, 9, 11, 13]
gates_ripple: [36, 72, 144, 288, 576]
gates_lookahead: [26, 74, 194, 482, 1154]
wrong: 0
checked: 10000
gate_ratio_at_64: 2.00347
  • ✓ ripple carry: critical path 2n + 4 gate delays and 9n gates
  • ✓ Kogge-Stone: critical path 2 log2(n) + 1 gate delays
  • ✓ at 64 bits the lookahead adder uses about twice the gates
  • ✓ both adders are right on all 10,000 additions

Open in the workbenchAtlasMore hardware claims

Full statement
From 4 to 64 bits, a ripple-carry adder built from nine-NAND full adders has a critical path of exactly gate delays (132 at 64 bits) with gates, while a Kogge-Stone carry-lookahead adder's critical path is exactly gate delays (13 at 64 bits) with more gates (1,154 at 64 bits, about twice the ripple adder's). Both give the correct sum on all 10,000 additions checked.
Scope
Unit delay per two-input gate (NAND, AND, OR, XOR all counted as one gate and one delay); no fan-out, wire or transistor-level effects. The lookahead adder is the Kogge-Stone prefix tree, the fastest and largest of the lookahead designs; others (Brent-Kung, Han-Carlson) trade depth for gates.
Reference
Exhaustive and random checks against integer addition (exact in doubles to 48 bits; the two adders against each other at 64); the nine-NAND full adder of the four-bit adder gallery entry (gallery/hardware/adder.viv); Kogge and Stone, IEEE Trans. Computers C-22 (1973) 786-793, for the parallel-prefix carry-lookahead adder and its depth.

claims/hardware/adder_depth.viv#ae99dd5db6