bcd-optimization#
optimizing a gate level bcm to the end of the earth and back
The canonical repo for this is hosted on tangled over at dunkirk.sh/bcd-optimization
© 2026-present Kieran Klukas
For self-hosted knots, clone URLs may differ based on your setup.
Download tar.gz
Adds --format dot option to export circuits as Graphviz DOT files.
Render with: dot -Tpng circuit.dot -o circuit.png
The diagram shows:
- Input nodes (A, B, C, D)
- Inverters for negated signals
- Shared AND gates (product terms) with labels
- OR gates for each segment output
- Output nodes (a-g)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements a multi-output logic synthesis solver that achieves 19 gate
inputs, beating the 23-input baseline by exploiting shared product terms
across the 7 segment outputs.
Features:
- Pure Python Quine-McCluskey with multi-output tagging
- MaxSAT optimization (PySAT RC2) for minimum-cost covering
- SAT-based exact synthesis for provably optimal circuits
- Export to Verilog, C code, and Boolean equations
- Result verification against truth tables
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
optimizing a gate level bcm to the end of the earth and back
The canonical repo for this is hosted on tangled over at dunkirk.sh/bcd-optimization
© 2026-present Kieran Klukas