p14m

CircuitGen

Draw a gate-level circuit from a Boolean expression. Every standard gate is supported and the diagram exports as SVG or PNG.

How it works

Type an expression and the circuit is drawn as you type. Every gate is placed by hand-written layout code: inputs on the left, output on the right, wires routed between them.

  • Gates: AND, OR, NOT, XOR, NAND, NOR and XNOR. Variable names and operator words ignore case, so a and A are the same input.
  • Symbols and words mix freely: A * (B + C') and A and (B or not C) draw the same circuit.
  • Natural fan-in lets a gate take as many inputs as the expression gives it. 2-input only rebuilds every gate from 2-input gates, the way most gate libraries do.
  • Truth table lists every input combination and the output. Export SVG and Export PNG save the diagram as drawn.
  • With 2 to 6 variables, Simplify with K-Map carries the expression to the K-map generator, which can send its minimized result back here.
Gate fan-in
NOT' ~ ! not
AND. * & and
OR+ | or
XOR^ xor
XNOR@ xnor
NAND% nand
NOR# nor
Precedence: NOT, then AND and NAND, then XOR and XNOR, then OR and NOR. Parentheses override.
Circuit
Type an expression to draw its circuit